/* Generated by Cython 0.29.35 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "depends": [
            "C:\\Users\\mavaz\\git\\cuda-python-build-utils\\conda-recipe\\include\\cuda.h",
            "C:\\Users\\mavaz\\git\\cuda-python-build-utils\\conda-recipe\\include\\cudaProfiler.h",
            "cuda",
            "cuda\\_cuda\\loader.h"
        ],
        "include_dirs": [
            ".\\cuda",
            ".\\cuda\\_cuda",
            "C:\\Users\\mavaz\\AppData\\Local\\Programs\\Python\\Python38",
            "C:\\Users\\mavaz\\git\\cuda-python-build-utils\\conda-recipe/include"
        ],
        "language": "c++",
        "library_dirs": [
            "C:\\Users\\mavaz\\AppData\\Local\\Programs\\Python\\Python38\\Lib\\site-packages",
            "C:\\Users\\mavaz\\AppData\\Local\\Programs\\Python\\Python38\\lib"
        ],
        "name": "cuda._cuda.ccuda",
        "sources": [
            "cuda/_cuda\\ccuda.pyx",
            "cuda/_cuda/loader.cpp"
        ]
    },
    "module_name": "cuda._cuda.ccuda"
}
END: Cython Metadata */

#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.6+ or Python 3.3+.
#else
#define CYTHON_ABI "0_29_35"
#define CYTHON_HEX_VERSION 0x001D23F0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
  #if PY_VERSION_HEX >= 0x02070000
    #define HAVE_LONG_LONG
  #endif
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #if PY_VERSION_HEX < 0x03090000
    #undef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
#elif defined(PYSTON_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
#elif defined(PY_NOGIL)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_NOGIL 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #ifndef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #define CYTHON_COMPILING_IN_NOGIL 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 0
  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
    #define CYTHON_USE_PYLONG_INTERNALS (PY_VERSION_HEX < 0x030C00A5)
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #if PY_VERSION_HEX >= 0x030B00A4
    #undef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 0
  #elif !defined(CYTHON_FAST_THREAD_STATE)
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030A0000)
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  #endif
  #ifndef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS ((PY_VERSION_HEX >= 0x030600B1) && (PY_VERSION_HEX < 0x030C00A5))
  #endif
  #if PY_VERSION_HEX >= 0x030B00A4
    #undef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK 0
  #elif !defined(CYTHON_USE_EXC_INFO_STACK)
    #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
  #endif
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_MAJOR_VERSION < 3
    #include "longintrepr.h"
  #endif
  #undef SHIFT
  #undef BASE
  #undef MASK
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
           typedef unsigned char     uint8_t;
           typedef unsigned int      uint32_t;
        #else
           typedef unsigned __int8   uint8_t;
           typedef unsigned __int32  uint32_t;
        #endif
    #endif
#else
   #include <stdint.h>
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus) && __cplusplus >= 201103L
    #if __has_cpp_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH [[fallthrough]]
    #elif __has_cpp_attribute(clang::fallthrough)
      #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
    #elif __has_cpp_attribute(gnu::fallthrough)
      #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__ ) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif

#ifndef __cplusplus
  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
#endif
#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #else
    #define CYTHON_INLINE inline
  #endif
#endif
template<typename T>
void __Pyx_call_destructor(T& x) {
    x.~T();
}
template<typename T>
class __Pyx_FakeReference {
  public:
    __Pyx_FakeReference() : ptr(NULL) { }
    __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
    T *operator->() { return ptr; }
    T *operator&() { return ptr; }
    operator T&() { return *ptr; }
    template<typename U> bool operator ==(U other) { return *ptr == other; }
    template<typename U> bool operator !=(U other) { return *ptr != other; }
  private:
    T *ptr;
};

#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_DefaultClassType PyType_Type
#if PY_VERSION_HEX >= 0x030B00A1
    static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f,
                                                    PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                                    PyObject *fv, PyObject *cell, PyObject* fn,
                                                    PyObject *name, int fline, PyObject *lnos) {
        PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL;
        PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL;
        const char *fn_cstr=NULL;
        const char *name_cstr=NULL;
        PyCodeObject* co=NULL;
        PyObject *type, *value, *traceback;
        PyErr_Fetch(&type, &value, &traceback);
        if (!(kwds=PyDict_New())) goto end;
        if (!(argcount=PyLong_FromLong(a))) goto end;
        if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end;
        if (!(posonlyargcount=PyLong_FromLong(0))) goto end;
        if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end;
        if (!(kwonlyargcount=PyLong_FromLong(k))) goto end;
        if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end;
        if (!(nlocals=PyLong_FromLong(l))) goto end;
        if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end;
        if (!(stacksize=PyLong_FromLong(s))) goto end;
        if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end;
        if (!(flags=PyLong_FromLong(f))) goto end;
        if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end;
        if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end;
        if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end;
        if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end;
        if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too;
        if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here
        if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too;
        Py_XDECREF((PyObject*)co);
        co = (PyCodeObject*)call_result;
        call_result = NULL;
        if (0) {
            cleanup_code_too:
            Py_XDECREF((PyObject*)co);
            co = NULL;
        }
        end:
        Py_XDECREF(kwds);
        Py_XDECREF(argcount);
        Py_XDECREF(posonlyargcount);
        Py_XDECREF(kwonlyargcount);
        Py_XDECREF(nlocals);
        Py_XDECREF(stacksize);
        Py_XDECREF(replace);
        Py_XDECREF(call_result);
        Py_XDECREF(empty);
        if (type) {
            PyErr_Restore(type, value, traceback);
        }
        return co;
    }
#else
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
  #define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 0
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
  #define PyMem_RawMalloc(n)           PyMem_Malloc(n)
  #define PyMem_RawRealloc(p, n)       PyMem_Realloc(p, n)
  #define PyMem_RawFree(p)             PyMem_Free(p)
#endif
#if CYTHON_COMPILING_IN_PYSTON
  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0;
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#endif
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
#else
#define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_READY(op)       (0)
  #else
    #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                                0 : _PyUnicode_Ready((PyObject *)(op)))
  #endif
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #else
    #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
    #else
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
    #endif
  #endif
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#ifndef PyObject_Unicode
  #define PyObject_Unicode             PyObject_Str
#endif
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#if PY_VERSION_HEX >= 0x030900A4
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
#else
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsHash_t
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#endif

#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
  #if !defined(_USE_MATH_DEFINES)
    #define _USE_MATH_DEFINES
  #endif
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif

#define __PYX_MARK_ERR_POS(f_index, lineno) \
    { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#define __PYX_HAVE__cuda___cuda__ccuda
#define __PYX_HAVE_API__cuda___cuda__ccuda
/* Early includes */
#include <stdint.h>
#include "cuda.h"
#include "cudaProfiler.h"
#include "loader.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif

typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyObject_AsWritableString(s)    ((char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
#if CYTHON_ASSUME_SAFE_MACROS
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }

static PyObject *__pyx_m = NULL;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_cython_runtime = NULL;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static PyObject *__pyx_empty_unicode;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;


static const char *__pyx_f[] = {
  "cuda\\_cuda\\ccuda.pyx",
};
/* ForceInitThreads.proto */
#ifndef __PYX_FORCE_INIT_THREADS
  #define __PYX_FORCE_INIT_THREADS 0
#endif

/* NoFastGil.proto */
#define __Pyx_PyGILState_Ensure PyGILState_Ensure
#define __Pyx_PyGILState_Release PyGILState_Release
#define __Pyx_FastGIL_Remember()
#define __Pyx_FastGIL_Forget()
#define __Pyx_FastGilFuncInit()


/* "cuda/ccuda.pxd":2213
 * ctypedef CUGLmap_flags_enum CUGLmap_flags
 * 
 * ctypedef unsigned int GLenum             # <<<<<<<<<<<<<<
 * 
 * ctypedef unsigned int GLuint
 */
typedef unsigned int __pyx_t_4cuda_5ccuda_GLenum;

/* "cuda/ccuda.pxd":2215
 * ctypedef unsigned int GLenum
 * 
 * ctypedef unsigned int GLuint             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef unsigned int __pyx_t_4cuda_5ccuda_GLuint;

/* "cuda/ccuda.pxd":2227
 * ctypedef void* EGLStreamKHR
 * 
 * ctypedef unsigned int EGLint             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef unsigned int __pyx_t_4cuda_5ccuda_EGLint;

/* "cuda/ccuda.pxd":2234
 * ctypedef void* EGLSyncKHR
 * 
 * ctypedef uint32_t VdpDevice             # <<<<<<<<<<<<<<
 * 
 * ctypedef unsigned long long VdpGetProcAddress
 */
typedef uint32_t __pyx_t_4cuda_5ccuda_VdpDevice;

/* "cuda/ccuda.pxd":2236
 * ctypedef uint32_t VdpDevice
 * 
 * ctypedef unsigned long long VdpGetProcAddress             # <<<<<<<<<<<<<<
 * 
 * ctypedef uint32_t VdpVideoSurface
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_5ccuda_VdpGetProcAddress;

/* "cuda/ccuda.pxd":2238
 * ctypedef unsigned long long VdpGetProcAddress
 * 
 * ctypedef uint32_t VdpVideoSurface             # <<<<<<<<<<<<<<
 * 
 * ctypedef uint32_t VdpOutputSurface
 */
typedef uint32_t __pyx_t_4cuda_5ccuda_VdpVideoSurface;

/* "cuda/ccuda.pxd":2240
 * ctypedef uint32_t VdpVideoSurface
 * 
 * ctypedef uint32_t VdpOutputSurface             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil
 */
typedef uint32_t __pyx_t_4cuda_5ccuda_VdpOutputSurface;

/*--- Type declarations ---*/
union __pyx_t_4cuda_5ccuda_anon_union12;
struct __pyx_t_4cuda_5ccuda_CUeglFrame_st;

/* "cuda/ccuda.pxd":2043
 *     ctypedef CUoutput_mode_enum CUoutput_mode
 * 
 * cdef enum CUeglFrameType_enum:             # <<<<<<<<<<<<<<
 *     CU_EGL_FRAME_TYPE_ARRAY = 0
 *     CU_EGL_FRAME_TYPE_PITCH = 1
 */
enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum {
  __pyx_e_4cuda_5ccuda_CU_EGL_FRAME_TYPE_ARRAY = 0,
  __pyx_e_4cuda_5ccuda_CU_EGL_FRAME_TYPE_PITCH = 1
};

/* "cuda/ccuda.pxd":2049
 * ctypedef CUeglFrameType_enum CUeglFrameType
 * 
 * cdef enum CUeglResourceLocationFlags_enum:             # <<<<<<<<<<<<<<
 *     CU_EGL_RESOURCE_LOCATION_SYSMEM = 0
 *     CU_EGL_RESOURCE_LOCATION_VIDMEM = 1
 */
enum __pyx_t_4cuda_5ccuda_CUeglResourceLocationFlags_enum {
  __pyx_e_4cuda_5ccuda_CU_EGL_RESOURCE_LOCATION_SYSMEM = 0,
  __pyx_e_4cuda_5ccuda_CU_EGL_RESOURCE_LOCATION_VIDMEM = 1
};

/* "cuda/ccuda.pxd":2055
 * ctypedef CUeglResourceLocationFlags_enum CUeglResourceLocationFlags
 * 
 * cdef enum CUeglColorFormat_enum:             # <<<<<<<<<<<<<<
 *     CU_EGL_COLOR_FORMAT_YUV420_PLANAR = 0
 *     CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR = 1
 */
enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum {
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_PLANAR = 0,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR = 1,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV422_PLANAR = 2,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR = 3,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_RGB = 4,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BGR = 5,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_ARGB = 6,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_RGBA = 7,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_L = 8,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_R = 9,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV444_PLANAR = 10,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR = 11,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUYV_422 = 12,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_UYVY_422 = 13,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_ABGR = 14,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BGRA = 15,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_A = 16,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_RG = 17,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_AYUV = 18,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR = 19,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR = 20,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR = 21,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR = 22,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR = 23,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR = 24,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR = 25,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_VYUY_ER = 26,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_UYVY_ER = 27,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUYV_ER = 28,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVYU_ER = 29,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV_ER = 30,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUVA_ER = 31,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_AYUV_ER = 32,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER = 33,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER = 34,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER = 35,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER = 36,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER = 37,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER = 38,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER = 39,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER = 40,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER = 41,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER = 42,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER = 43,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER = 44,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_RGGB = 45,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_BGGR = 46,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_GRBG = 47,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_GBRG = 48,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER10_RGGB = 49,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER10_BGGR = 50,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER10_GRBG = 51,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER10_GBRG = 52,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_RGGB = 53,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_BGGR = 54,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_GRBG = 55,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_GBRG = 56,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER14_RGGB = 57,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER14_BGGR = 58,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER14_GRBG = 59,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER14_GBRG = 60,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER20_RGGB = 61,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER20_BGGR = 62,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER20_GRBG = 63,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER20_GBRG = 64,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU444_PLANAR = 65,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU422_PLANAR = 66,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_PLANAR = 67,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB = 68,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR = 69,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG = 70,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG = 71,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_BCCR = 72,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_RCCB = 73,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_CRBC = 74,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_CBRC = 75,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER10_CCCC = 76,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_BCCR = 77,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_RCCB = 78,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_CRBC = 79,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_CBRC = 80,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_CCCC = 81,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y = 82,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 = 83,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 = 84,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 = 85,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 = 86,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 = 87,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 = 88,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 = 89,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709 = 90,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 = 91,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 = 92,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 = 93,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR = 94,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709 = 95,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y_ER = 96,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y_709_ER = 97,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10_ER = 98,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10_709_ER = 99,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12_ER = 0x64,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12_709_ER = 0x65,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUVA = 0x66,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV = 0x67,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVYU = 0x68,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_VYUY = 0x69,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER = 0x6A,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER = 0x6B,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER = 0x6C,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER = 0x6D,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER = 0x6E,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER = 0x6F,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER = 0x70,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER = 0x71,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_MAX = 0x72
};

/* "cuda/ccuda.pxd":2199
 * ctypedef CUeglStreamConnection_st* CUeglStreamConnection
 * 
 * cdef enum CUGLDeviceList_enum:             # <<<<<<<<<<<<<<
 *     CU_GL_DEVICE_LIST_ALL = 1
 *     CU_GL_DEVICE_LIST_CURRENT_FRAME = 2
 */
enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum {
  __pyx_e_4cuda_5ccuda_CU_GL_DEVICE_LIST_ALL = 1,
  __pyx_e_4cuda_5ccuda_CU_GL_DEVICE_LIST_CURRENT_FRAME = 2,
  __pyx_e_4cuda_5ccuda_CU_GL_DEVICE_LIST_NEXT_FRAME = 3
};

/* "cuda/ccuda.pxd":2206
 * ctypedef CUGLDeviceList_enum CUGLDeviceList
 * 
 * cdef enum CUGLmap_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_GL_MAP_RESOURCE_FLAGS_NONE = 0
 *     CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY = 1
 */
enum __pyx_t_4cuda_5ccuda_CUGLmap_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_GL_MAP_RESOURCE_FLAGS_NONE = 0,
  __pyx_e_4cuda_5ccuda_CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY = 1,
  __pyx_e_4cuda_5ccuda_CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2
};

/* "cuda/ccuda.pxd":3076
 * cdef CUresult cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil
 * 
 * cdef enum: CUDA_VERSION = 12020             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_IPC_HANDLE_SIZE = 64
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_VERSION = 0x2EF4
};

/* "cuda/ccuda.pxd":3078
 * cdef enum: CUDA_VERSION = 12020
 * 
 * cdef enum: CU_IPC_HANDLE_SIZE = 64             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_STREAM_LEGACY = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_IPC_HANDLE_SIZE = 64
};

/* "cuda/ccuda.pxd":3080
 * cdef enum: CU_IPC_HANDLE_SIZE = 64
 * 
 * cdef enum: CU_STREAM_LEGACY = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_STREAM_PER_THREAD = 2
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_STREAM_LEGACY = 1
};

/* "cuda/ccuda.pxd":3082
 * cdef enum: CU_STREAM_LEGACY = 1
 * 
 * cdef enum: CU_STREAM_PER_THREAD = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_STREAM_PER_THREAD = 2
};

/* "cuda/ccuda.pxd":3084
 * cdef enum: CU_STREAM_PER_THREAD = 2
 * 
 * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_COMPUTE_ACCELERATED_TARGET_BASE = 0x10000
};

/* "cuda/ccuda.pxd":3086
 * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536
 * 
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1
};

/* "cuda/ccuda.pxd":3088
 * 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
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2
};

/* "cuda/ccuda.pxd":3090
 * 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
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4
};

/* "cuda/ccuda.pxd":3092
 * 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
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5
};

/* "cuda/ccuda.pxd":3094
 * 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
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8
};

/* "cuda/ccuda.pxd":3096
 * 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
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9
};

/* "cuda/ccuda.pxd":3098
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9
 * 
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10
};

/* "cuda/ccuda.pxd":3100
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10
 * 
 * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1
};

/* "cuda/ccuda.pxd":3102
 * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1
 * 
 * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3
};

/* "cuda/ccuda.pxd":3104
 * 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
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_STREAM_ATTRIBUTE_PRIORITY = 8
};

/* "cuda/ccuda.pxd":3106
 * 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
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9
};

/* "cuda/ccuda.pxd":3108
 * 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
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10
};

/* "cuda/ccuda.pxd":3110
 * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10
 * 
 * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_MEMHOSTALLOC_PORTABLE = 1
};

/* "cuda/ccuda.pxd":3112
 * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1
 * 
 * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_MEMHOSTALLOC_DEVICEMAP = 2
};

/* "cuda/ccuda.pxd":3114
 * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2
 * 
 * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_MEMHOSTALLOC_WRITECOMBINED = 4
};

/* "cuda/ccuda.pxd":3116
 * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4
 * 
 * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_MEMHOSTREGISTER_PORTABLE = 1
};

/* "cuda/ccuda.pxd":3118
 * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1
 * 
 * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_MEMHOSTREGISTER_DEVICEMAP = 2
};

/* "cuda/ccuda.pxd":3120
 * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2
 * 
 * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_MEMHOSTREGISTER_IOMEMORY = 4
};

/* "cuda/ccuda.pxd":3122
 * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4
 * 
 * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_MEMHOSTREGISTER_READ_ONLY = 8
};

/* "cuda/ccuda.pxd":3124
 * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8
 * 
 * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1
};

/* "cuda/ccuda.pxd":3126
 * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1
 * 
 * cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_TENSOR_MAP_NUM_QWORDS = 16
};

/* "cuda/ccuda.pxd":3128
 * 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
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_DEDICATED = 1
};

/* "cuda/ccuda.pxd":3130
 * 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
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1
};

/* "cuda/ccuda.pxd":3132
 * 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
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2
};

/* "cuda/ccuda.pxd":3134
 * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2
 * 
 * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_NVSCISYNC_ATTR_SIGNAL = 1
};

/* "cuda/ccuda.pxd":3136
 * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1
 * 
 * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_NVSCISYNC_ATTR_WAIT = 2
};

/* "cuda/ccuda.pxd":3138
 * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2
 * 
 * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_MEM_CREATE_USAGE_TILE_POOL = 1
};

/* "cuda/ccuda.pxd":3140
 * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1
 * 
 * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1
};

/* "cuda/ccuda.pxd":3142
 * 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
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2
};

/* "cuda/ccuda.pxd":3144
 * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2
 * 
 * cdef enum: CUDA_ARRAY3D_LAYERED = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_ARRAY3D_2DARRAY = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_LAYERED = 1
};

/* "cuda/ccuda.pxd":3146
 * cdef enum: CUDA_ARRAY3D_LAYERED = 1
 * 
 * cdef enum: CUDA_ARRAY3D_2DARRAY = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_2DARRAY = 1
};

/* "cuda/ccuda.pxd":3148
 * cdef enum: CUDA_ARRAY3D_2DARRAY = 1
 * 
 * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_SURFACE_LDST = 2
};

/* "cuda/ccuda.pxd":3150
 * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2
 * 
 * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_CUBEMAP = 4
};

/* "cuda/ccuda.pxd":3152
 * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4
 * 
 * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_TEXTURE_GATHER = 8
};

/* "cuda/ccuda.pxd":3154
 * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8
 * 
 * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_DEPTH_TEXTURE = 16
};

/* "cuda/ccuda.pxd":3156
 * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16
 * 
 * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_ARRAY3D_SPARSE = 64
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_COLOR_ATTACHMENT = 32
};

/* "cuda/ccuda.pxd":3158
 * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32
 * 
 * cdef enum: CUDA_ARRAY3D_SPARSE = 64             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_SPARSE = 64
};

/* "cuda/ccuda.pxd":3160
 * cdef enum: CUDA_ARRAY3D_SPARSE = 64
 * 
 * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_DEFERRED_MAPPING = 0x80
};

/* "cuda/ccuda.pxd":3162
 * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128
 * 
 * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_TRSF_READ_AS_INTEGER = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_TRSA_OVERRIDE_FORMAT = 1
};

/* "cuda/ccuda.pxd":3164
 * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1
 * 
 * cdef enum: CU_TRSF_READ_AS_INTEGER = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_TRSF_READ_AS_INTEGER = 1
};

/* "cuda/ccuda.pxd":3166
 * cdef enum: CU_TRSF_READ_AS_INTEGER = 1
 * 
 * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_TRSF_SRGB = 16
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_TRSF_NORMALIZED_COORDINATES = 2
};

/* "cuda/ccuda.pxd":3168
 * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2
 * 
 * cdef enum: CU_TRSF_SRGB = 16             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_TRSF_SRGB = 16
};

/* "cuda/ccuda.pxd":3170
 * cdef enum: CU_TRSF_SRGB = 16
 * 
 * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32
};

/* "cuda/ccuda.pxd":3172
 * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32
 * 
 * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_TRSF_SEAMLESS_CUBEMAP = 64
};

/* "cuda/ccuda.pxd":3174
 * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64
 * 
 * cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_LAUNCH_PARAM_END = 0
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_LAUNCH_PARAM_END_AS_INT = 0
};

/* "cuda/ccuda.pxd":3176
 * 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
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_LAUNCH_PARAM_END = 0
};

/* "cuda/ccuda.pxd":3178
 * 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
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1
};

/* "cuda/ccuda.pxd":3180
 * 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
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_LAUNCH_PARAM_BUFFER_POINTER = 1
};

/* "cuda/ccuda.pxd":3182
 * 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
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2
};

/* "cuda/ccuda.pxd":3184
 * 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
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_LAUNCH_PARAM_BUFFER_SIZE = 2
};

/* "cuda/ccuda.pxd":3186
 * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2
 * 
 * cdef enum: CU_PARAM_TR_DEFAULT = -1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_DEVICE_CPU = -1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_PARAM_TR_DEFAULT = -1L
};

/* "cuda/ccuda.pxd":3188
 * cdef enum: CU_PARAM_TR_DEFAULT = -1
 * 
 * cdef enum: CU_DEVICE_CPU = -1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_DEVICE_INVALID = -2
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_DEVICE_CPU = -1L
};

/* "cuda/ccuda.pxd":3190
 * cdef enum: CU_DEVICE_CPU = -1
 * 
 * cdef enum: CU_DEVICE_INVALID = -2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: MAX_PLANES = 3
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_DEVICE_INVALID = -2L
};

/* "cuda/ccuda.pxd":3192
 * cdef enum: CU_DEVICE_INVALID = -2
 * 
 * cdef enum: MAX_PLANES = 3             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_EGL_INFINITE_TIMEOUT = 4294967295
 */
enum  {
  __pyx_e_4cuda_5ccuda_MAX_PLANES = 3
};

/* "cuda/ccuda.pxd":3194
 * cdef enum: MAX_PLANES = 3
 * 
 * cdef enum: CUDA_EGL_INFINITE_TIMEOUT = 4294967295             # <<<<<<<<<<<<<<
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_EGL_INFINITE_TIMEOUT = 0xFFFFFFFF
};

/* "cuda/ccuda.pxd":2047
 *     CU_EGL_FRAME_TYPE_PITCH = 1
 * 
 * ctypedef CUeglFrameType_enum CUeglFrameType             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUeglResourceLocationFlags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum __pyx_t_4cuda_5ccuda_CUeglFrameType;

/* "cuda/ccuda.pxd":2053
 *     CU_EGL_RESOURCE_LOCATION_VIDMEM = 1
 * 
 * ctypedef CUeglResourceLocationFlags_enum CUeglResourceLocationFlags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUeglColorFormat_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUeglResourceLocationFlags_enum __pyx_t_4cuda_5ccuda_CUeglResourceLocationFlags;

/* "cuda/ccuda.pxd":2172
 *     CU_EGL_COLOR_FORMAT_MAX = 114
 * 
 * ctypedef CUeglColorFormat_enum CUeglColorFormat             # <<<<<<<<<<<<<<
 * 
 * cdef union anon_union12:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum __pyx_t_4cuda_5ccuda_CUeglColorFormat;

/* "cuda/ccuda.pxd":2174
 * ctypedef CUeglColorFormat_enum CUeglColorFormat
 * 
 * cdef union anon_union12:             # <<<<<<<<<<<<<<
 *     CUarray pArray[3]
 *     void* pPitch[3]
 */
union __pyx_t_4cuda_5ccuda_anon_union12 {
  CUarray pArray[3];
  void *pPitch[3];
};

/* "cuda/ccuda.pxd":2178
 *     void* pPitch[3]
 * 
 * cdef struct CUeglFrame_st:             # <<<<<<<<<<<<<<
 *     anon_union12 frame
 *     unsigned int width
 */
struct __pyx_t_4cuda_5ccuda_CUeglFrame_st {
  union __pyx_t_4cuda_5ccuda_anon_union12 frame;
  unsigned int width;
  unsigned int height;
  unsigned int depth;
  unsigned int pitch;
  unsigned int planeCount;
  unsigned int numChannels;
  __pyx_t_4cuda_5ccuda_CUeglFrameType frameType;
  __pyx_t_4cuda_5ccuda_CUeglColorFormat eglColorFormat;
  CUarray_format cuFormat;
};

/* "cuda/ccuda.pxd":2190
 *     CUarray_format cuFormat
 * 
 * ctypedef CUeglFrame_st CUeglFrame_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUeglFrame_v1 CUeglFrame
 */
typedef struct __pyx_t_4cuda_5ccuda_CUeglFrame_st __pyx_t_4cuda_5ccuda_CUeglFrame_v1;

/* "cuda/ccuda.pxd":2192
 * ctypedef CUeglFrame_st CUeglFrame_v1
 * 
 * ctypedef CUeglFrame_v1 CUeglFrame             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef __pyx_t_4cuda_5ccuda_CUeglFrame_v1 __pyx_t_4cuda_5ccuda_CUeglFrame;

/* "cuda/ccuda.pxd":2197
 *     cdef struct CUeglStreamConnection_st:
 *         pass
 * ctypedef CUeglStreamConnection_st* CUeglStreamConnection             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUGLDeviceList_enum:
 */
typedef struct CUeglStreamConnection_st *__pyx_t_4cuda_5ccuda_CUeglStreamConnection;

/* "cuda/ccuda.pxd":2204
 *     CU_GL_DEVICE_LIST_NEXT_FRAME = 3
 * 
 * ctypedef CUGLDeviceList_enum CUGLDeviceList             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUGLmap_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum __pyx_t_4cuda_5ccuda_CUGLDeviceList;

/* "cuda/ccuda.pxd":2211
 *     CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2
 * 
 * ctypedef CUGLmap_flags_enum CUGLmap_flags             # <<<<<<<<<<<<<<
 * 
 * ctypedef unsigned int GLenum
 */
typedef enum __pyx_t_4cuda_5ccuda_CUGLmap_flags_enum __pyx_t_4cuda_5ccuda_CUGLmap_flags;

/* "cuda/ccuda.pxd":2220
 *     cdef struct void:
 *         pass
 * ctypedef void* EGLImageKHR             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef void *__pyx_t_4cuda_5ccuda_EGLImageKHR;

/* "cuda/ccuda.pxd":2225
 *     cdef struct void:
 *         pass
 * ctypedef void* EGLStreamKHR             # <<<<<<<<<<<<<<
 * 
 * ctypedef unsigned int EGLint
 */
typedef void *__pyx_t_4cuda_5ccuda_EGLStreamKHR;

/* "cuda/ccuda.pxd":2232
 *     cdef struct void:
 *         pass
 * ctypedef void* EGLSyncKHR             # <<<<<<<<<<<<<<
 * 
 * ctypedef uint32_t VdpDevice
 */
typedef void *__pyx_t_4cuda_5ccuda_EGLSyncKHR;

/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          if (acquire_gil) {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
              PyGILState_Release(__pyx_gilstate_save);\
          } else {\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
  #define __Pyx_RefNannyFinishContext()\
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_XDECREF(tmp);\
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_DECREF(tmp);\
    } while (0)
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);

/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  PyErr_Occurred()
#endif

/* PyErrFetchRestore.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
#else
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#endif
#else
#define __Pyx_PyErr_Clear() PyErr_Clear()
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
#endif

/* Profile.proto */
#ifndef CYTHON_PROFILE
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
  #define CYTHON_PROFILE 0
#else
  #define CYTHON_PROFILE 1
#endif
#endif
#ifndef CYTHON_TRACE_NOGIL
  #define CYTHON_TRACE_NOGIL 0
#else
  #if CYTHON_TRACE_NOGIL && !defined(CYTHON_TRACE)
    #define CYTHON_TRACE 1
  #endif
#endif
#ifndef CYTHON_TRACE
  #define CYTHON_TRACE 0
#endif
#if CYTHON_TRACE
  #undef CYTHON_PROFILE_REUSE_FRAME
#endif
#ifndef CYTHON_PROFILE_REUSE_FRAME
  #define CYTHON_PROFILE_REUSE_FRAME 0
#endif
#if CYTHON_PROFILE || CYTHON_TRACE
  #include "compile.h"
  #include "frameobject.h"
  #include "traceback.h"
#if PY_VERSION_HEX >= 0x030b00a6
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
  #if CYTHON_PROFILE_REUSE_FRAME
    #define CYTHON_FRAME_MODIFIER static
    #define CYTHON_FRAME_DEL(frame)
  #else
    #define CYTHON_FRAME_MODIFIER
    #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame)
  #endif
  #define __Pyx_TraceDeclarations\
      static PyCodeObject *__pyx_frame_code = NULL;\
      CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;\
      int __Pyx_use_tracing = 0;
  #define __Pyx_TraceFrameInit(codeobj)\
      if (codeobj) __pyx_frame_code = (PyCodeObject*) codeobj;
#if PY_VERSION_HEX >= 0x030b00a2
  #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
     (unlikely((tstate)->cframe->use_tracing) &&\
         (!(check_tracing) || !(tstate)->tracing) &&\
         (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
  #define __Pyx_EnterTracing(tstate) PyThreadState_EnterTracing(tstate)
  #define __Pyx_LeaveTracing(tstate) PyThreadState_LeaveTracing(tstate)
#elif PY_VERSION_HEX >= 0x030a00b1
  #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
     (unlikely((tstate)->cframe->use_tracing) &&\
         (!(check_tracing) || !(tstate)->tracing) &&\
         (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
  #define __Pyx_EnterTracing(tstate)\
      do { tstate->tracing++; tstate->cframe->use_tracing = 0; } while (0)
  #define __Pyx_LeaveTracing(tstate)\
      do {\
          tstate->tracing--;\
          tstate->cframe->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\
                                 || tstate->c_profilefunc != NULL);\
      } while (0)
#else
  #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
     (unlikely((tstate)->use_tracing) &&\
         (!(check_tracing) || !(tstate)->tracing) &&\
         (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
  #define __Pyx_EnterTracing(tstate)\
      do { tstate->tracing++; tstate->use_tracing = 0; } while (0)
  #define __Pyx_LeaveTracing(tstate)\
      do {\
          tstate->tracing--;\
          tstate->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\
                                         || tstate->c_profilefunc != NULL);\
      } while (0)
#endif
  #ifdef WITH_THREAD
  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
  if (nogil) {\
      if (CYTHON_TRACE_NOGIL) {\
          PyThreadState *tstate;\
          PyGILState_STATE state = PyGILState_Ensure();\
          tstate = __Pyx_PyThreadState_Current;\
          if (__Pyx_IsTracing(tstate, 1, 1)) {\
              __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
          }\
          PyGILState_Release(state);\
          if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
      }\
  } else {\
      PyThreadState* tstate = PyThreadState_GET();\
      if (__Pyx_IsTracing(tstate, 1, 1)) {\
          __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
          if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
      }\
  }
  #else
  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
  {   PyThreadState* tstate = PyThreadState_GET();\
      if (__Pyx_IsTracing(tstate, 1, 1)) {\
          __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
          if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
      }\
  }
  #endif
  #define __Pyx_TraceException()\
  if (likely(!__Pyx_use_tracing)); else {\
      PyThreadState* tstate = __Pyx_PyThreadState_Current;\
      if (__Pyx_IsTracing(tstate, 0, 1)) {\
          __Pyx_EnterTracing(tstate);\
          PyObject *exc_info = __Pyx_GetExceptionTuple(tstate);\
          if (exc_info) {\
              if (CYTHON_TRACE && tstate->c_tracefunc)\
                  tstate->c_tracefunc(\
                      tstate->c_traceobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
              tstate->c_profilefunc(\
                  tstate->c_profileobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
              Py_DECREF(exc_info);\
          }\
          __Pyx_LeaveTracing(tstate);\
      }\
  }
  static void __Pyx_call_return_trace_func(PyThreadState *tstate, PyFrameObject *frame, PyObject *result) {
      PyObject *type, *value, *traceback;
      __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
      __Pyx_EnterTracing(tstate);
      if (CYTHON_TRACE && tstate->c_tracefunc)
          tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_RETURN, result);
      if (tstate->c_profilefunc)
          tstate->c_profilefunc(tstate->c_profileobj, frame, PyTrace_RETURN, result);
      CYTHON_FRAME_DEL(frame);
      __Pyx_LeaveTracing(tstate);
      __Pyx_ErrRestoreInState(tstate, type, value, traceback);
  }
  #ifdef WITH_THREAD
  #define __Pyx_TraceReturn(result, nogil)\
  if (likely(!__Pyx_use_tracing)); else {\
      if (nogil) {\
          if (CYTHON_TRACE_NOGIL) {\
              PyThreadState *tstate;\
              PyGILState_STATE state = PyGILState_Ensure();\
              tstate = __Pyx_PyThreadState_Current;\
              if (__Pyx_IsTracing(tstate, 0, 0)) {\
                  __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
              }\
              PyGILState_Release(state);\
          }\
      } else {\
          PyThreadState* tstate = __Pyx_PyThreadState_Current;\
          if (__Pyx_IsTracing(tstate, 0, 0)) {\
              __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
          }\
      }\
  }
  #else
  #define __Pyx_TraceReturn(result, nogil)\
  if (likely(!__Pyx_use_tracing)); else {\
      PyThreadState* tstate = __Pyx_PyThreadState_Current;\
      if (__Pyx_IsTracing(tstate, 0, 0)) {\
          __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
      }\
  }
  #endif
  static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno);
  static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, PyThreadState* tstate, const char *funcname, const char *srcfile, int firstlineno);
#else
  #define __Pyx_TraceDeclarations
  #define __Pyx_TraceFrameInit(codeobj)
  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)   if ((1)); else goto_error;
  #define __Pyx_TraceException()
  #define __Pyx_TraceReturn(result, nogil)
#endif
#if CYTHON_TRACE
  static int __Pyx_call_line_trace_func(PyThreadState *tstate, PyFrameObject *frame, int lineno) {
      int ret;
      PyObject *type, *value, *traceback;
      __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
      __Pyx_PyFrame_SetLineNumber(frame, lineno);
      __Pyx_EnterTracing(tstate);
      ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL);
      __Pyx_LeaveTracing(tstate);
      if (likely(!ret)) {
          __Pyx_ErrRestoreInState(tstate, type, value, traceback);
      } else {
          Py_XDECREF(type);
          Py_XDECREF(value);
          Py_XDECREF(traceback);
      }
      return ret;
  }
  #ifdef WITH_THREAD
  #define __Pyx_TraceLine(lineno, nogil, goto_error)\
  if (likely(!__Pyx_use_tracing)); else {\
      if (nogil) {\
          if (CYTHON_TRACE_NOGIL) {\
              int ret = 0;\
              PyThreadState *tstate;\
              PyGILState_STATE state = PyGILState_Ensure();\
              tstate = __Pyx_PyThreadState_Current;\
              if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
                  ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
              }\
              PyGILState_Release(state);\
              if (unlikely(ret)) goto_error;\
          }\
      } else {\
          PyThreadState* tstate = __Pyx_PyThreadState_Current;\
          if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
              int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
              if (unlikely(ret)) goto_error;\
          }\
      }\
  }
  #else
  #define __Pyx_TraceLine(lineno, nogil, goto_error)\
  if (likely(!__Pyx_use_tracing)); else {\
      PyThreadState* tstate = __Pyx_PyThreadState_Current;\
      if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
          int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
          if (unlikely(ret)) goto_error;\
      }\
  }
  #endif
#else
  #define __Pyx_TraceLine(lineno, nogil, goto_error)   if ((1)); else goto_error;
#endif

/* PyDictVersioning.proto */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
#define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
#define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
    (version_var) = __PYX_GET_DICT_VERSION(dict);\
    (cache_var) = (value);
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
        (VAR) = __pyx_dict_cached_value;\
    } else {\
        (VAR) = __pyx_dict_cached_value = (LOOKUP);\
        __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
    }\
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
#else
#define __PYX_GET_DICT_VERSION(dict)  (0)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
#endif

/* GetModuleGlobalName.proto */
#if CYTHON_USE_DICT_VERSIONS
#define __Pyx_GetModuleGlobalName(var, name)  do {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
        (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
        __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  do {\
    PY_UINT64_T __pyx_dict_version;\
    PyObject *__pyx_dict_cached_value;\
    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
#else
#define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
#endif

/* PyObjectCall.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

/* IncludeStringH.proto */
#include <string.h>

/* decode_c_string_utf16.proto */
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = 0;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = -1;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = 1;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}

/* decode_c_string.proto */
static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));

/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
#else
#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
#endif
#define __Pyx_BUILD_ASSERT_EXPR(cond)\
    (sizeof(char [1 - 2*!(cond)]) - 1)
#ifndef Py_MEMBER_SIZE
#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
#endif
#if CYTHON_FAST_PYCALL
  static size_t __pyx_pyframe_localsplus_offset = 0;
  #include "frameobject.h"
#if PY_VERSION_HEX >= 0x030b00a6
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
  #define __Pxy_PyFrame_Initialize_Offsets()\
    ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
     (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
  #define __Pyx_PyFrame_GetLocalsplus(frame)\
    (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
#endif // CYTHON_FAST_PYCALL
#endif

/* PyCFunctionFastCall.proto */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
#else
#define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
#endif

/* GetTopmostException.proto */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)

/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

/* RaiseException.proto */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);

/* SwapException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* Import.proto */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);

/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);

/* CLineInTraceback.proto */
#ifdef CYTHON_CLINE_IN_TRACEBACK
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#else
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#endif

/* CodeObjectCache.proto */
typedef struct {
    PyCodeObject* code_object;
    int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);

/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename);

/* GCCDiagnostics.proto */
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#define __Pyx_HAS_GCC_DIAGNOSTIC
#endif

/* None.proto */
static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void); /* proto */

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

/* CIntFromPy.proto */
static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_As_unsigned_PY_LONG_LONG(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(void);

/* FunctionExport.proto */
static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig);

/* FunctionImport.proto */
static int __Pyx_ImportFunction_0_29_35(PyObject *module, const char *funcname, void (**f)(void), const char *sig);

/* InitStrings.proto */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);


/* Module declarations from 'libc.stdint' */

/* Module declarations from 'cuda.ccuda' */
static CUresult (*__pyx_f_4cuda_5ccuda_cuGetProcAddress)(char const *, void **, int, cuuint64_t, CUdriverProcAddressQueryResult *); /*proto*/

/* Module declarations from 'cuda._cuda.loader' */

/* Module declarations from 'cuda._cuda.ccuda' */
static int __pyx_v_4cuda_5_cuda_5ccuda___cuPythonInit;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGetErrorString;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGetErrorName;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuInit;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDriverGetVersion;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGet;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetCount;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetName;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetUuid;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetUuid_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetLuid;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceTotalMem_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetTexture1DLinearMaxWidth;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetAttribute;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetNvSciSyncAttributes;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceSetMemPool;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetMemPool;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetDefaultMemPool;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetExecAffinitySupport;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuFlushGPUDirectRDMAWrites;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetProperties;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceComputeCapability;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxRetain;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxRelease_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxSetFlags_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxGetState;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxReset_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCtxCreate_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCtxCreate_v3;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCtxDestroy_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCtxPushCurrent_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCtxPopCurrent_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetCurrent;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetCurrent;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetDevice;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetFlags;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetFlags;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetId;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSynchronize;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetLimit;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetLimit;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetCacheConfig;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetCacheConfig;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetSharedMemConfig;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetSharedMemConfig;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetApiVersion;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetStreamPriorityRange;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCtxResetPersistingL2Cache;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetExecAffinity;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCtxAttach;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCtxDetach;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoad;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadData;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadDataEx;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadFatBinary;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuModuleUnload;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetLoadingMode;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetFunction;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetGlobal_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuLinkCreate_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuLinkAddData_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuLinkAddFile_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuLinkComplete;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuLinkDestroy;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetTexRef;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetSurfRef;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryLoadData;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryLoadFromFile;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryUnload;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetKernel;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetModule;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuKernelGetFunction;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetGlobal;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetManaged;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetUnifiedFunction;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuKernelGetAttribute;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuKernelSetAttribute;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuKernelSetCacheConfig;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetInfo_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemAlloc_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocPitch_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemFree_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAddressRange_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocHost_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemFreeHost;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostAlloc;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostGetDevicePointer_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostGetFlags;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocManaged;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetByPCIBusId;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetPCIBusId;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuIpcGetEventHandle;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuIpcOpenEventHandle;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuIpcGetMemHandle;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuIpcOpenMemHandle_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuIpcCloseMemHandle;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostRegister_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostUnregister;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyPeer;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoD_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoH_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoD_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoA_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoD_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoA_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoH_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoA_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2D_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2DUnaligned_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3D_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DPeer;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAsync;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyPeerAsync;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoDAsync_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoHAsync_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoDAsync_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoAAsync_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoHAsync_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2DAsync_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DAsync_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DPeerAsync;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD8_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD16_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD32_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D8_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D16_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D32_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD8Async;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD16Async;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD32Async;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D8Async;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D16Async;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D32Async;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuArrayCreate_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetDescriptor_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetSparseProperties;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetSparseProperties;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetMemoryRequirements;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetMemoryRequirements;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetPlane;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuArrayDestroy;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuArray3DCreate_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuArray3DGetDescriptor_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayCreate;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetLevel;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayDestroy;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetHandleForAddressRange;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemAddressReserve;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemAddressFree;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemCreate;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemRelease;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemMap;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemMapArrayAsync;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemUnmap;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemSetAccess;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAccess;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemExportToShareableHandle;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemImportFromShareableHandle;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAllocationGranularity;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAllocationPropertiesFromHandle;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemRetainAllocationHandle;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemFreeAsync;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocAsync;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolTrimTo;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolSetAttribute;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolGetAttribute;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolSetAccess;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolGetAccess;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolCreate;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolDestroy;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocFromPoolAsync;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolExportToShareableHandle;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolImportFromShareableHandle;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolExportPointer;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolImportPointer;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMulticastCreate;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMulticastAddDevice;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMulticastBindMem;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMulticastBindAddr;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMulticastUnbind;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMulticastGetGranularity;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuPointerGetAttribute;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemPrefetchAsync;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemPrefetchAsync_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemAdvise;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemAdvise_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemRangeGetAttribute;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemRangeGetAttributes;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuPointerSetAttribute;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuPointerGetAttributes;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuStreamCreate;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuStreamCreateWithPriority;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetPriority;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetFlags;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetId;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCtx;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitEvent;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuStreamAddCallback;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuStreamBeginCapture_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuThreadExchangeStreamCaptureMode;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuStreamEndCapture;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuStreamIsCapturing;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCaptureInfo_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuStreamUpdateCaptureDependencies;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuStreamAttachMemAsync;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuStreamQuery;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuStreamSynchronize;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuStreamDestroy_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuStreamCopyAttributes;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetAttribute;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuStreamSetAttribute;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuEventCreate;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuEventRecord;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuEventRecordWithFlags;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuEventQuery;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuEventSynchronize;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuEventDestroy_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuEventElapsedTime;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuImportExternalMemory;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuExternalMemoryGetMappedBuffer;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuExternalMemoryGetMappedMipmappedArray;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDestroyExternalMemory;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuImportExternalSemaphore;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuSignalExternalSemaphoresAsync;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuWaitExternalSemaphoresAsync;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDestroyExternalSemaphore;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue32_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue64_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue32_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue64_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuStreamBatchMemOp_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuFuncGetAttribute;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetAttribute;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetCacheConfig;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetSharedMemConfig;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuFuncGetModule;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchKernel;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchKernelEx;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchCooperativeKernel;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchCooperativeKernelMultiDevice;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchHostFunc;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetBlockShape;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetSharedSize;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuParamSetSize;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuParamSeti;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuParamSetf;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuParamSetv;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuLaunch;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchGrid;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchGridAsync;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuParamSetTexRef;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphCreate;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddKernelNode_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeGetParams_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeSetParams_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemcpyNode;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemcpyNodeGetParams;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemcpyNodeSetParams;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemsetNode;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemsetNodeGetParams;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemsetNodeSetParams;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddHostNode;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphHostNodeGetParams;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphHostNodeSetParams;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddChildGraphNode;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphChildGraphNodeGetGraph;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddEmptyNode;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddEventRecordNode;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventRecordNodeGetEvent;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventRecordNodeSetEvent;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddEventWaitNode;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventWaitNodeGetEvent;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventWaitNodeSetEvent;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddExternalSemaphoresSignalNode;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresSignalNodeGetParams;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresSignalNodeSetParams;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddExternalSemaphoresWaitNode;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresWaitNodeGetParams;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresWaitNodeSetParams;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddBatchMemOpNode;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphBatchMemOpNodeGetParams;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphBatchMemOpNodeSetParams;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecBatchMemOpNodeSetParams;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemAllocNode;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemAllocNodeGetParams;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemFreeNode;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemFreeNodeGetParams;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGraphMemTrim;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetGraphMemAttribute;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceSetGraphMemAttribute;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphClone;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeFindInClone;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetType;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphGetNodes;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphGetRootNodes;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphGetEdges;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetDependencies;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetDependentNodes;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddDependencies;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphRemoveDependencies;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphDestroyNode;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphInstantiateWithFlags;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphInstantiateWithParams;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecGetFlags;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecKernelNodeSetParams_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecMemcpyNodeSetParams;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecMemsetNodeSetParams;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecHostNodeSetParams;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecChildGraphNodeSetParams;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecEventRecordNodeSetEvent;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecEventWaitNodeSetEvent;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecExternalSemaphoresSignalNodeSetParams;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecExternalSemaphoresWaitNodeSetParams;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeSetEnabled;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetEnabled;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphUpload;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphLaunch;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecDestroy;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphDestroy;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecUpdate_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeCopyAttributes;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeGetAttribute;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeSetAttribute;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphDebugDotPrint;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuUserObjectCreate;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuUserObjectRetain;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuUserObjectRelease;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphRetainUserObject;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphReleaseUserObject;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddNode;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeSetParams;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecNodeSetParams;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxActiveBlocksPerMultiprocessor;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxPotentialBlockSize;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxPotentialBlockSizeWithFlags;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyAvailableDynamicSMemPerBlock;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxPotentialClusterSize;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxActiveClusters;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetArray;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmappedArray;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetAddress_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetAddress2D_v3;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFormat;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetAddressMode;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFilterMode;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapFilterMode;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapLevelBias;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapLevelClamp;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMaxAnisotropy;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetBorderColor;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFlags;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetAddress_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetArray;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmappedArray;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetAddressMode;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFilterMode;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFormat;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapFilterMode;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapLevelBias;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapLevelClamp;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMaxAnisotropy;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetBorderColor;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFlags;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefCreate;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefDestroy;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuSurfRefSetArray;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuSurfRefGetArray;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectCreate;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectDestroy;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetResourceDesc;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetTextureDesc;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetResourceViewDesc;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectCreate;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectDestroy;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectGetResourceDesc;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTensorMapEncodeTiled;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTensorMapEncodeIm2col;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuTensorMapReplaceAddress;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceCanAccessPeer;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCtxEnablePeerAccess;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCtxDisablePeerAccess;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetP2PAttribute;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsUnregisterResource;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsSubResourceGetMappedArray;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceGetMappedMipmappedArray;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceGetMappedPointer_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceSetMapFlags_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsMapResources;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsUnmapResources;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGetProcAddress_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCoredumpGetAttribute;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCoredumpGetAttributeGlobal;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCoredumpSetAttribute;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuCoredumpSetAttributeGlobal;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGetExportTable;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuProfilerStart;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuProfilerStop;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsEGLRegisterImage;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerConnect;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerConnectWithFlags;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerDisconnect;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerAcquireFrame;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerReleaseFrame;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerConnect;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerDisconnect;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerPresentFrame;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerReturnFrame;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceGetMappedEglFrame;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuEventCreateFromEGLSync;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsGLRegisterBuffer;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsGLRegisterImage;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGLGetDevices_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuVDPAUGetDevice;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuVDPAUCtxCreate_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsVDPAURegisterVideoSurface;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsVDPAURegisterOutputSurface;
static int __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(void); /*proto*/
#define __Pyx_MODULE_NAME "cuda._cuda.ccuda"
extern int __pyx_module_is_main_cuda___cuda__ccuda;
int __pyx_module_is_main_cuda___cuda__ccuda = 0;

/* Implementation of 'cuda._cuda.ccuda' */
static PyObject *__pyx_builtin_RuntimeError;
static const char __pyx_k_os[] = "os";
static const char __pyx_k_sys[] = "sys";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_error[] = "error";
static const char __pyx_k_cuInit[] = "cuInit";
static const char __pyx_k_getenv[] = "getenv";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_struct[] = "struct";
static const char __pyx_k_default[] = "default";
static const char __pyx_k_maxsize[] = "maxsize";
static const char __pyx_k_cuLaunch[] = "cuLaunch";
static const char __pyx_k_cuMemMap[] = "cuMemMap";
static const char __pyx_k_cuMemcpy[] = "cuMemcpy";
static const char __pyx_k_win32api[] = "win32api";
static const char __pyx_k_cuCtxGetId[] = "cuCtxGetId";
static const char __pyx_k_cuMemUnmap[] = "cuMemUnmap";
static const char __pyx_k_nvcuda_dll[] = "nvcuda.dll";
static const char __pyx_k_pywintypes[] = "pywintypes";
static const char __pyx_k_cuCtxAttach[] = "cuCtxAttach";
static const char __pyx_k_cuCtxDetach[] = "cuCtxDetach";
static const char __pyx_k_cuDeviceGet[] = "cuDeviceGet";
static const char __pyx_k_cuMemAdvise[] = "cuMemAdvise";
static const char __pyx_k_cuMemCreate[] = "cuMemCreate";
static const char __pyx_k_cuParamSetf[] = "cuParamSetf";
static const char __pyx_k_cuParamSeti[] = "cuParamSeti";
static const char __pyx_k_cuParamSetv[] = "cuParamSetv";
static const char __pyx_k_RuntimeError[] = "RuntimeError";
static const char __pyx_k_cuEventQuery[] = "cuEventQuery";
static const char __pyx_k_cuGraphClone[] = "cuGraphClone";
static const char __pyx_k_cuLaunchGrid[] = "cuLaunchGrid";
static const char __pyx_k_cuMemFree_v2[] = "cuMemFree_v2";
static const char __pyx_k_cuMemRelease[] = "cuMemRelease";
static const char __pyx_k_cuMemcpyPeer[] = "cuMemcpyPeer";
static const char __pyx_k_cuModuleLoad[] = "cuModuleLoad";
static const char __pyx_k_LoadLibraryEx[] = "LoadLibraryEx";
static const char __pyx_k_cuCtxGetFlags[] = "cuCtxGetFlags";
static const char __pyx_k_cuCtxGetLimit[] = "cuCtxGetLimit";
static const char __pyx_k_cuCtxSetFlags[] = "cuCtxSetFlags";
static const char __pyx_k_cuCtxSetLimit[] = "cuCtxSetLimit";
static const char __pyx_k_cuEventCreate[] = "cuEventCreate";
static const char __pyx_k_cuEventRecord[] = "cuEventRecord";
static const char __pyx_k_cuGraphCreate[] = "cuGraphCreate";
static const char __pyx_k_cuGraphLaunch[] = "cuGraphLaunch";
static const char __pyx_k_cuGraphUpload[] = "cuGraphUpload";
static const char __pyx_k_cuLinkDestroy[] = "cuLinkDestroy";
static const char __pyx_k_cuMemAlloc_v2[] = "cuMemAlloc_v2";
static const char __pyx_k_cuMemFreeHost[] = "cuMemFreeHost";
static const char __pyx_k_cuMemcpy2D_v2[] = "cuMemcpy2D_v2";
static const char __pyx_k_cuMemcpy3D_v2[] = "cuMemcpy3D_v2";
static const char __pyx_k_cuMemcpyAsync[] = "cuMemcpyAsync";
static const char __pyx_k_cuMemcpy_ptds[] = "cuMemcpy_ptds";
static const char __pyx_k_cuMemsetD8_v2[] = "cuMemsetD8_v2";
static const char __pyx_k_cuStreamGetId[] = "cuStreamGetId";
static const char __pyx_k_cuStreamQuery[] = "cuStreamQuery";
static const char __pyx_k_GetProcAddress[] = "GetProcAddress";
static const char __pyx_k_cuArrayDestroy[] = "cuArrayDestroy";
static const char __pyx_k_cuCtxCreate_v2[] = "cuCtxCreate_v2";
static const char __pyx_k_cuCtxCreate_v3[] = "cuCtxCreate_v3";
static const char __pyx_k_cuCtxGetDevice[] = "cuCtxGetDevice";
static const char __pyx_k_cuGetErrorName[] = "cuGetErrorName";
static const char __pyx_k_cuGraphAddNode[] = "cuGraphAddNode";
static const char __pyx_k_cuGraphDestroy[] = "cuGraphDestroy";
static const char __pyx_k_cuLaunchKernel[] = "cuLaunchKernel";
static const char __pyx_k_cuLinkComplete[] = "cuLinkComplete";
static const char __pyx_k_cuMemAdvise_v2[] = "cuMemAdvise_v2";
static const char __pyx_k_cuMemFreeAsync[] = "cuMemFreeAsync";
static const char __pyx_k_cuMemGetAccess[] = "cuMemGetAccess";
static const char __pyx_k_cuMemHostAlloc[] = "cuMemHostAlloc";
static const char __pyx_k_cuMemSetAccess[] = "cuMemSetAccess";
static const char __pyx_k_cuMemcpy3DPeer[] = "cuMemcpy3DPeer";
static const char __pyx_k_cuMemsetD16_v2[] = "cuMemsetD16_v2";
static const char __pyx_k_cuMemsetD32_v2[] = "cuMemsetD32_v2";
static const char __pyx_k_cuModuleUnload[] = "cuModuleUnload";
static const char __pyx_k_cuParamSetSize[] = "cuParamSetSize";
static const char __pyx_k_cuProfilerStop[] = "cuProfilerStop";
static const char __pyx_k_cuStreamCreate[] = "cuStreamCreate";
static const char __pyx_k_cuStreamGetCtx[] = "cuStreamGetCtx";
static const char __pyx_k_cuTexRefCreate[] = "cuTexRefCreate";
static const char __pyx_k_cuArrayGetPlane[] = "cuArrayGetPlane";
static const char __pyx_k_cuCtxDestroy_v2[] = "cuCtxDestroy_v2";
static const char __pyx_k_cuCtxGetCurrent[] = "cuCtxGetCurrent";
static const char __pyx_k_cuCtxSetCurrent[] = "cuCtxSetCurrent";
static const char __pyx_k_cuDeviceGetLuid[] = "cuDeviceGetLuid";
static const char __pyx_k_cuDeviceGetName[] = "cuDeviceGetName";
static const char __pyx_k_cuDeviceGetUuid[] = "cuDeviceGetUuid";
static const char __pyx_k_cuFuncGetModule[] = "cuFuncGetModule";
static const char __pyx_k_cuGraphGetEdges[] = "cuGraphGetEdges";
static const char __pyx_k_cuGraphGetNodes[] = "cuGraphGetNodes";
static const char __pyx_k_cuLibraryUnload[] = "cuLibraryUnload";
static const char __pyx_k_cuLinkCreate_v2[] = "cuLinkCreate_v2";
static const char __pyx_k_cuMemAllocAsync[] = "cuMemAllocAsync";
static const char __pyx_k_cuMemGetInfo_v2[] = "cuMemGetInfo_v2";
static const char __pyx_k_cuMemPoolCreate[] = "cuMemPoolCreate";
static const char __pyx_k_cuMemPoolTrimTo[] = "cuMemPoolTrimTo";
static const char __pyx_k_cuMemcpyAtoA_v2[] = "cuMemcpyAtoA_v2";
static const char __pyx_k_cuMemcpyAtoD_v2[] = "cuMemcpyAtoD_v2";
static const char __pyx_k_cuMemcpyAtoH_v2[] = "cuMemcpyAtoH_v2";
static const char __pyx_k_cuMemcpyDtoA_v2[] = "cuMemcpyDtoA_v2";
static const char __pyx_k_cuMemcpyDtoD_v2[] = "cuMemcpyDtoD_v2";
static const char __pyx_k_cuMemcpyDtoH_v2[] = "cuMemcpyDtoH_v2";
static const char __pyx_k_cuMemcpyHtoA_v2[] = "cuMemcpyHtoA_v2";
static const char __pyx_k_cuMemcpyHtoD_v2[] = "cuMemcpyHtoD_v2";
static const char __pyx_k_cuMemsetD2D8_v2[] = "cuMemsetD2D8_v2";
static const char __pyx_k_cuMemsetD8Async[] = "cuMemsetD8Async";
static const char __pyx_k_cuProfilerStart[] = "cuProfilerStart";
static const char __pyx_k_cuTexRefDestroy[] = "cuTexRefDestroy";
static const char __pyx_k_cuArrayCreate_v2[] = "cuArrayCreate_v2";
static const char __pyx_k_cuCtxSynchronize[] = "cuCtxSynchronize";
static const char __pyx_k_cuDeviceGetCount[] = "cuDeviceGetCount";
static const char __pyx_k_cuGetErrorString[] = "cuGetErrorString";
static const char __pyx_k_cuGetExportTable[] = "cuGetExportTable";
static const char __pyx_k_cuLaunchHostFunc[] = "cuLaunchHostFunc";
static const char __pyx_k_cuLaunchKernelEx[] = "cuLaunchKernelEx";
static const char __pyx_k_cuLinkAddData_v2[] = "cuLinkAddData_v2";
static const char __pyx_k_cuLinkAddFile_v2[] = "cuLinkAddFile_v2";
static const char __pyx_k_cuMemAddressFree[] = "cuMemAddressFree";
static const char __pyx_k_cuMemPoolDestroy[] = "cuMemPoolDestroy";
static const char __pyx_k_cuMemsetD16Async[] = "cuMemsetD16Async";
static const char __pyx_k_cuMemsetD2D16_v2[] = "cuMemsetD2D16_v2";
static const char __pyx_k_cuMemsetD2D32_v2[] = "cuMemsetD2D32_v2";
static const char __pyx_k_cuMemsetD32Async[] = "cuMemsetD32Async";
static const char __pyx_k_cuModuleLoadData[] = "cuModuleLoadData";
static const char __pyx_k_cuParamSetTexRef[] = "cuParamSetTexRef";
static const char __pyx_k_cuStreamGetFlags[] = "cuStreamGetFlags";
static const char __pyx_k_cuTexRefGetArray[] = "cuTexRefGetArray";
static const char __pyx_k_cuTexRefGetFlags[] = "cuTexRefGetFlags";
static const char __pyx_k_cuTexRefSetArray[] = "cuTexRefSetArray";
static const char __pyx_k_cuTexRefSetFlags[] = "cuTexRefSetFlags";
static const char __pyx_k_cuVDPAUGetDevice[] = "cuVDPAUGetDevice";
static const char __pyx_k_cuEventDestroy_v2[] = "cuEventDestroy_v2";
static const char __pyx_k_cuGLGetDevices_v2[] = "cuGLGetDevices_v2";
static const char __pyx_k_cuIpcGetMemHandle[] = "cuIpcGetMemHandle";
static const char __pyx_k_cuLaunchGridAsync[] = "cuLaunchGridAsync";
static const char __pyx_k_cuLibraryLoadData[] = "cuLibraryLoadData";
static const char __pyx_k_cuMemAllocHost_v2[] = "cuMemAllocHost_v2";
static const char __pyx_k_cuMemAllocManaged[] = "cuMemAllocManaged";
static const char __pyx_k_cuMemHostGetFlags[] = "cuMemHostGetFlags";
static const char __pyx_k_cuMemcpyPeerAsync[] = "cuMemcpyPeerAsync";
static const char __pyx_k_cuMemcpyPeer_ptds[] = "cuMemcpyPeer_ptds";
static const char __pyx_k_cuMemsetD2D8Async[] = "cuMemsetD2D8Async";
static const char __pyx_k_cuModuleGetTexRef[] = "cuModuleGetTexRef";
static const char __pyx_k_cuMulticastCreate[] = "cuMulticastCreate";
static const char __pyx_k_cuMulticastUnbind[] = "cuMulticastUnbind";
static const char __pyx_k_cuStreamWaitEvent[] = "cuStreamWaitEvent";
static const char __pyx_k_cuSurfRefGetArray[] = "cuSurfRefGetArray";
static const char __pyx_k_cuSurfRefSetArray[] = "cuSurfRefSetArray";
static const char __pyx_k_cuTexObjectCreate[] = "cuTexObjectCreate";
static const char __pyx_k_cuTexRefGetFormat[] = "cuTexRefGetFormat";
static const char __pyx_k_cuTexRefSetFormat[] = "cuTexRefSetFormat";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_cuArray3DCreate_v2[] = "cuArray3DCreate_v2";
static const char __pyx_k_cuCtxGetApiVersion[] = "cuCtxGetApiVersion";
static const char __pyx_k_cuCtxPopCurrent_v2[] = "cuCtxPopCurrent_v2";
static const char __pyx_k_cuDeviceGetMemPool[] = "cuDeviceGetMemPool";
static const char __pyx_k_cuDeviceGetUuid_v2[] = "cuDeviceGetUuid_v2";
static const char __pyx_k_cuDeviceSetMemPool[] = "cuDeviceSetMemPool";
static const char __pyx_k_cuDriverGetVersion[] = "cuDriverGetVersion";
static const char __pyx_k_cuEventElapsedTime[] = "cuEventElapsedTime";
static const char __pyx_k_cuEventRecord_ptsz[] = "cuEventRecord_ptsz";
static const char __pyx_k_cuEventSynchronize[] = "cuEventSynchronize";
static const char __pyx_k_cuFuncGetAttribute[] = "cuFuncGetAttribute";
static const char __pyx_k_cuFuncSetAttribute[] = "cuFuncSetAttribute";
static const char __pyx_k_cuGraphAddHostNode[] = "cuGraphAddHostNode";
static const char __pyx_k_cuGraphDestroyNode[] = "cuGraphDestroyNode";
static const char __pyx_k_cuGraphExecDestroy[] = "cuGraphExecDestroy";
static const char __pyx_k_cuGraphLaunch_ptsz[] = "cuGraphLaunch_ptsz";
static const char __pyx_k_cuGraphNodeGetType[] = "cuGraphNodeGetType";
static const char __pyx_k_cuGraphUpload_ptsz[] = "cuGraphUpload_ptsz";
static const char __pyx_k_cuLibraryGetGlobal[] = "cuLibraryGetGlobal";
static const char __pyx_k_cuLibraryGetKernel[] = "cuLibraryGetKernel";
static const char __pyx_k_cuLibraryGetModule[] = "cuLibraryGetModule";
static const char __pyx_k_cuMemAllocPitch_v2[] = "cuMemAllocPitch_v2";
static const char __pyx_k_cuMemMapArrayAsync[] = "cuMemMapArrayAsync";
static const char __pyx_k_cuMemPoolGetAccess[] = "cuMemPoolGetAccess";
static const char __pyx_k_cuMemPoolSetAccess[] = "cuMemPoolSetAccess";
static const char __pyx_k_cuMemPrefetchAsync[] = "cuMemPrefetchAsync";
static const char __pyx_k_cuMemcpy2DAsync_v2[] = "cuMemcpy2DAsync_v2";
static const char __pyx_k_cuMemcpy2D_v2_ptds[] = "cuMemcpy2D_v2_ptds";
static const char __pyx_k_cuMemcpy3DAsync_v2[] = "cuMemcpy3DAsync_v2";
static const char __pyx_k_cuMemcpy3D_v2_ptds[] = "cuMemcpy3D_v2_ptds";
static const char __pyx_k_cuMemcpyAsync_ptsz[] = "cuMemcpyAsync_ptsz";
static const char __pyx_k_cuMemsetD2D16Async[] = "cuMemsetD2D16Async";
static const char __pyx_k_cuMemsetD2D32Async[] = "cuMemsetD2D32Async";
static const char __pyx_k_cuMemsetD8_v2_ptds[] = "cuMemsetD8_v2_ptds";
static const char __pyx_k_cuModuleGetSurfRef[] = "cuModuleGetSurfRef";
static const char __pyx_k_cuModuleLoadDataEx[] = "cuModuleLoadDataEx";
static const char __pyx_k_cuMulticastBindMem[] = "cuMulticastBindMem";
static const char __pyx_k_cuStreamDestroy_v2[] = "cuStreamDestroy_v2";
static const char __pyx_k_cuStreamEndCapture[] = "cuStreamEndCapture";
static const char __pyx_k_cuStreamGetId_ptsz[] = "cuStreamGetId_ptsz";
static const char __pyx_k_cuStreamQuery_ptsz[] = "cuStreamQuery_ptsz";
static const char __pyx_k_cuSurfObjectCreate[] = "cuSurfObjectCreate";
static const char __pyx_k_cuTexObjectDestroy[] = "cuTexObjectDestroy";
static const char __pyx_k_cuUserObjectCreate[] = "cuUserObjectCreate";
static const char __pyx_k_cuUserObjectRetain[] = "cuUserObjectRetain";
static const char __pyx_k_cuCtxGetCacheConfig[] = "cuCtxGetCacheConfig";
static const char __pyx_k_cuCtxPushCurrent_v2[] = "cuCtxPushCurrent_v2";
static const char __pyx_k_cuCtxSetCacheConfig[] = "cuCtxSetCacheConfig";
static const char __pyx_k_cuDeviceGetPCIBusId[] = "cuDeviceGetPCIBusId";
static const char __pyx_k_cuDeviceTotalMem_v2[] = "cuDeviceTotalMem_v2";
static const char __pyx_k_cuFuncSetBlockShape[] = "cuFuncSetBlockShape";
static const char __pyx_k_cuFuncSetSharedSize[] = "cuFuncSetSharedSize";
static const char __pyx_k_cuGetProcAddress_v2[] = "cuGetProcAddress_v2";
static const char __pyx_k_cuGraphAddEmptyNode[] = "cuGraphAddEmptyNode";
static const char __pyx_k_cuGraphExecGetFlags[] = "cuGraphExecGetFlags";
static const char __pyx_k_cuGraphGetRootNodes[] = "cuGraphGetRootNodes";
static const char __pyx_k_cuIpcCloseMemHandle[] = "cuIpcCloseMemHandle";
static const char __pyx_k_cuIpcGetEventHandle[] = "cuIpcGetEventHandle";
static const char __pyx_k_cuKernelGetFunction[] = "cuKernelGetFunction";
static const char __pyx_k_cuLaunchKernel_ptsz[] = "cuLaunchKernel_ptsz";
static const char __pyx_k_cuLibraryGetManaged[] = "cuLibraryGetManaged";
static const char __pyx_k_cuMemAddressReserve[] = "cuMemAddressReserve";
static const char __pyx_k_cuMemFreeAsync_ptsz[] = "cuMemFreeAsync_ptsz";
static const char __pyx_k_cuMemHostUnregister[] = "cuMemHostUnregister";
static const char __pyx_k_cuMemcpy3DPeerAsync[] = "cuMemcpy3DPeerAsync";
static const char __pyx_k_cuMemcpy3DPeer_ptds[] = "cuMemcpy3DPeer_ptds";
static const char __pyx_k_cuMemsetD16_v2_ptds[] = "cuMemsetD16_v2_ptds";
static const char __pyx_k_cuMemsetD32_v2_ptds[] = "cuMemsetD32_v2_ptds";
static const char __pyx_k_cuModuleGetFunction[] = "cuModuleGetFunction";
static const char __pyx_k_cuMulticastBindAddr[] = "cuMulticastBindAddr";
static const char __pyx_k_cuStreamAddCallback[] = "cuStreamAddCallback";
static const char __pyx_k_cuStreamGetCtx_ptsz[] = "cuStreamGetCtx_ptsz";
static const char __pyx_k_cuStreamGetPriority[] = "cuStreamGetPriority";
static const char __pyx_k_cuStreamIsCapturing[] = "cuStreamIsCapturing";
static const char __pyx_k_cuStreamSynchronize[] = "cuStreamSynchronize";
static const char __pyx_k_cuSurfObjectDestroy[] = "cuSurfObjectDestroy";
static const char __pyx_k_cuUserObjectRelease[] = "cuUserObjectRelease";
static const char __pyx_k_cuVDPAUCtxCreate_v2[] = "cuVDPAUCtxCreate_v2";
static const char __pyx_k_cuCtxGetExecAffinity[] = "cuCtxGetExecAffinity";
static const char __pyx_k_cuDeviceGetAttribute[] = "cuDeviceGetAttribute";
static const char __pyx_k_cuDeviceGraphMemTrim[] = "cuDeviceGraphMemTrim";
static const char __pyx_k_cuFuncSetCacheConfig[] = "cuFuncSetCacheConfig";
static const char __pyx_k_cuGraphAddMemcpyNode[] = "cuGraphAddMemcpyNode";
static const char __pyx_k_cuGraphAddMemsetNode[] = "cuGraphAddMemsetNode";
static const char __pyx_k_cuGraphDebugDotPrint[] = "cuGraphDebugDotPrint";
static const char __pyx_k_cuGraphExecUpdate_v2[] = "cuGraphExecUpdate_v2";
static const char __pyx_k_cuGraphNodeSetParams[] = "cuGraphNodeSetParams";
static const char __pyx_k_cuIpcOpenEventHandle[] = "cuIpcOpenEventHandle";
static const char __pyx_k_cuKernelGetAttribute[] = "cuKernelGetAttribute";
static const char __pyx_k_cuKernelSetAttribute[] = "cuKernelSetAttribute";
static const char __pyx_k_cuMemAllocAsync_ptsz[] = "cuMemAllocAsync_ptsz";
static const char __pyx_k_cuMemHostRegister_v2[] = "cuMemHostRegister_v2";
static const char __pyx_k_cuMemcpyAtoA_v2_ptds[] = "cuMemcpyAtoA_v2_ptds";
static const char __pyx_k_cuMemcpyAtoD_v2_ptds[] = "cuMemcpyAtoD_v2_ptds";
static const char __pyx_k_cuMemcpyAtoHAsync_v2[] = "cuMemcpyAtoHAsync_v2";
static const char __pyx_k_cuMemcpyAtoH_v2_ptds[] = "cuMemcpyAtoH_v2_ptds";
static const char __pyx_k_cuMemcpyDtoA_v2_ptds[] = "cuMemcpyDtoA_v2_ptds";
static const char __pyx_k_cuMemcpyDtoDAsync_v2[] = "cuMemcpyDtoDAsync_v2";
static const char __pyx_k_cuMemcpyDtoD_v2_ptds[] = "cuMemcpyDtoD_v2_ptds";
static const char __pyx_k_cuMemcpyDtoHAsync_v2[] = "cuMemcpyDtoHAsync_v2";
static const char __pyx_k_cuMemcpyDtoH_v2_ptds[] = "cuMemcpyDtoH_v2_ptds";
static const char __pyx_k_cuMemcpyHtoAAsync_v2[] = "cuMemcpyHtoAAsync_v2";
static const char __pyx_k_cuMemcpyHtoA_v2_ptds[] = "cuMemcpyHtoA_v2_ptds";
static const char __pyx_k_cuMemcpyHtoDAsync_v2[] = "cuMemcpyHtoDAsync_v2";
static const char __pyx_k_cuMemcpyHtoD_v2_ptds[] = "cuMemcpyHtoD_v2_ptds";
static const char __pyx_k_cuMemsetD2D8_v2_ptds[] = "cuMemsetD2D8_v2_ptds";
static const char __pyx_k_cuMemsetD8Async_ptsz[] = "cuMemsetD8Async_ptsz";
static const char __pyx_k_cuModuleGetGlobal_v2[] = "cuModuleGetGlobal_v2";
static const char __pyx_k_cuMulticastAddDevice[] = "cuMulticastAddDevice";
static const char __pyx_k_cuStreamGetAttribute[] = "cuStreamGetAttribute";
static const char __pyx_k_cuStreamSetAttribute[] = "cuStreamSetAttribute";
static const char __pyx_k_cuCtxEnablePeerAccess[] = "cuCtxEnablePeerAccess";
static const char __pyx_k_cuDeviceCanAccessPeer[] = "cuDeviceCanAccessPeer";
static const char __pyx_k_cuDeviceGetByPCIBusId[] = "cuDeviceGetByPCIBusId";
static const char __pyx_k_cuDeviceGetProperties[] = "cuDeviceGetProperties";
static const char __pyx_k_cuGraphAddMemFreeNode[] = "cuGraphAddMemFreeNode";
static const char __pyx_k_cuGraphNodeGetEnabled[] = "cuGraphNodeGetEnabled";
static const char __pyx_k_cuGraphNodeSetEnabled[] = "cuGraphNodeSetEnabled";
static const char __pyx_k_cuIpcOpenMemHandle_v2[] = "cuIpcOpenMemHandle_v2";
static const char __pyx_k_cuLaunchHostFunc_ptsz[] = "cuLaunchHostFunc_ptsz";
static const char __pyx_k_cuLaunchKernelEx_ptsz[] = "cuLaunchKernelEx_ptsz";
static const char __pyx_k_cuLibraryLoadFromFile[] = "cuLibraryLoadFromFile";
static const char __pyx_k_cuMemPoolGetAttribute[] = "cuMemPoolGetAttribute";
static const char __pyx_k_cuMemPoolSetAttribute[] = "cuMemPoolSetAttribute";
static const char __pyx_k_cuMemPrefetchAsync_v2[] = "cuMemPrefetchAsync_v2";
static const char __pyx_k_cuMemsetD16Async_ptsz[] = "cuMemsetD16Async_ptsz";
static const char __pyx_k_cuMemsetD2D16_v2_ptds[] = "cuMemsetD2D16_v2_ptds";
static const char __pyx_k_cuMemsetD2D32_v2_ptds[] = "cuMemsetD2D32_v2_ptds";
static const char __pyx_k_cuMemsetD32Async_ptsz[] = "cuMemsetD32Async_ptsz";
static const char __pyx_k_cuModuleLoadFatBinary[] = "cuModuleLoadFatBinary";
static const char __pyx_k_cuPointerGetAttribute[] = "cuPointerGetAttribute";
static const char __pyx_k_cuPointerSetAttribute[] = "cuPointerSetAttribute";
static const char __pyx_k_cuStreamBatchMemOp_v2[] = "cuStreamBatchMemOp_v2";
static const char __pyx_k_cuStreamGetFlags_ptsz[] = "cuStreamGetFlags_ptsz";
static const char __pyx_k_cuTexRefGetAddress_v2[] = "cuTexRefGetAddress_v2";
static const char __pyx_k_cuTexRefGetFilterMode[] = "cuTexRefGetFilterMode";
static const char __pyx_k_cuTexRefSetAddress_v2[] = "cuTexRefSetAddress_v2";
static const char __pyx_k_cuTexRefSetFilterMode[] = "cuTexRefSetFilterMode";
static const char __pyx_k_cuCoredumpGetAttribute[] = "cuCoredumpGetAttribute";
static const char __pyx_k_cuCoredumpSetAttribute[] = "cuCoredumpSetAttribute";
static const char __pyx_k_cuCtxDisablePeerAccess[] = "cuCtxDisablePeerAccess";
static const char __pyx_k_cuEventRecordWithFlags[] = "cuEventRecordWithFlags";
static const char __pyx_k_cuGraphAddDependencies[] = "cuGraphAddDependencies";
static const char __pyx_k_cuGraphAddMemAllocNode[] = "cuGraphAddMemAllocNode";
static const char __pyx_k_cuGraphNodeFindInClone[] = "cuGraphNodeFindInClone";
static const char __pyx_k_cuGraphicsMapResources[] = "cuGraphicsMapResources";
static const char __pyx_k_cuImportExternalMemory[] = "cuImportExternalMemory";
static const char __pyx_k_cuKernelSetCacheConfig[] = "cuKernelSetCacheConfig";
static const char __pyx_k_cuMemPoolExportPointer[] = "cuMemPoolExportPointer";
static const char __pyx_k_cuMemPoolImportPointer[] = "cuMemPoolImportPointer";
static const char __pyx_k_cuMemRangeGetAttribute[] = "cuMemRangeGetAttribute";
static const char __pyx_k_cuMemcpy2DUnaligned_v2[] = "cuMemcpy2DUnaligned_v2";
static const char __pyx_k_cuMemcpyPeerAsync_ptsz[] = "cuMemcpyPeerAsync_ptsz";
static const char __pyx_k_cuMemsetD2D8Async_ptsz[] = "cuMemsetD2D8Async_ptsz";
static const char __pyx_k_cuMipmappedArrayCreate[] = "cuMipmappedArrayCreate";
static const char __pyx_k_cuModuleGetLoadingMode[] = "cuModuleGetLoadingMode";
static const char __pyx_k_cuPointerGetAttributes[] = "cuPointerGetAttributes";
static const char __pyx_k_cuStreamAttachMemAsync[] = "cuStreamAttachMemAsync";
static const char __pyx_k_cuStreamCopyAttributes[] = "cuStreamCopyAttributes";
static const char __pyx_k_cuStreamWaitEvent_ptsz[] = "cuStreamWaitEvent_ptsz";
static const char __pyx_k_cuStreamWaitValue32_v2[] = "cuStreamWaitValue32_v2";
static const char __pyx_k_cuStreamWaitValue64_v2[] = "cuStreamWaitValue64_v2";
static const char __pyx_k_cuTensorMapEncodeTiled[] = "cuTensorMapEncodeTiled";
static const char __pyx_k_cuTexRefGetAddressMode[] = "cuTexRefGetAddressMode";
static const char __pyx_k_cuTexRefGetBorderColor[] = "cuTexRefGetBorderColor";
static const char __pyx_k_cuTexRefSetAddressMode[] = "cuTexRefSetAddressMode";
static const char __pyx_k_cuTexRefSetBorderColor[] = "cuTexRefSetBorderColor";
static const char __pyx_k_Failed_to_LoadLibraryEx[] = "Failed to LoadLibraryEx ";
static const char __pyx_k_cuArrayGetDescriptor_v2[] = "cuArrayGetDescriptor_v2";
static const char __pyx_k_cuCtxGetSharedMemConfig[] = "cuCtxGetSharedMemConfig";
static const char __pyx_k_cuCtxSetSharedMemConfig[] = "cuCtxSetSharedMemConfig";
static const char __pyx_k_cuDestroyExternalMemory[] = "cuDestroyExternalMemory";
static const char __pyx_k_cuDeviceGetP2PAttribute[] = "cuDeviceGetP2PAttribute";
static const char __pyx_k_cuGraphAddEventWaitNode[] = "cuGraphAddEventWaitNode";
static const char __pyx_k_cuGraphAddKernelNode_v2[] = "cuGraphAddKernelNode_v2";
static const char __pyx_k_cuGraphRetainUserObject[] = "cuGraphRetainUserObject";
static const char __pyx_k_cuMemAllocFromPoolAsync[] = "cuMemAllocFromPoolAsync";
static const char __pyx_k_cuMemGetAddressRange_v2[] = "cuMemGetAddressRange_v2";
static const char __pyx_k_cuMemMapArrayAsync_ptsz[] = "cuMemMapArrayAsync_ptsz";
static const char __pyx_k_cuMemPrefetchAsync_ptsz[] = "cuMemPrefetchAsync_ptsz";
static const char __pyx_k_cuMemRangeGetAttributes[] = "cuMemRangeGetAttributes";
static const char __pyx_k_cuMemcpy2DAsync_v2_ptsz[] = "cuMemcpy2DAsync_v2_ptsz";
static const char __pyx_k_cuMemcpy3DAsync_v2_ptsz[] = "cuMemcpy3DAsync_v2_ptsz";
static const char __pyx_k_cuMemsetD2D16Async_ptsz[] = "cuMemsetD2D16Async_ptsz";
static const char __pyx_k_cuMemsetD2D32Async_ptsz[] = "cuMemsetD2D32Async_ptsz";
static const char __pyx_k_cuMipmappedArrayDestroy[] = "cuMipmappedArrayDestroy";
static const char __pyx_k_cuStreamBeginCapture_v2[] = "cuStreamBeginCapture_v2";
static const char __pyx_k_cuStreamEndCapture_ptsz[] = "cuStreamEndCapture_ptsz";
static const char __pyx_k_cuStreamWriteValue32_v2[] = "cuStreamWriteValue32_v2";
static const char __pyx_k_cuStreamWriteValue64_v2[] = "cuStreamWriteValue64_v2";
static const char __pyx_k_cuTensorMapEncodeIm2col[] = "cuTensorMapEncodeIm2col";
static const char __pyx_k_cuTexRefSetAddress2D_v3[] = "cuTexRefSetAddress2D_v3";
static const char __pyx_k_cuDevicePrimaryCtxRetain[] = "cuDevicePrimaryCtxRetain";
static const char __pyx_k_cuEventCreateFromEGLSync[] = "cuEventCreateFromEGLSync";
static const char __pyx_k_cuFuncSetSharedMemConfig[] = "cuFuncSetSharedMemConfig";
static const char __pyx_k_cuGraphAddBatchMemOpNode[] = "cuGraphAddBatchMemOpNode";
static const char __pyx_k_cuGraphAddChildGraphNode[] = "cuGraphAddChildGraphNode";
static const char __pyx_k_cuGraphExecNodeSetParams[] = "cuGraphExecNodeSetParams";
static const char __pyx_k_cuGraphHostNodeGetParams[] = "cuGraphHostNodeGetParams";
static const char __pyx_k_cuGraphHostNodeSetParams[] = "cuGraphHostNodeSetParams";
static const char __pyx_k_cuGraphReleaseUserObject[] = "cuGraphReleaseUserObject";
static const char __pyx_k_cuGraphicsUnmapResources[] = "cuGraphicsUnmapResources";
static const char __pyx_k_cuMemcpy3DPeerAsync_ptsz[] = "cuMemcpy3DPeerAsync_ptsz";
static const char __pyx_k_cuMipmappedArrayGetLevel[] = "cuMipmappedArrayGetLevel";
static const char __pyx_k_cuStreamAddCallback_ptsz[] = "cuStreamAddCallback_ptsz";
static const char __pyx_k_cuStreamGetPriority_ptsz[] = "cuStreamGetPriority_ptsz";
static const char __pyx_k_cuStreamIsCapturing_ptsz[] = "cuStreamIsCapturing_ptsz";
static const char __pyx_k_cuStreamSynchronize_ptsz[] = "cuStreamSynchronize_ptsz";
static const char __pyx_k_cuTexRefGetMaxAnisotropy[] = "cuTexRefGetMaxAnisotropy";
static const char __pyx_k_cuTexRefSetMaxAnisotropy[] = "cuTexRefSetMaxAnisotropy";
static const char __pyx_k_Function_cuInit_not_found[] = "Function \"cuInit\" not found";
static const char __pyx_k_cuArray3DGetDescriptor_v2[] = "cuArray3DGetDescriptor_v2";
static const char __pyx_k_cuDeviceComputeCapability[] = "cuDeviceComputeCapability";
static const char __pyx_k_cuDeviceGetDefaultMemPool[] = "cuDeviceGetDefaultMemPool";
static const char __pyx_k_cuGraphAddEventRecordNode[] = "cuGraphAddEventRecordNode";
static const char __pyx_k_cuGraphRemoveDependencies[] = "cuGraphRemoveDependencies";
static const char __pyx_k_cuGraphicsGLRegisterImage[] = "cuGraphicsGLRegisterImage";
static const char __pyx_k_cuImportExternalSemaphore[] = "cuImportExternalSemaphore";
static const char __pyx_k_cuLaunchCooperativeKernel[] = "cuLaunchCooperativeKernel";
static const char __pyx_k_cuMemcpyAtoHAsync_v2_ptsz[] = "cuMemcpyAtoHAsync_v2_ptsz";
static const char __pyx_k_cuMemcpyDtoDAsync_v2_ptsz[] = "cuMemcpyDtoDAsync_v2_ptsz";
static const char __pyx_k_cuMemcpyDtoHAsync_v2_ptsz[] = "cuMemcpyDtoHAsync_v2_ptsz";
static const char __pyx_k_cuMemcpyHtoAAsync_v2_ptsz[] = "cuMemcpyHtoAAsync_v2_ptsz";
static const char __pyx_k_cuMemcpyHtoDAsync_v2_ptsz[] = "cuMemcpyHtoDAsync_v2_ptsz";
static const char __pyx_k_cuMulticastGetGranularity[] = "cuMulticastGetGranularity";
static const char __pyx_k_cuStreamGetAttribute_ptsz[] = "cuStreamGetAttribute_ptsz";
static const char __pyx_k_cuStreamGetCaptureInfo_v2[] = "cuStreamGetCaptureInfo_v2";
static const char __pyx_k_cuStreamSetAttribute_ptsz[] = "cuStreamSetAttribute_ptsz";
static const char __pyx_k_cuTensorMapReplaceAddress[] = "cuTensorMapReplaceAddress";
static const char __pyx_k_cuTexObjectGetTextureDesc[] = "cuTexObjectGetTextureDesc";
static const char __pyx_k_cuTexRefGetMipmappedArray[] = "cuTexRefGetMipmappedArray";
static const char __pyx_k_cuTexRefSetMipmappedArray[] = "cuTexRefSetMipmappedArray";
static const char __pyx_k_cuArrayGetSparseProperties[] = "cuArrayGetSparseProperties";
static const char __pyx_k_cuDestroyExternalSemaphore[] = "cuDestroyExternalSemaphore";
static const char __pyx_k_cuDevicePrimaryCtxGetState[] = "cuDevicePrimaryCtxGetState";
static const char __pyx_k_cuDevicePrimaryCtxReset_v2[] = "cuDevicePrimaryCtxReset_v2";
static const char __pyx_k_cuEGLStreamConsumerConnect[] = "cuEGLStreamConsumerConnect";
static const char __pyx_k_cuEGLStreamProducerConnect[] = "cuEGLStreamProducerConnect";
static const char __pyx_k_cuFlushGPUDirectRDMAWrites[] = "cuFlushGPUDirectRDMAWrites";
static const char __pyx_k_cuGraphMemcpyNodeGetParams[] = "cuGraphMemcpyNodeGetParams";
static const char __pyx_k_cuGraphMemcpyNodeSetParams[] = "cuGraphMemcpyNodeSetParams";
static const char __pyx_k_cuGraphMemsetNodeGetParams[] = "cuGraphMemsetNodeGetParams";
static const char __pyx_k_cuGraphMemsetNodeSetParams[] = "cuGraphMemsetNodeSetParams";
static const char __pyx_k_cuGraphNodeGetDependencies[] = "cuGraphNodeGetDependencies";
static const char __pyx_k_cuGraphicsEGLRegisterImage[] = "cuGraphicsEGLRegisterImage";
static const char __pyx_k_cuGraphicsGLRegisterBuffer[] = "cuGraphicsGLRegisterBuffer";
static const char __pyx_k_cuMemPrefetchAsync_v2_ptsz[] = "cuMemPrefetchAsync_v2_ptsz";
static const char __pyx_k_cuStreamBatchMemOp_v2_ptsz[] = "cuStreamBatchMemOp_v2_ptsz";
static const char __pyx_k_cuStreamCreateWithPriority[] = "cuStreamCreateWithPriority";
static const char __pyx_k_cuTexObjectGetResourceDesc[] = "cuTexObjectGetResourceDesc";
static const char __pyx_k_cuTexRefGetMipmapLevelBias[] = "cuTexRefGetMipmapLevelBias";
static const char __pyx_k_cuTexRefSetMipmapLevelBias[] = "cuTexRefSetMipmapLevelBias";
static const char __pyx_k_Function_cuLaunch_not_found[] = "Function \"cuLaunch\" not found";
static const char __pyx_k_Function_cuMemMap_not_found[] = "Function \"cuMemMap\" not found";
static const char __pyx_k_Function_cuMemcpy_not_found[] = "Function \"cuMemcpy\" not found";
static const char __pyx_k_cuCtxGetStreamPriorityRange[] = "cuCtxGetStreamPriorityRange";
static const char __pyx_k_cuCtxResetPersistingL2Cache[] = "cuCtxResetPersistingL2Cache";
static const char __pyx_k_cuEventRecordWithFlags_ptsz[] = "cuEventRecordWithFlags_ptsz";
static const char __pyx_k_cuGraphInstantiateWithFlags[] = "cuGraphInstantiateWithFlags";
static const char __pyx_k_cuGraphMemFreeNodeGetParams[] = "cuGraphMemFreeNodeGetParams";
static const char __pyx_k_cuGraphicsMapResources_ptsz[] = "cuGraphicsMapResources_ptsz";
static const char __pyx_k_cuLibraryGetUnifiedFunction[] = "cuLibraryGetUnifiedFunction";
static const char __pyx_k_cuMemRetainAllocationHandle[] = "cuMemRetainAllocationHandle";
static const char __pyx_k_cuMemcpy2DUnaligned_v2_ptds[] = "cuMemcpy2DUnaligned_v2_ptds";
static const char __pyx_k_cuStreamAttachMemAsync_ptsz[] = "cuStreamAttachMemAsync_ptsz";
static const char __pyx_k_cuStreamCopyAttributes_ptsz[] = "cuStreamCopyAttributes_ptsz";
static const char __pyx_k_cuStreamWaitValue32_v2_ptsz[] = "cuStreamWaitValue32_v2_ptsz";
static const char __pyx_k_cuStreamWaitValue64_v2_ptsz[] = "cuStreamWaitValue64_v2_ptsz";
static const char __pyx_k_cuSurfObjectGetResourceDesc[] = "cuSurfObjectGetResourceDesc";
static const char __pyx_k_cuTexRefGetMipmapFilterMode[] = "cuTexRefGetMipmapFilterMode";
static const char __pyx_k_cuTexRefGetMipmapLevelClamp[] = "cuTexRefGetMipmapLevelClamp";
static const char __pyx_k_cuTexRefSetMipmapFilterMode[] = "cuTexRefSetMipmapFilterMode";
static const char __pyx_k_cuTexRefSetMipmapLevelClamp[] = "cuTexRefSetMipmapLevelClamp";
static const char __pyx_k_cuArrayGetMemoryRequirements[] = "cuArrayGetMemoryRequirements";
static const char __pyx_k_cuCoredumpGetAttributeGlobal[] = "cuCoredumpGetAttributeGlobal";
static const char __pyx_k_cuCoredumpSetAttributeGlobal[] = "cuCoredumpSetAttributeGlobal";
static const char __pyx_k_cuDeviceGetGraphMemAttribute[] = "cuDeviceGetGraphMemAttribute";
static const char __pyx_k_cuDevicePrimaryCtxRelease_v2[] = "cuDevicePrimaryCtxRelease_v2";
static const char __pyx_k_cuDeviceSetGraphMemAttribute[] = "cuDeviceSetGraphMemAttribute";
static const char __pyx_k_cuGraphEventWaitNodeGetEvent[] = "cuGraphEventWaitNodeGetEvent";
static const char __pyx_k_cuGraphEventWaitNodeSetEvent[] = "cuGraphEventWaitNodeSetEvent";
static const char __pyx_k_cuGraphExecHostNodeSetParams[] = "cuGraphExecHostNodeSetParams";
static const char __pyx_k_cuGraphInstantiateWithParams[] = "cuGraphInstantiateWithParams";
static const char __pyx_k_cuGraphMemAllocNodeGetParams[] = "cuGraphMemAllocNodeGetParams";
static const char __pyx_k_cuGraphNodeGetDependentNodes[] = "cuGraphNodeGetDependentNodes";
static const char __pyx_k_cuGraphicsUnregisterResource[] = "cuGraphicsUnregisterResource";
static const char __pyx_k_cuMemAllocFromPoolAsync_ptsz[] = "cuMemAllocFromPoolAsync_ptsz";
static const char __pyx_k_cuMemExportToShareableHandle[] = "cuMemExportToShareableHandle";
static const char __pyx_k_cuMemHostGetDevicePointer_v2[] = "cuMemHostGetDevicePointer_v2";
static const char __pyx_k_cuOccupancyMaxActiveClusters[] = "cuOccupancyMaxActiveClusters";
static const char __pyx_k_cuStreamBeginCapture_v2_ptsz[] = "cuStreamBeginCapture_v2_ptsz";
static const char __pyx_k_cuStreamWriteValue32_v2_ptsz[] = "cuStreamWriteValue32_v2_ptsz";
static const char __pyx_k_cuStreamWriteValue64_v2_ptsz[] = "cuStreamWriteValue64_v2_ptsz";
static const char __pyx_k_Function_cuCtxGetId_not_found[] = "Function \"cuCtxGetId\" not found";
static const char __pyx_k_Function_cuMemUnmap_not_found[] = "Function \"cuMemUnmap\" not found";
static const char __pyx_k_cuDevicePrimaryCtxSetFlags_v2[] = "cuDevicePrimaryCtxSetFlags_v2";
static const char __pyx_k_cuEGLStreamConsumerDisconnect[] = "cuEGLStreamConsumerDisconnect";
static const char __pyx_k_cuEGLStreamProducerDisconnect[] = "cuEGLStreamProducerDisconnect";
static const char __pyx_k_cuGraphChildGraphNodeGetGraph[] = "cuGraphChildGraphNodeGetGraph";
static const char __pyx_k_cuGraphKernelNodeGetAttribute[] = "cuGraphKernelNodeGetAttribute";
static const char __pyx_k_cuGraphKernelNodeGetParams_v2[] = "cuGraphKernelNodeGetParams_v2";
static const char __pyx_k_cuGraphKernelNodeSetAttribute[] = "cuGraphKernelNodeSetAttribute";
static const char __pyx_k_cuGraphKernelNodeSetParams_v2[] = "cuGraphKernelNodeSetParams_v2";
static const char __pyx_k_cuGraphicsUnmapResources_ptsz[] = "cuGraphicsUnmapResources_ptsz";
static const char __pyx_k_cuMemGetAllocationGranularity[] = "cuMemGetAllocationGranularity";
static const char __pyx_k_cuMemGetHandleForAddressRange[] = "cuMemGetHandleForAddressRange";
static const char __pyx_k_cuWaitExternalSemaphoresAsync[] = "cuWaitExternalSemaphoresAsync";
static const char __pyx_k_Function_cuCtxAttach_not_found[] = "Function \"cuCtxAttach\" not found";
static const char __pyx_k_Function_cuCtxDetach_not_found[] = "Function \"cuCtxDetach\" not found";
static const char __pyx_k_Function_cuDeviceGet_not_found[] = "Function \"cuDeviceGet\" not found";
static const char __pyx_k_Function_cuMemAdvise_not_found[] = "Function \"cuMemAdvise\" not found";
static const char __pyx_k_Function_cuMemCreate_not_found[] = "Function \"cuMemCreate\" not found";
static const char __pyx_k_Function_cuParamSetf_not_found[] = "Function \"cuParamSetf\" not found";
static const char __pyx_k_Function_cuParamSeti_not_found[] = "Function \"cuParamSeti\" not found";
static const char __pyx_k_Function_cuParamSetv_not_found[] = "Function \"cuParamSetv\" not found";
static const char __pyx_k_cuDeviceGetExecAffinitySupport[] = "cuDeviceGetExecAffinitySupport";
static const char __pyx_k_cuDeviceGetNvSciSyncAttributes[] = "cuDeviceGetNvSciSyncAttributes";
static const char __pyx_k_cuEGLStreamProducerReturnFrame[] = "cuEGLStreamProducerReturnFrame";
static const char __pyx_k_cuGraphBatchMemOpNodeGetParams[] = "cuGraphBatchMemOpNodeGetParams";
static const char __pyx_k_cuGraphBatchMemOpNodeSetParams[] = "cuGraphBatchMemOpNodeSetParams";
static const char __pyx_k_cuGraphEventRecordNodeGetEvent[] = "cuGraphEventRecordNodeGetEvent";
static const char __pyx_k_cuGraphEventRecordNodeSetEvent[] = "cuGraphEventRecordNodeSetEvent";
static const char __pyx_k_cuGraphExecMemcpyNodeSetParams[] = "cuGraphExecMemcpyNodeSetParams";
static const char __pyx_k_cuGraphExecMemsetNodeSetParams[] = "cuGraphExecMemsetNodeSetParams";
static const char __pyx_k_cuLaunchCooperativeKernel_ptsz[] = "cuLaunchCooperativeKernel_ptsz";
static const char __pyx_k_cuMemImportFromShareableHandle[] = "cuMemImportFromShareableHandle";
static const char __pyx_k_cuStreamGetCaptureInfo_v2_ptsz[] = "cuStreamGetCaptureInfo_v2_ptsz";
static const char __pyx_k_cuTexObjectGetResourceViewDesc[] = "cuTexObjectGetResourceViewDesc";
static const char __pyx_k_Function_cuArray3DCreate_v2_not[] = "Function \"cuArray3DCreate_v2\" not found";
static const char __pyx_k_Function_cuArray3DGetDescriptor[] = "Function \"cuArray3DGetDescriptor_v2\" not found";
static const char __pyx_k_Function_cuCoredumpGetAttribute[] = "Function \"cuCoredumpGetAttribute\" not found";
static const char __pyx_k_Function_cuCoredumpSetAttribute[] = "Function \"cuCoredumpSetAttribute\" not found";
static const char __pyx_k_Function_cuCtxDisablePeerAccess[] = "Function \"cuCtxDisablePeerAccess\" not found";
static const char __pyx_k_Function_cuCtxGetApiVersion_not[] = "Function \"cuCtxGetApiVersion\" not found";
static const char __pyx_k_Function_cuCtxPopCurrent_v2_not[] = "Function \"cuCtxPopCurrent_v2\" not found";
static const char __pyx_k_Function_cuDeviceGetMemPool_not[] = "Function \"cuDeviceGetMemPool\" not found";
static const char __pyx_k_Function_cuDeviceGetUuid_v2_not[] = "Function \"cuDeviceGetUuid_v2\" not found";
static const char __pyx_k_Function_cuDeviceSetMemPool_not[] = "Function \"cuDeviceSetMemPool\" not found";
static const char __pyx_k_Function_cuDriverGetVersion_not[] = "Function \"cuDriverGetVersion\" not found";
static const char __pyx_k_Function_cuEventElapsedTime_not[] = "Function \"cuEventElapsedTime\" not found";
static const char __pyx_k_Function_cuEventQuery_not_found[] = "Function \"cuEventQuery\" not found";
static const char __pyx_k_Function_cuEventRecordWithFlags[] = "Function \"cuEventRecordWithFlags\" not found";
static const char __pyx_k_Function_cuEventSynchronize_not[] = "Function \"cuEventSynchronize\" not found";
static const char __pyx_k_Function_cuFuncGetAttribute_not[] = "Function \"cuFuncGetAttribute\" not found";
static const char __pyx_k_Function_cuFuncSetAttribute_not[] = "Function \"cuFuncSetAttribute\" not found";
static const char __pyx_k_Function_cuGraphAddDependencies[] = "Function \"cuGraphAddDependencies\" not found";
static const char __pyx_k_Function_cuGraphAddHostNode_not[] = "Function \"cuGraphAddHostNode\" not found";
static const char __pyx_k_Function_cuGraphAddMemAllocNode[] = "Function \"cuGraphAddMemAllocNode\" not found";
static const char __pyx_k_Function_cuGraphClone_not_found[] = "Function \"cuGraphClone\" not found";
static const char __pyx_k_Function_cuGraphDestroyNode_not[] = "Function \"cuGraphDestroyNode\" not found";
static const char __pyx_k_Function_cuGraphExecDestroy_not[] = "Function \"cuGraphExecDestroy\" not found";
static const char __pyx_k_Function_cuGraphNodeFindInClone[] = "Function \"cuGraphNodeFindInClone\" not found";
static const char __pyx_k_Function_cuGraphNodeGetType_not[] = "Function \"cuGraphNodeGetType\" not found";
static const char __pyx_k_Function_cuGraphicsMapResources[] = "Function \"cuGraphicsMapResources\" not found";
static const char __pyx_k_Function_cuImportExternalMemory[] = "Function \"cuImportExternalMemory\" not found";
static const char __pyx_k_Function_cuKernelSetCacheConfig[] = "Function \"cuKernelSetCacheConfig\" not found";
static const char __pyx_k_Function_cuLaunchGrid_not_found[] = "Function \"cuLaunchGrid\" not found";
static const char __pyx_k_Function_cuLibraryGetGlobal_not[] = "Function \"cuLibraryGetGlobal\" not found";
static const char __pyx_k_Function_cuLibraryGetKernel_not[] = "Function \"cuLibraryGetKernel\" not found";
static const char __pyx_k_Function_cuLibraryGetModule_not[] = "Function \"cuLibraryGetModule\" not found";
static const char __pyx_k_Function_cuMemAllocPitch_v2_not[] = "Function \"cuMemAllocPitch_v2\" not found";
static const char __pyx_k_Function_cuMemFree_v2_not_found[] = "Function \"cuMemFree_v2\" not found";
static const char __pyx_k_Function_cuMemMapArrayAsync_not[] = "Function \"cuMemMapArrayAsync\" not found";
static const char __pyx_k_Function_cuMemPoolExportPointer[] = "Function \"cuMemPoolExportPointer\" not found";
static const char __pyx_k_Function_cuMemPoolGetAccess_not[] = "Function \"cuMemPoolGetAccess\" not found";
static const char __pyx_k_Function_cuMemPoolImportPointer[] = "Function \"cuMemPoolImportPointer\" not found";
static const char __pyx_k_Function_cuMemPoolSetAccess_not[] = "Function \"cuMemPoolSetAccess\" not found";
static const char __pyx_k_Function_cuMemPrefetchAsync_not[] = "Function \"cuMemPrefetchAsync\" not found";
static const char __pyx_k_Function_cuMemRangeGetAttribute[] = "Function \"cuMemRangeGetAttribute\" not found";
static const char __pyx_k_Function_cuMemRelease_not_found[] = "Function \"cuMemRelease\" not found";
static const char __pyx_k_Function_cuMemcpy2DAsync_v2_not[] = "Function \"cuMemcpy2DAsync_v2\" not found";
static const char __pyx_k_Function_cuMemcpy2DUnaligned_v2[] = "Function \"cuMemcpy2DUnaligned_v2\" not found";
static const char __pyx_k_Function_cuMemcpy3DAsync_v2_not[] = "Function \"cuMemcpy3DAsync_v2\" not found";
static const char __pyx_k_Function_cuMemcpyPeer_not_found[] = "Function \"cuMemcpyPeer\" not found";
static const char __pyx_k_Function_cuMemsetD2D16Async_not[] = "Function \"cuMemsetD2D16Async\" not found";
static const char __pyx_k_Function_cuMemsetD2D32Async_not[] = "Function \"cuMemsetD2D32Async\" not found";
static const char __pyx_k_Function_cuMipmappedArrayCreate[] = "Function \"cuMipmappedArrayCreate\" not found";
static const char __pyx_k_Function_cuModuleGetLoadingMode[] = "Function \"cuModuleGetLoadingMode\" not found";
static const char __pyx_k_Function_cuModuleGetSurfRef_not[] = "Function \"cuModuleGetSurfRef\" not found";
static const char __pyx_k_Function_cuModuleLoadDataEx_not[] = "Function \"cuModuleLoadDataEx\" not found";
static const char __pyx_k_Function_cuModuleLoad_not_found[] = "Function \"cuModuleLoad\" not found";
static const char __pyx_k_Function_cuMulticastBindMem_not[] = "Function \"cuMulticastBindMem\" not found";
static const char __pyx_k_Function_cuPointerGetAttributes[] = "Function \"cuPointerGetAttributes\" not found";
static const char __pyx_k_Function_cuStreamAttachMemAsync[] = "Function \"cuStreamAttachMemAsync\" not found";
static const char __pyx_k_Function_cuStreamCopyAttributes[] = "Function \"cuStreamCopyAttributes\" not found";
static const char __pyx_k_Function_cuStreamDestroy_v2_not[] = "Function \"cuStreamDestroy_v2\" not found";
static const char __pyx_k_Function_cuStreamEndCapture_not[] = "Function \"cuStreamEndCapture\" not found";
static const char __pyx_k_Function_cuStreamGetCaptureInfo[] = "Function \"cuStreamGetCaptureInfo_v2\" not found";
static const char __pyx_k_Function_cuStreamWaitValue32_v2[] = "Function \"cuStreamWaitValue32_v2\" not found";
static const char __pyx_k_Function_cuStreamWaitValue64_v2[] = "Function \"cuStreamWaitValue64_v2\" not found";
static const char __pyx_k_Function_cuSurfObjectCreate_not[] = "Function \"cuSurfObjectCreate\" not found";
static const char __pyx_k_Function_cuTensorMapEncodeTiled[] = "Function \"cuTensorMapEncodeTiled\" not found";
static const char __pyx_k_Function_cuTexObjectDestroy_not[] = "Function \"cuTexObjectDestroy\" not found";
static const char __pyx_k_Function_cuTexRefGetAddressMode[] = "Function \"cuTexRefGetAddressMode\" not found";
static const char __pyx_k_Function_cuTexRefGetBorderColor[] = "Function \"cuTexRefGetBorderColor\" not found";
static const char __pyx_k_Function_cuTexRefSetAddressMode[] = "Function \"cuTexRefSetAddressMode\" not found";
static const char __pyx_k_Function_cuTexRefSetBorderColor[] = "Function \"cuTexRefSetBorderColor\" not found";
static const char __pyx_k_Function_cuUserObjectCreate_not[] = "Function \"cuUserObjectCreate\" not found";
static const char __pyx_k_Function_cuUserObjectRetain_not[] = "Function \"cuUserObjectRetain\" not found";
static const char __pyx_k_cuEGLStreamConsumerAcquireFrame[] = "cuEGLStreamConsumerAcquireFrame";
static const char __pyx_k_cuEGLStreamConsumerReleaseFrame[] = "cuEGLStreamConsumerReleaseFrame";
static const char __pyx_k_cuEGLStreamProducerPresentFrame[] = "cuEGLStreamProducerPresentFrame";
static const char __pyx_k_cuExternalMemoryGetMappedBuffer[] = "cuExternalMemoryGetMappedBuffer";
static const char __pyx_k_cuGraphKernelNodeCopyAttributes[] = "cuGraphKernelNodeCopyAttributes";
static const char __pyx_k_cuSignalExternalSemaphoresAsync[] = "cuSignalExternalSemaphoresAsync_ptsz";
static const char __pyx_k_CUDA_PYTHON_CUDA_PER_THREAD_DEFA[] = "CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM";
static const char __pyx_k_Function_cuArrayCreate_v2_not_fo[] = "Function \"cuArrayCreate_v2\" not found";
static const char __pyx_k_Function_cuArrayDestroy_not_foun[] = "Function \"cuArrayDestroy\" not found";
static const char __pyx_k_Function_cuArrayGetDescriptor_v2[] = "Function \"cuArrayGetDescriptor_v2\" not found";
static const char __pyx_k_Function_cuArrayGetMemoryRequire[] = "Function \"cuArrayGetMemoryRequirements\" not found";
static const char __pyx_k_Function_cuArrayGetPlane_not_fou[] = "Function \"cuArrayGetPlane\" not found";
static const char __pyx_k_Function_cuArrayGetSparsePropert[] = "Function \"cuArrayGetSparseProperties\" not found";
static const char __pyx_k_Function_cuCoredumpGetAttributeG[] = "Function \"cuCoredumpGetAttributeGlobal\" not found";
static const char __pyx_k_Function_cuCoredumpSetAttributeG[] = "Function \"cuCoredumpSetAttributeGlobal\" not found";
static const char __pyx_k_Function_cuCtxCreate_v2_not_foun[] = "Function \"cuCtxCreate_v2\" not found";
static const char __pyx_k_Function_cuCtxCreate_v3_not_foun[] = "Function \"cuCtxCreate_v3\" not found";
static const char __pyx_k_Function_cuCtxDestroy_v2_not_fou[] = "Function \"cuCtxDestroy_v2\" not found";
static const char __pyx_k_Function_cuCtxEnablePeerAccess_n[] = "Function \"cuCtxEnablePeerAccess\" not found";
static const char __pyx_k_Function_cuCtxGetCacheConfig_not[] = "Function \"cuCtxGetCacheConfig\" not found";
static const char __pyx_k_Function_cuCtxGetCurrent_not_fou[] = "Function \"cuCtxGetCurrent\" not found";
static const char __pyx_k_Function_cuCtxGetDevice_not_foun[] = "Function \"cuCtxGetDevice\" not found";
static const char __pyx_k_Function_cuCtxGetExecAffinity_no[] = "Function \"cuCtxGetExecAffinity\" not found";
static const char __pyx_k_Function_cuCtxGetFlags_not_found[] = "Function \"cuCtxGetFlags\" not found";
static const char __pyx_k_Function_cuCtxGetLimit_not_found[] = "Function \"cuCtxGetLimit\" not found";
static const char __pyx_k_Function_cuCtxGetSharedMemConfig[] = "Function \"cuCtxGetSharedMemConfig\" not found";
static const char __pyx_k_Function_cuCtxGetStreamPriorityR[] = "Function \"cuCtxGetStreamPriorityRange\" not found";
static const char __pyx_k_Function_cuCtxPushCurrent_v2_not[] = "Function \"cuCtxPushCurrent_v2\" not found";
static const char __pyx_k_Function_cuCtxResetPersistingL2C[] = "Function \"cuCtxResetPersistingL2Cache\" not found";
static const char __pyx_k_Function_cuCtxSetCacheConfig_not[] = "Function \"cuCtxSetCacheConfig\" not found";
static const char __pyx_k_Function_cuCtxSetCurrent_not_fou[] = "Function \"cuCtxSetCurrent\" not found";
static const char __pyx_k_Function_cuCtxSetFlags_not_found[] = "Function \"cuCtxSetFlags\" not found";
static const char __pyx_k_Function_cuCtxSetLimit_not_found[] = "Function \"cuCtxSetLimit\" not found";
static const char __pyx_k_Function_cuCtxSetSharedMemConfig[] = "Function \"cuCtxSetSharedMemConfig\" not found";
static const char __pyx_k_Function_cuCtxSynchronize_not_fo[] = "Function \"cuCtxSynchronize\" not found";
static const char __pyx_k_Function_cuDestroyExternalMemory[] = "Function \"cuDestroyExternalMemory\" not found";
static const char __pyx_k_Function_cuDestroyExternalSemaph[] = "Function \"cuDestroyExternalSemaphore\" not found";
static const char __pyx_k_Function_cuDeviceCanAccessPeer_n[] = "Function \"cuDeviceCanAccessPeer\" not found";
static const char __pyx_k_Function_cuDeviceComputeCapabili[] = "Function \"cuDeviceComputeCapability\" not found";
static const char __pyx_k_Function_cuDeviceGetAttribute_no[] = "Function \"cuDeviceGetAttribute\" not found";
static const char __pyx_k_Function_cuDeviceGetByPCIBusId_n[] = "Function \"cuDeviceGetByPCIBusId\" not found";
static const char __pyx_k_Function_cuDeviceGetCount_not_fo[] = "Function \"cuDeviceGetCount\" not found";
static const char __pyx_k_Function_cuDeviceGetDefaultMemPo[] = "Function \"cuDeviceGetDefaultMemPool\" not found";
static const char __pyx_k_Function_cuDeviceGetExecAffinity[] = "Function \"cuDeviceGetExecAffinitySupport\" not found";
static const char __pyx_k_Function_cuDeviceGetGraphMemAttr[] = "Function \"cuDeviceGetGraphMemAttribute\" not found";
static const char __pyx_k_Function_cuDeviceGetLuid_not_fou[] = "Function \"cuDeviceGetLuid\" not found";
static const char __pyx_k_Function_cuDeviceGetName_not_fou[] = "Function \"cuDeviceGetName\" not found";
static const char __pyx_k_Function_cuDeviceGetNvSciSyncAtt[] = "Function \"cuDeviceGetNvSciSyncAttributes\" not found";
static const char __pyx_k_Function_cuDeviceGetP2PAttribute[] = "Function \"cuDeviceGetP2PAttribute\" not found";
static const char __pyx_k_Function_cuDeviceGetPCIBusId_not[] = "Function \"cuDeviceGetPCIBusId\" not found";
static const char __pyx_k_Function_cuDeviceGetProperties_n[] = "Function \"cuDeviceGetProperties\" not found";
static const char __pyx_k_Function_cuDeviceGetTexture1DLin[] = "Function \"cuDeviceGetTexture1DLinearMaxWidth\" not found";
static const char __pyx_k_Function_cuDeviceGetUuid_not_fou[] = "Function \"cuDeviceGetUuid\" not found";
static const char __pyx_k_Function_cuDeviceGraphMemTrim_no[] = "Function \"cuDeviceGraphMemTrim\" not found";
static const char __pyx_k_Function_cuDevicePrimaryCtxGetSt[] = "Function \"cuDevicePrimaryCtxGetState\" not found";
static const char __pyx_k_Function_cuDevicePrimaryCtxRelea[] = "Function \"cuDevicePrimaryCtxRelease_v2\" not found";
static const char __pyx_k_Function_cuDevicePrimaryCtxReset[] = "Function \"cuDevicePrimaryCtxReset_v2\" not found";
static const char __pyx_k_Function_cuDevicePrimaryCtxRetai[] = "Function \"cuDevicePrimaryCtxRetain\" not found";
static const char __pyx_k_Function_cuDevicePrimaryCtxSetFl[] = "Function \"cuDevicePrimaryCtxSetFlags_v2\" not found";
static const char __pyx_k_Function_cuDeviceSetGraphMemAttr[] = "Function \"cuDeviceSetGraphMemAttribute\" not found";
static const char __pyx_k_Function_cuDeviceTotalMem_v2_not[] = "Function \"cuDeviceTotalMem_v2\" not found";
static const char __pyx_k_Function_cuEGLStreamConsumerAcqu[] = "Function \"cuEGLStreamConsumerAcquireFrame\" not found";
static const char __pyx_k_Function_cuEGLStreamConsumerConn[] = "Function \"cuEGLStreamConsumerConnect\" not found";
static const char __pyx_k_Function_cuEGLStreamConsumerDisc[] = "Function \"cuEGLStreamConsumerDisconnect\" not found";
static const char __pyx_k_Function_cuEGLStreamConsumerRele[] = "Function \"cuEGLStreamConsumerReleaseFrame\" not found";
static const char __pyx_k_Function_cuEGLStreamProducerConn[] = "Function \"cuEGLStreamProducerConnect\" not found";
static const char __pyx_k_Function_cuEGLStreamProducerDisc[] = "Function \"cuEGLStreamProducerDisconnect\" not found";
static const char __pyx_k_Function_cuEGLStreamProducerPres[] = "Function \"cuEGLStreamProducerPresentFrame\" not found";
static const char __pyx_k_Function_cuEGLStreamProducerRetu[] = "Function \"cuEGLStreamProducerReturnFrame\" not found";
static const char __pyx_k_Function_cuEventCreateFromEGLSyn[] = "Function \"cuEventCreateFromEGLSync\" not found";
static const char __pyx_k_Function_cuEventCreate_not_found[] = "Function \"cuEventCreate\" not found";
static const char __pyx_k_Function_cuEventDestroy_v2_not_f[] = "Function \"cuEventDestroy_v2\" not found";
static const char __pyx_k_Function_cuEventRecord_not_found[] = "Function \"cuEventRecord\" not found";
static const char __pyx_k_Function_cuExternalMemoryGetMapp[] = "Function \"cuExternalMemoryGetMappedBuffer\" not found";
static const char __pyx_k_Function_cuFlushGPUDirectRDMAWri[] = "Function \"cuFlushGPUDirectRDMAWrites\" not found";
static const char __pyx_k_Function_cuFuncGetModule_not_fou[] = "Function \"cuFuncGetModule\" not found";
static const char __pyx_k_Function_cuFuncSetBlockShape_not[] = "Function \"cuFuncSetBlockShape\" not found";
static const char __pyx_k_Function_cuFuncSetCacheConfig_no[] = "Function \"cuFuncSetCacheConfig\" not found";
static const char __pyx_k_Function_cuFuncSetSharedMemConfi[] = "Function \"cuFuncSetSharedMemConfig\" not found";
static const char __pyx_k_Function_cuFuncSetSharedSize_not[] = "Function \"cuFuncSetSharedSize\" not found";
static const char __pyx_k_Function_cuGLGetDevices_v2_not_f[] = "Function \"cuGLGetDevices_v2\" not found";
static const char __pyx_k_Function_cuGetErrorName_not_foun[] = "Function \"cuGetErrorName\" not found";
static const char __pyx_k_Function_cuGetErrorString_not_fo[] = "Function \"cuGetErrorString\" not found";
static const char __pyx_k_Function_cuGetExportTable_not_fo[] = "Function \"cuGetExportTable\" not found";
static const char __pyx_k_Function_cuGetProcAddress_v2_not[] = "Function \"cuGetProcAddress_v2\" not found";
static const char __pyx_k_Function_cuGraphAddBatchMemOpNod[] = "Function \"cuGraphAddBatchMemOpNode\" not found";
static const char __pyx_k_Function_cuGraphAddChildGraphNod[] = "Function \"cuGraphAddChildGraphNode\" not found";
static const char __pyx_k_Function_cuGraphAddEmptyNode_not[] = "Function \"cuGraphAddEmptyNode\" not found";
static const char __pyx_k_Function_cuGraphAddEventRecordNo[] = "Function \"cuGraphAddEventRecordNode\" not found";
static const char __pyx_k_Function_cuGraphAddEventWaitNode[] = "Function \"cuGraphAddEventWaitNode\" not found";
static const char __pyx_k_Function_cuGraphAddExternalSemap[] = "Function \"cuGraphAddExternalSemaphoresSignalNode\" not found";
static const char __pyx_k_Function_cuGraphAddKernelNode_v2[] = "Function \"cuGraphAddKernelNode_v2\" not found";
static const char __pyx_k_Function_cuGraphAddMemFreeNode_n[] = "Function \"cuGraphAddMemFreeNode\" not found";
static const char __pyx_k_Function_cuGraphAddMemcpyNode_no[] = "Function \"cuGraphAddMemcpyNode\" not found";
static const char __pyx_k_Function_cuGraphAddMemsetNode_no[] = "Function \"cuGraphAddMemsetNode\" not found";
static const char __pyx_k_Function_cuGraphAddNode_not_foun[] = "Function \"cuGraphAddNode\" not found";
static const char __pyx_k_Function_cuGraphBatchMemOpNodeGe[] = "Function \"cuGraphBatchMemOpNodeGetParams\" not found";
static const char __pyx_k_Function_cuGraphBatchMemOpNodeSe[] = "Function \"cuGraphBatchMemOpNodeSetParams\" not found";
static const char __pyx_k_Function_cuGraphChildGraphNodeGe[] = "Function \"cuGraphChildGraphNodeGetGraph\" not found";
static const char __pyx_k_Function_cuGraphCreate_not_found[] = "Function \"cuGraphCreate\" not found";
static const char __pyx_k_Function_cuGraphDebugDotPrint_no[] = "Function \"cuGraphDebugDotPrint\" not found";
static const char __pyx_k_Function_cuGraphDestroy_not_foun[] = "Function \"cuGraphDestroy\" not found";
static const char __pyx_k_Function_cuGraphEventRecordNodeG[] = "Function \"cuGraphEventRecordNodeGetEvent\" not found";
static const char __pyx_k_Function_cuGraphEventRecordNodeS[] = "Function \"cuGraphEventRecordNodeSetEvent\" not found";
static const char __pyx_k_Function_cuGraphEventWaitNodeGet[] = "Function \"cuGraphEventWaitNodeGetEvent\" not found";
static const char __pyx_k_Function_cuGraphEventWaitNodeSet[] = "Function \"cuGraphEventWaitNodeSetEvent\" not found";
static const char __pyx_k_Function_cuGraphExecBatchMemOpNo[] = "Function \"cuGraphExecBatchMemOpNodeSetParams\" not found";
static const char __pyx_k_Function_cuGraphExecChildGraphNo[] = "Function \"cuGraphExecChildGraphNodeSetParams\" not found";
static const char __pyx_k_Function_cuGraphExecEventRecordN[] = "Function \"cuGraphExecEventRecordNodeSetEvent\" not found";
static const char __pyx_k_Function_cuGraphExecEventWaitNod[] = "Function \"cuGraphExecEventWaitNodeSetEvent\" not found";
static const char __pyx_k_Function_cuGraphExecExternalSema[] = "Function \"cuGraphExecExternalSemaphoresSignalNodeSetParams\" not found";
static const char __pyx_k_Function_cuGraphExecGetFlags_not[] = "Function \"cuGraphExecGetFlags\" not found";
static const char __pyx_k_Function_cuGraphExecHostNodeSetP[] = "Function \"cuGraphExecHostNodeSetParams\" not found";
static const char __pyx_k_Function_cuGraphExecKernelNodeSe[] = "Function \"cuGraphExecKernelNodeSetParams_v2\" not found";
static const char __pyx_k_Function_cuGraphExecMemcpyNodeSe[] = "Function \"cuGraphExecMemcpyNodeSetParams\" not found";
static const char __pyx_k_Function_cuGraphExecMemsetNodeSe[] = "Function \"cuGraphExecMemsetNodeSetParams\" not found";
static const char __pyx_k_Function_cuGraphExecNodeSetParam[] = "Function \"cuGraphExecNodeSetParams\" not found";
static const char __pyx_k_Function_cuGraphExecUpdate_v2_no[] = "Function \"cuGraphExecUpdate_v2\" not found";
static const char __pyx_k_Function_cuGraphExternalSemaphor[] = "Function \"cuGraphExternalSemaphoresSignalNodeGetParams\" not found";
static const char __pyx_k_Function_cuGraphGetEdges_not_fou[] = "Function \"cuGraphGetEdges\" not found";
static const char __pyx_k_Function_cuGraphGetNodes_not_fou[] = "Function \"cuGraphGetNodes\" not found";
static const char __pyx_k_Function_cuGraphGetRootNodes_not[] = "Function \"cuGraphGetRootNodes\" not found";
static const char __pyx_k_Function_cuGraphHostNodeGetParam[] = "Function \"cuGraphHostNodeGetParams\" not found";
static const char __pyx_k_Function_cuGraphHostNodeSetParam[] = "Function \"cuGraphHostNodeSetParams\" not found";
static const char __pyx_k_Function_cuGraphInstantiateWithF[] = "Function \"cuGraphInstantiateWithFlags\" not found";
static const char __pyx_k_Function_cuGraphInstantiateWithP[] = "Function \"cuGraphInstantiateWithParams\" not found";
static const char __pyx_k_Function_cuGraphKernelNodeCopyAt[] = "Function \"cuGraphKernelNodeCopyAttributes\" not found";
static const char __pyx_k_Function_cuGraphKernelNodeGetAtt[] = "Function \"cuGraphKernelNodeGetAttribute\" not found";
static const char __pyx_k_Function_cuGraphKernelNodeGetPar[] = "Function \"cuGraphKernelNodeGetParams_v2\" not found";
static const char __pyx_k_Function_cuGraphKernelNodeSetAtt[] = "Function \"cuGraphKernelNodeSetAttribute\" not found";
static const char __pyx_k_Function_cuGraphKernelNodeSetPar[] = "Function \"cuGraphKernelNodeSetParams_v2\" not found";
static const char __pyx_k_Function_cuGraphLaunch_not_found[] = "Function \"cuGraphLaunch\" not found";
static const char __pyx_k_Function_cuGraphMemAllocNodeGetP[] = "Function \"cuGraphMemAllocNodeGetParams\" not found";
static const char __pyx_k_Function_cuGraphMemFreeNodeGetPa[] = "Function \"cuGraphMemFreeNodeGetParams\" not found";
static const char __pyx_k_Function_cuGraphMemcpyNodeGetPar[] = "Function \"cuGraphMemcpyNodeGetParams\" not found";
static const char __pyx_k_Function_cuGraphMemcpyNodeSetPar[] = "Function \"cuGraphMemcpyNodeSetParams\" not found";
static const char __pyx_k_Function_cuGraphMemsetNodeGetPar[] = "Function \"cuGraphMemsetNodeGetParams\" not found";
static const char __pyx_k_Function_cuGraphMemsetNodeSetPar[] = "Function \"cuGraphMemsetNodeSetParams\" not found";
static const char __pyx_k_Function_cuGraphNodeGetDependenc[] = "Function \"cuGraphNodeGetDependencies\" not found";
static const char __pyx_k_Function_cuGraphNodeGetDependent[] = "Function \"cuGraphNodeGetDependentNodes\" not found";
static const char __pyx_k_Function_cuGraphNodeGetEnabled_n[] = "Function \"cuGraphNodeGetEnabled\" not found";
static const char __pyx_k_Function_cuGraphNodeSetEnabled_n[] = "Function \"cuGraphNodeSetEnabled\" not found";
static const char __pyx_k_Function_cuGraphNodeSetParams_no[] = "Function \"cuGraphNodeSetParams\" not found";
static const char __pyx_k_Function_cuGraphReleaseUserObjec[] = "Function \"cuGraphReleaseUserObject\" not found";
static const char __pyx_k_Function_cuGraphRemoveDependenci[] = "Function \"cuGraphRemoveDependencies\" not found";
static const char __pyx_k_Function_cuGraphRetainUserObject[] = "Function \"cuGraphRetainUserObject\" not found";
static const char __pyx_k_Function_cuGraphUpload_not_found[] = "Function \"cuGraphUpload\" not found";
static const char __pyx_k_Function_cuGraphicsEGLRegisterIm[] = "Function \"cuGraphicsEGLRegisterImage\" not found";
static const char __pyx_k_Function_cuGraphicsGLRegisterBuf[] = "Function \"cuGraphicsGLRegisterBuffer\" not found";
static const char __pyx_k_Function_cuGraphicsGLRegisterIma[] = "Function \"cuGraphicsGLRegisterImage\" not found";
static const char __pyx_k_Function_cuGraphicsResourceGetMa[] = "Function \"cuGraphicsResourceGetMappedMipmappedArray\" not found";
static const char __pyx_k_Function_cuGraphicsResourceSetMa[] = "Function \"cuGraphicsResourceSetMapFlags_v2\" not found";
static const char __pyx_k_Function_cuGraphicsSubResourceGe[] = "Function \"cuGraphicsSubResourceGetMappedArray\" not found";
static const char __pyx_k_Function_cuGraphicsUnmapResource[] = "Function \"cuGraphicsUnmapResources\" not found";
static const char __pyx_k_Function_cuGraphicsUnregisterRes[] = "Function \"cuGraphicsUnregisterResource\" not found";
static const char __pyx_k_Function_cuGraphicsVDPAURegister[] = "Function \"cuGraphicsVDPAURegisterVideoSurface\" not found";
static const char __pyx_k_Function_cuImportExternalSemapho[] = "Function \"cuImportExternalSemaphore\" not found";
static const char __pyx_k_Function_cuIpcCloseMemHandle_not[] = "Function \"cuIpcCloseMemHandle\" not found";
static const char __pyx_k_Function_cuIpcGetEventHandle_not[] = "Function \"cuIpcGetEventHandle\" not found";
static const char __pyx_k_Function_cuIpcGetMemHandle_not_f[] = "Function \"cuIpcGetMemHandle\" not found";
static const char __pyx_k_Function_cuIpcOpenEventHandle_no[] = "Function \"cuIpcOpenEventHandle\" not found";
static const char __pyx_k_Function_cuIpcOpenMemHandle_v2_n[] = "Function \"cuIpcOpenMemHandle_v2\" not found";
static const char __pyx_k_Function_cuKernelGetAttribute_no[] = "Function \"cuKernelGetAttribute\" not found";
static const char __pyx_k_Function_cuKernelGetFunction_not[] = "Function \"cuKernelGetFunction\" not found";
static const char __pyx_k_Function_cuKernelSetAttribute_no[] = "Function \"cuKernelSetAttribute\" not found";
static const char __pyx_k_Function_cuLaunchCooperativeKern[] = "Function \"cuLaunchCooperativeKernel\" not found";
static const char __pyx_k_Function_cuLaunchGridAsync_not_f[] = "Function \"cuLaunchGridAsync\" not found";
static const char __pyx_k_Function_cuLaunchHostFunc_not_fo[] = "Function \"cuLaunchHostFunc\" not found";
static const char __pyx_k_Function_cuLaunchKernelEx_not_fo[] = "Function \"cuLaunchKernelEx\" not found";
static const char __pyx_k_Function_cuLaunchKernel_not_foun[] = "Function \"cuLaunchKernel\" not found";
static const char __pyx_k_Function_cuLibraryGetManaged_not[] = "Function \"cuLibraryGetManaged\" not found";
static const char __pyx_k_Function_cuLibraryGetUnifiedFunc[] = "Function \"cuLibraryGetUnifiedFunction\" not found";
static const char __pyx_k_Function_cuLibraryLoadData_not_f[] = "Function \"cuLibraryLoadData\" not found";
static const char __pyx_k_Function_cuLibraryLoadFromFile_n[] = "Function \"cuLibraryLoadFromFile\" not found";
static const char __pyx_k_Function_cuLibraryUnload_not_fou[] = "Function \"cuLibraryUnload\" not found";
static const char __pyx_k_Function_cuLinkAddData_v2_not_fo[] = "Function \"cuLinkAddData_v2\" not found";
static const char __pyx_k_Function_cuLinkAddFile_v2_not_fo[] = "Function \"cuLinkAddFile_v2\" not found";
static const char __pyx_k_Function_cuLinkComplete_not_foun[] = "Function \"cuLinkComplete\" not found";
static const char __pyx_k_Function_cuLinkCreate_v2_not_fou[] = "Function \"cuLinkCreate_v2\" not found";
static const char __pyx_k_Function_cuLinkDestroy_not_found[] = "Function \"cuLinkDestroy\" not found";
static const char __pyx_k_Function_cuMemAddressFree_not_fo[] = "Function \"cuMemAddressFree\" not found";
static const char __pyx_k_Function_cuMemAddressReserve_not[] = "Function \"cuMemAddressReserve\" not found";
static const char __pyx_k_Function_cuMemAdvise_v2_not_foun[] = "Function \"cuMemAdvise_v2\" not found";
static const char __pyx_k_Function_cuMemAllocAsync_not_fou[] = "Function \"cuMemAllocAsync\" not found";
static const char __pyx_k_Function_cuMemAllocFromPoolAsync[] = "Function \"cuMemAllocFromPoolAsync\" not found";
static const char __pyx_k_Function_cuMemAllocHost_v2_not_f[] = "Function \"cuMemAllocHost_v2\" not found";
static const char __pyx_k_Function_cuMemAllocManaged_not_f[] = "Function \"cuMemAllocManaged\" not found";
static const char __pyx_k_Function_cuMemAlloc_v2_not_found[] = "Function \"cuMemAlloc_v2\" not found";
static const char __pyx_k_Function_cuMemExportToShareableH[] = "Function \"cuMemExportToShareableHandle\" not found";
static const char __pyx_k_Function_cuMemFreeAsync_not_foun[] = "Function \"cuMemFreeAsync\" not found";
static const char __pyx_k_Function_cuMemFreeHost_not_found[] = "Function \"cuMemFreeHost\" not found";
static const char __pyx_k_Function_cuMemGetAccess_not_foun[] = "Function \"cuMemGetAccess\" not found";
static const char __pyx_k_Function_cuMemGetAddressRange_v2[] = "Function \"cuMemGetAddressRange_v2\" not found";
static const char __pyx_k_Function_cuMemGetAllocationGranu[] = "Function \"cuMemGetAllocationGranularity\" not found";
static const char __pyx_k_Function_cuMemGetAllocationPrope[] = "Function \"cuMemGetAllocationPropertiesFromHandle\" not found";
static const char __pyx_k_Function_cuMemGetHandleForAddres[] = "Function \"cuMemGetHandleForAddressRange\" not found";
static const char __pyx_k_Function_cuMemGetInfo_v2_not_fou[] = "Function \"cuMemGetInfo_v2\" not found";
static const char __pyx_k_Function_cuMemHostAlloc_not_foun[] = "Function \"cuMemHostAlloc\" not found";
static const char __pyx_k_Function_cuMemHostGetDevicePoint[] = "Function \"cuMemHostGetDevicePointer_v2\" not found";
static const char __pyx_k_Function_cuMemHostGetFlags_not_f[] = "Function \"cuMemHostGetFlags\" not found";
static const char __pyx_k_Function_cuMemHostRegister_v2_no[] = "Function \"cuMemHostRegister_v2\" not found";
static const char __pyx_k_Function_cuMemHostUnregister_not[] = "Function \"cuMemHostUnregister\" not found";
static const char __pyx_k_Function_cuMemImportFromShareabl[] = "Function \"cuMemImportFromShareableHandle\" not found";
static const char __pyx_k_Function_cuMemPoolCreate_not_fou[] = "Function \"cuMemPoolCreate\" not found";
static const char __pyx_k_Function_cuMemPoolDestroy_not_fo[] = "Function \"cuMemPoolDestroy\" not found";
static const char __pyx_k_Function_cuMemPoolExportToSharea[] = "Function \"cuMemPoolExportToShareableHandle\" not found";
static const char __pyx_k_Function_cuMemPoolGetAttribute_n[] = "Function \"cuMemPoolGetAttribute\" not found";
static const char __pyx_k_Function_cuMemPoolImportFromShar[] = "Function \"cuMemPoolImportFromShareableHandle\" not found";
static const char __pyx_k_Function_cuMemPoolSetAttribute_n[] = "Function \"cuMemPoolSetAttribute\" not found";
static const char __pyx_k_Function_cuMemPoolTrimTo_not_fou[] = "Function \"cuMemPoolTrimTo\" not found";
static const char __pyx_k_Function_cuMemPrefetchAsync_v2_n[] = "Function \"cuMemPrefetchAsync_v2\" not found";
static const char __pyx_k_Function_cuMemRangeGetAttributes[] = "Function \"cuMemRangeGetAttributes\" not found";
static const char __pyx_k_Function_cuMemRetainAllocationHa[] = "Function \"cuMemRetainAllocationHandle\" not found";
static const char __pyx_k_Function_cuMemSetAccess_not_foun[] = "Function \"cuMemSetAccess\" not found";
static const char __pyx_k_Function_cuMemcpy2D_v2_not_found[] = "Function \"cuMemcpy2D_v2\" not found";
static const char __pyx_k_Function_cuMemcpy3DPeerAsync_not[] = "Function \"cuMemcpy3DPeerAsync\" not found";
static const char __pyx_k_Function_cuMemcpy3DPeer_not_foun[] = "Function \"cuMemcpy3DPeer\" not found";
static const char __pyx_k_Function_cuMemcpy3D_v2_not_found[] = "Function \"cuMemcpy3D_v2\" not found";
static const char __pyx_k_Function_cuMemcpyAsync_not_found[] = "Function \"cuMemcpyAsync\" not found";
static const char __pyx_k_Function_cuMemcpyAtoA_v2_not_fou[] = "Function \"cuMemcpyAtoA_v2\" not found";
static const char __pyx_k_Function_cuMemcpyAtoD_v2_not_fou[] = "Function \"cuMemcpyAtoD_v2\" not found";
static const char __pyx_k_Function_cuMemcpyAtoHAsync_v2_no[] = "Function \"cuMemcpyAtoHAsync_v2\" not found";
static const char __pyx_k_Function_cuMemcpyAtoH_v2_not_fou[] = "Function \"cuMemcpyAtoH_v2\" not found";
static const char __pyx_k_Function_cuMemcpyDtoA_v2_not_fou[] = "Function \"cuMemcpyDtoA_v2\" not found";
static const char __pyx_k_Function_cuMemcpyDtoDAsync_v2_no[] = "Function \"cuMemcpyDtoDAsync_v2\" not found";
static const char __pyx_k_Function_cuMemcpyDtoD_v2_not_fou[] = "Function \"cuMemcpyDtoD_v2\" not found";
static const char __pyx_k_Function_cuMemcpyDtoHAsync_v2_no[] = "Function \"cuMemcpyDtoHAsync_v2\" not found";
static const char __pyx_k_Function_cuMemcpyDtoH_v2_not_fou[] = "Function \"cuMemcpyDtoH_v2\" not found";
static const char __pyx_k_Function_cuMemcpyHtoAAsync_v2_no[] = "Function \"cuMemcpyHtoAAsync_v2\" not found";
static const char __pyx_k_Function_cuMemcpyHtoA_v2_not_fou[] = "Function \"cuMemcpyHtoA_v2\" not found";
static const char __pyx_k_Function_cuMemcpyHtoDAsync_v2_no[] = "Function \"cuMemcpyHtoDAsync_v2\" not found";
static const char __pyx_k_Function_cuMemcpyHtoD_v2_not_fou[] = "Function \"cuMemcpyHtoD_v2\" not found";
static const char __pyx_k_Function_cuMemcpyPeerAsync_not_f[] = "Function \"cuMemcpyPeerAsync\" not found";
static const char __pyx_k_Function_cuMemsetD16Async_not_fo[] = "Function \"cuMemsetD16Async\" not found";
static const char __pyx_k_Function_cuMemsetD16_v2_not_foun[] = "Function \"cuMemsetD16_v2\" not found";
static const char __pyx_k_Function_cuMemsetD2D16_v2_not_fo[] = "Function \"cuMemsetD2D16_v2\" not found";
static const char __pyx_k_Function_cuMemsetD2D32_v2_not_fo[] = "Function \"cuMemsetD2D32_v2\" not found";
static const char __pyx_k_Function_cuMemsetD2D8Async_not_f[] = "Function \"cuMemsetD2D8Async\" not found";
static const char __pyx_k_Function_cuMemsetD2D8_v2_not_fou[] = "Function \"cuMemsetD2D8_v2\" not found";
static const char __pyx_k_Function_cuMemsetD32Async_not_fo[] = "Function \"cuMemsetD32Async\" not found";
static const char __pyx_k_Function_cuMemsetD32_v2_not_foun[] = "Function \"cuMemsetD32_v2\" not found";
static const char __pyx_k_Function_cuMemsetD8Async_not_fou[] = "Function \"cuMemsetD8Async\" not found";
static const char __pyx_k_Function_cuMemsetD8_v2_not_found[] = "Function \"cuMemsetD8_v2\" not found";
static const char __pyx_k_Function_cuMipmappedArrayDestroy[] = "Function \"cuMipmappedArrayDestroy\" not found";
static const char __pyx_k_Function_cuMipmappedArrayGetLeve[] = "Function \"cuMipmappedArrayGetLevel\" not found";
static const char __pyx_k_Function_cuMipmappedArrayGetMemo[] = "Function \"cuMipmappedArrayGetMemoryRequirements\" not found";
static const char __pyx_k_Function_cuMipmappedArrayGetSpar[] = "Function \"cuMipmappedArrayGetSparseProperties\" not found";
static const char __pyx_k_Function_cuModuleGetFunction_not[] = "Function \"cuModuleGetFunction\" not found";
static const char __pyx_k_Function_cuModuleGetGlobal_v2_no[] = "Function \"cuModuleGetGlobal_v2\" not found";
static const char __pyx_k_Function_cuModuleGetTexRef_not_f[] = "Function \"cuModuleGetTexRef\" not found";
static const char __pyx_k_Function_cuModuleLoadData_not_fo[] = "Function \"cuModuleLoadData\" not found";
static const char __pyx_k_Function_cuModuleLoadFatBinary_n[] = "Function \"cuModuleLoadFatBinary\" not found";
static const char __pyx_k_Function_cuModuleUnload_not_foun[] = "Function \"cuModuleUnload\" not found";
static const char __pyx_k_Function_cuMulticastAddDevice_no[] = "Function \"cuMulticastAddDevice\" not found";
static const char __pyx_k_Function_cuMulticastBindAddr_not[] = "Function \"cuMulticastBindAddr\" not found";
static const char __pyx_k_Function_cuMulticastCreate_not_f[] = "Function \"cuMulticastCreate\" not found";
static const char __pyx_k_Function_cuMulticastGetGranulari[] = "Function \"cuMulticastGetGranularity\" not found";
static const char __pyx_k_Function_cuMulticastUnbind_not_f[] = "Function \"cuMulticastUnbind\" not found";
static const char __pyx_k_Function_cuOccupancyAvailableDyn[] = "Function \"cuOccupancyAvailableDynamicSMemPerBlock\" not found";
static const char __pyx_k_Function_cuOccupancyMaxActiveBlo[] = "Function \"cuOccupancyMaxActiveBlocksPerMultiprocessor\" not found";
static const char __pyx_k_Function_cuOccupancyMaxActiveClu[] = "Function \"cuOccupancyMaxActiveClusters\" not found";
static const char __pyx_k_Function_cuOccupancyMaxPotential[] = "Function \"cuOccupancyMaxPotentialBlockSize\" not found";
static const char __pyx_k_Function_cuParamSetSize_not_foun[] = "Function \"cuParamSetSize\" not found";
static const char __pyx_k_Function_cuParamSetTexRef_not_fo[] = "Function \"cuParamSetTexRef\" not found";
static const char __pyx_k_Function_cuPointerGetAttribute_n[] = "Function \"cuPointerGetAttribute\" not found";
static const char __pyx_k_Function_cuPointerSetAttribute_n[] = "Function \"cuPointerSetAttribute\" not found";
static const char __pyx_k_Function_cuProfilerStart_not_fou[] = "Function \"cuProfilerStart\" not found";
static const char __pyx_k_Function_cuProfilerStop_not_foun[] = "Function \"cuProfilerStop\" not found";
static const char __pyx_k_Function_cuSignalExternalSemapho[] = "Function \"cuSignalExternalSemaphoresAsync\" not found";
static const char __pyx_k_Function_cuStreamAddCallback_not[] = "Function \"cuStreamAddCallback\" not found";
static const char __pyx_k_Function_cuStreamBatchMemOp_v2_n[] = "Function \"cuStreamBatchMemOp_v2\" not found";
static const char __pyx_k_Function_cuStreamBeginCapture_v2[] = "Function \"cuStreamBeginCapture_v2\" not found";
static const char __pyx_k_Function_cuStreamCreateWithPrior[] = "Function \"cuStreamCreateWithPriority\" not found";
static const char __pyx_k_Function_cuStreamCreate_not_foun[] = "Function \"cuStreamCreate\" not found";
static const char __pyx_k_Function_cuStreamGetAttribute_no[] = "Function \"cuStreamGetAttribute\" not found";
static const char __pyx_k_Function_cuStreamGetCtx_not_foun[] = "Function \"cuStreamGetCtx\" not found";
static const char __pyx_k_Function_cuStreamGetFlags_not_fo[] = "Function \"cuStreamGetFlags\" not found";
static const char __pyx_k_Function_cuStreamGetId_not_found[] = "Function \"cuStreamGetId\" not found";
static const char __pyx_k_Function_cuStreamGetPriority_not[] = "Function \"cuStreamGetPriority\" not found";
static const char __pyx_k_Function_cuStreamIsCapturing_not[] = "Function \"cuStreamIsCapturing\" not found";
static const char __pyx_k_Function_cuStreamQuery_not_found[] = "Function \"cuStreamQuery\" not found";
static const char __pyx_k_Function_cuStreamSetAttribute_no[] = "Function \"cuStreamSetAttribute\" not found";
static const char __pyx_k_Function_cuStreamSynchronize_not[] = "Function \"cuStreamSynchronize\" not found";
static const char __pyx_k_Function_cuStreamUpdateCaptureDe[] = "Function \"cuStreamUpdateCaptureDependencies\" not found";
static const char __pyx_k_Function_cuStreamWaitEvent_not_f[] = "Function \"cuStreamWaitEvent\" not found";
static const char __pyx_k_Function_cuStreamWriteValue32_v2[] = "Function \"cuStreamWriteValue32_v2\" not found";
static const char __pyx_k_Function_cuStreamWriteValue64_v2[] = "Function \"cuStreamWriteValue64_v2\" not found";
static const char __pyx_k_Function_cuSurfObjectDestroy_not[] = "Function \"cuSurfObjectDestroy\" not found";
static const char __pyx_k_Function_cuSurfObjectGetResource[] = "Function \"cuSurfObjectGetResourceDesc\" not found";
static const char __pyx_k_Function_cuSurfRefGetArray_not_f[] = "Function \"cuSurfRefGetArray\" not found";
static const char __pyx_k_Function_cuSurfRefSetArray_not_f[] = "Function \"cuSurfRefSetArray\" not found";
static const char __pyx_k_Function_cuTensorMapEncodeIm2col[] = "Function \"cuTensorMapEncodeIm2col\" not found";
static const char __pyx_k_Function_cuTensorMapReplaceAddre[] = "Function \"cuTensorMapReplaceAddress\" not found";
static const char __pyx_k_Function_cuTexObjectCreate_not_f[] = "Function \"cuTexObjectCreate\" not found";
static const char __pyx_k_Function_cuTexObjectGetResourceD[] = "Function \"cuTexObjectGetResourceDesc\" not found";
static const char __pyx_k_Function_cuTexObjectGetResourceV[] = "Function \"cuTexObjectGetResourceViewDesc\" not found";
static const char __pyx_k_Function_cuTexObjectGetTextureDe[] = "Function \"cuTexObjectGetTextureDesc\" not found";
static const char __pyx_k_Function_cuTexRefCreate_not_foun[] = "Function \"cuTexRefCreate\" not found";
static const char __pyx_k_Function_cuTexRefDestroy_not_fou[] = "Function \"cuTexRefDestroy\" not found";
static const char __pyx_k_Function_cuTexRefGetAddress_v2_n[] = "Function \"cuTexRefGetAddress_v2\" not found";
static const char __pyx_k_Function_cuTexRefGetArray_not_fo[] = "Function \"cuTexRefGetArray\" not found";
static const char __pyx_k_Function_cuTexRefGetFilterMode_n[] = "Function \"cuTexRefGetFilterMode\" not found";
static const char __pyx_k_Function_cuTexRefGetFlags_not_fo[] = "Function \"cuTexRefGetFlags\" not found";
static const char __pyx_k_Function_cuTexRefGetFormat_not_f[] = "Function \"cuTexRefGetFormat\" not found";
static const char __pyx_k_Function_cuTexRefGetMaxAnisotrop[] = "Function \"cuTexRefGetMaxAnisotropy\" not found";
static const char __pyx_k_Function_cuTexRefGetMipmapFilter[] = "Function \"cuTexRefGetMipmapFilterMode\" not found";
static const char __pyx_k_Function_cuTexRefGetMipmapLevelB[] = "Function \"cuTexRefGetMipmapLevelBias\" not found";
static const char __pyx_k_Function_cuTexRefGetMipmapLevelC[] = "Function \"cuTexRefGetMipmapLevelClamp\" not found";
static const char __pyx_k_Function_cuTexRefGetMipmappedArr[] = "Function \"cuTexRefGetMipmappedArray\" not found";
static const char __pyx_k_Function_cuTexRefSetAddress2D_v3[] = "Function \"cuTexRefSetAddress2D_v3\" not found";
static const char __pyx_k_Function_cuTexRefSetAddress_v2_n[] = "Function \"cuTexRefSetAddress_v2\" not found";
static const char __pyx_k_Function_cuTexRefSetArray_not_fo[] = "Function \"cuTexRefSetArray\" not found";
static const char __pyx_k_Function_cuTexRefSetFilterMode_n[] = "Function \"cuTexRefSetFilterMode\" not found";
static const char __pyx_k_Function_cuTexRefSetFlags_not_fo[] = "Function \"cuTexRefSetFlags\" not found";
static const char __pyx_k_Function_cuTexRefSetFormat_not_f[] = "Function \"cuTexRefSetFormat\" not found";
static const char __pyx_k_Function_cuTexRefSetMaxAnisotrop[] = "Function \"cuTexRefSetMaxAnisotropy\" not found";
static const char __pyx_k_Function_cuTexRefSetMipmapFilter[] = "Function \"cuTexRefSetMipmapFilterMode\" not found";
static const char __pyx_k_Function_cuTexRefSetMipmapLevelB[] = "Function \"cuTexRefSetMipmapLevelBias\" not found";
static const char __pyx_k_Function_cuTexRefSetMipmapLevelC[] = "Function \"cuTexRefSetMipmapLevelClamp\" not found";
static const char __pyx_k_Function_cuTexRefSetMipmappedArr[] = "Function \"cuTexRefSetMipmappedArray\" not found";
static const char __pyx_k_Function_cuThreadExchangeStreamC[] = "Function \"cuThreadExchangeStreamCaptureMode\" not found";
static const char __pyx_k_Function_cuUserObjectRelease_not[] = "Function \"cuUserObjectRelease\" not found";
static const char __pyx_k_Function_cuVDPAUCtxCreate_v2_not[] = "Function \"cuVDPAUCtxCreate_v2\" not found";
static const char __pyx_k_Function_cuVDPAUGetDevice_not_fo[] = "Function \"cuVDPAUGetDevice\" not found";
static const char __pyx_k_Function_cuWaitExternalSemaphore[] = "Function \"cuWaitExternalSemaphoresAsync\" not found";
static const char __pyx_k_cuDeviceGetTexture1DLinearMaxWid[] = "cuDeviceGetTexture1DLinearMaxWidth";
static const char __pyx_k_cuEGLStreamConsumerConnectWithFl[] = "cuEGLStreamConsumerConnectWithFlags";
static const char __pyx_k_cuExternalMemoryGetMappedMipmapp[] = "cuExternalMemoryGetMappedMipmappedArray";
static const char __pyx_k_cuGraphAddExternalSemaphoresSign[] = "cuGraphAddExternalSemaphoresSignalNode";
static const char __pyx_k_cuGraphAddExternalSemaphoresWait[] = "cuGraphAddExternalSemaphoresWaitNode";
static const char __pyx_k_cuGraphExecBatchMemOpNodeSetPara[] = "cuGraphExecBatchMemOpNodeSetParams";
static const char __pyx_k_cuGraphExecChildGraphNodeSetPara[] = "cuGraphExecChildGraphNodeSetParams";
static const char __pyx_k_cuGraphExecEventRecordNodeSetEve[] = "cuGraphExecEventRecordNodeSetEvent";
static const char __pyx_k_cuGraphExecEventWaitNodeSetEvent[] = "cuGraphExecEventWaitNodeSetEvent";
static const char __pyx_k_cuGraphExecExternalSemaphoresSig[] = "cuGraphExecExternalSemaphoresSignalNodeSetParams";
static const char __pyx_k_cuGraphExecExternalSemaphoresWai[] = "cuGraphExecExternalSemaphoresWaitNodeSetParams";
static const char __pyx_k_cuGraphExecKernelNodeSetParams_v[] = "cuGraphExecKernelNodeSetParams_v2";
static const char __pyx_k_cuGraphExternalSemaphoresSignalN[] = "cuGraphExternalSemaphoresSignalNodeGetParams";
static const char __pyx_k_cuGraphExternalSemaphoresWaitNod[] = "cuGraphExternalSemaphoresWaitNodeGetParams";
static const char __pyx_k_cuGraphInstantiateWithParams_pts[] = "cuGraphInstantiateWithParams_ptsz";
static const char __pyx_k_cuGraphicsResourceGetMappedEglFr[] = "cuGraphicsResourceGetMappedEglFrame";
static const char __pyx_k_cuGraphicsResourceGetMappedMipma[] = "cuGraphicsResourceGetMappedMipmappedArray";
static const char __pyx_k_cuGraphicsResourceGetMappedPoint[] = "cuGraphicsResourceGetMappedPointer_v2";
static const char __pyx_k_cuGraphicsResourceSetMapFlags_v2[] = "cuGraphicsResourceSetMapFlags_v2";
static const char __pyx_k_cuGraphicsSubResourceGetMappedAr[] = "cuGraphicsSubResourceGetMappedArray";
static const char __pyx_k_cuGraphicsVDPAURegisterOutputSur[] = "cuGraphicsVDPAURegisterOutputSurface";
static const char __pyx_k_cuGraphicsVDPAURegisterVideoSurf[] = "cuGraphicsVDPAURegisterVideoSurface";
static const char __pyx_k_cuLaunchCooperativeKernelMultiDe[] = "cuLaunchCooperativeKernelMultiDevice";
static const char __pyx_k_cuMemGetAllocationPropertiesFrom[] = "cuMemGetAllocationPropertiesFromHandle";
static const char __pyx_k_cuMemPoolExportToShareableHandle[] = "cuMemPoolExportToShareableHandle";
static const char __pyx_k_cuMemPoolImportFromShareableHand[] = "cuMemPoolImportFromShareableHandle";
static const char __pyx_k_cuMipmappedArrayGetMemoryRequire[] = "cuMipmappedArrayGetMemoryRequirements";
static const char __pyx_k_cuMipmappedArrayGetSparsePropert[] = "cuMipmappedArrayGetSparseProperties";
static const char __pyx_k_cuOccupancyAvailableDynamicSMemP[] = "cuOccupancyAvailableDynamicSMemPerBlock";
static const char __pyx_k_cuOccupancyMaxActiveBlocksPerMul[] = "cuOccupancyMaxActiveBlocksPerMultiprocessor";
static const char __pyx_k_cuOccupancyMaxPotentialBlockSize[] = "cuOccupancyMaxPotentialBlockSize";
static const char __pyx_k_cuOccupancyMaxPotentialClusterSi[] = "cuOccupancyMaxPotentialClusterSize";
static const char __pyx_k_cuStreamUpdateCaptureDependencie[] = "cuStreamUpdateCaptureDependencies_ptsz";
static const char __pyx_k_cuThreadExchangeStreamCaptureMod[] = "cuThreadExchangeStreamCaptureMode";
static const char __pyx_k_cuWaitExternalSemaphoresAsync_pt[] = "cuWaitExternalSemaphoresAsync_ptsz";
static const char __pyx_k_cuSignalExternalSemaphoresAsync_2[] = "cuSignalExternalSemaphoresAsync";
static const char __pyx_k_Function_cuEGLStreamConsumerConn_2[] = "Function \"cuEGLStreamConsumerConnectWithFlags\" not found";
static const char __pyx_k_Function_cuExternalMemoryGetMapp_2[] = "Function \"cuExternalMemoryGetMappedMipmappedArray\" not found";
static const char __pyx_k_Function_cuGraphAddExternalSemap_2[] = "Function \"cuGraphAddExternalSemaphoresWaitNode\" not found";
static const char __pyx_k_Function_cuGraphExecExternalSema_2[] = "Function \"cuGraphExecExternalSemaphoresWaitNodeSetParams\" not found";
static const char __pyx_k_Function_cuGraphExternalSemaphor_2[] = "Function \"cuGraphExternalSemaphoresSignalNodeSetParams\" not found";
static const char __pyx_k_Function_cuGraphExternalSemaphor_3[] = "Function \"cuGraphExternalSemaphoresWaitNodeGetParams\" not found";
static const char __pyx_k_Function_cuGraphExternalSemaphor_4[] = "Function \"cuGraphExternalSemaphoresWaitNodeSetParams\" not found";
static const char __pyx_k_Function_cuGraphicsResourceGetMa_2[] = "Function \"cuGraphicsResourceGetMappedPointer_v2\" not found";
static const char __pyx_k_Function_cuGraphicsResourceGetMa_3[] = "Function \"cuGraphicsResourceGetMappedEglFrame\" not found";
static const char __pyx_k_Function_cuGraphicsVDPAURegister_2[] = "Function \"cuGraphicsVDPAURegisterOutputSurface\" not found";
static const char __pyx_k_Function_cuLaunchCooperativeKern_2[] = "Function \"cuLaunchCooperativeKernelMultiDevice\" not found";
static const char __pyx_k_Function_cuOccupancyMaxActiveBlo_2[] = "Function \"cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags\" not found";
static const char __pyx_k_Function_cuOccupancyMaxPotential_2[] = "Function \"cuOccupancyMaxPotentialBlockSizeWithFlags\" not found";
static const char __pyx_k_Function_cuOccupancyMaxPotential_3[] = "Function \"cuOccupancyMaxPotentialClusterSize\" not found";
static const char __pyx_k_cuGraphExternalSemaphoresSignalN_2[] = "cuGraphExternalSemaphoresSignalNodeSetParams";
static const char __pyx_k_cuGraphExternalSemaphoresWaitNod_2[] = "cuGraphExternalSemaphoresWaitNodeSetParams";
static const char __pyx_k_cuOccupancyMaxActiveBlocksPerMul_2[] = "cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags";
static const char __pyx_k_cuOccupancyMaxPotentialBlockSize_2[] = "cuOccupancyMaxPotentialBlockSizeWithFlags";
static const char __pyx_k_cuStreamUpdateCaptureDependencie_2[] = "cuStreamUpdateCaptureDependencies";
static PyObject *__pyx_n_u_CUDA_PYTHON_CUDA_PER_THREAD_DEFA;
static PyObject *__pyx_kp_u_Failed_to_LoadLibraryEx;
static PyObject *__pyx_kp_u_Function_cuArray3DCreate_v2_not;
static PyObject *__pyx_kp_u_Function_cuArray3DGetDescriptor;
static PyObject *__pyx_kp_u_Function_cuArrayCreate_v2_not_fo;
static PyObject *__pyx_kp_u_Function_cuArrayDestroy_not_foun;
static PyObject *__pyx_kp_u_Function_cuArrayGetDescriptor_v2;
static PyObject *__pyx_kp_u_Function_cuArrayGetMemoryRequire;
static PyObject *__pyx_kp_u_Function_cuArrayGetPlane_not_fou;
static PyObject *__pyx_kp_u_Function_cuArrayGetSparsePropert;
static PyObject *__pyx_kp_u_Function_cuCoredumpGetAttribute;
static PyObject *__pyx_kp_u_Function_cuCoredumpGetAttributeG;
static PyObject *__pyx_kp_u_Function_cuCoredumpSetAttribute;
static PyObject *__pyx_kp_u_Function_cuCoredumpSetAttributeG;
static PyObject *__pyx_kp_u_Function_cuCtxAttach_not_found;
static PyObject *__pyx_kp_u_Function_cuCtxCreate_v2_not_foun;
static PyObject *__pyx_kp_u_Function_cuCtxCreate_v3_not_foun;
static PyObject *__pyx_kp_u_Function_cuCtxDestroy_v2_not_fou;
static PyObject *__pyx_kp_u_Function_cuCtxDetach_not_found;
static PyObject *__pyx_kp_u_Function_cuCtxDisablePeerAccess;
static PyObject *__pyx_kp_u_Function_cuCtxEnablePeerAccess_n;
static PyObject *__pyx_kp_u_Function_cuCtxGetApiVersion_not;
static PyObject *__pyx_kp_u_Function_cuCtxGetCacheConfig_not;
static PyObject *__pyx_kp_u_Function_cuCtxGetCurrent_not_fou;
static PyObject *__pyx_kp_u_Function_cuCtxGetDevice_not_foun;
static PyObject *__pyx_kp_u_Function_cuCtxGetExecAffinity_no;
static PyObject *__pyx_kp_u_Function_cuCtxGetFlags_not_found;
static PyObject *__pyx_kp_u_Function_cuCtxGetId_not_found;
static PyObject *__pyx_kp_u_Function_cuCtxGetLimit_not_found;
static PyObject *__pyx_kp_u_Function_cuCtxGetSharedMemConfig;
static PyObject *__pyx_kp_u_Function_cuCtxGetStreamPriorityR;
static PyObject *__pyx_kp_u_Function_cuCtxPopCurrent_v2_not;
static PyObject *__pyx_kp_u_Function_cuCtxPushCurrent_v2_not;
static PyObject *__pyx_kp_u_Function_cuCtxResetPersistingL2C;
static PyObject *__pyx_kp_u_Function_cuCtxSetCacheConfig_not;
static PyObject *__pyx_kp_u_Function_cuCtxSetCurrent_not_fou;
static PyObject *__pyx_kp_u_Function_cuCtxSetFlags_not_found;
static PyObject *__pyx_kp_u_Function_cuCtxSetLimit_not_found;
static PyObject *__pyx_kp_u_Function_cuCtxSetSharedMemConfig;
static PyObject *__pyx_kp_u_Function_cuCtxSynchronize_not_fo;
static PyObject *__pyx_kp_u_Function_cuDestroyExternalMemory;
static PyObject *__pyx_kp_u_Function_cuDestroyExternalSemaph;
static PyObject *__pyx_kp_u_Function_cuDeviceCanAccessPeer_n;
static PyObject *__pyx_kp_u_Function_cuDeviceComputeCapabili;
static PyObject *__pyx_kp_u_Function_cuDeviceGetAttribute_no;
static PyObject *__pyx_kp_u_Function_cuDeviceGetByPCIBusId_n;
static PyObject *__pyx_kp_u_Function_cuDeviceGetCount_not_fo;
static PyObject *__pyx_kp_u_Function_cuDeviceGetDefaultMemPo;
static PyObject *__pyx_kp_u_Function_cuDeviceGetExecAffinity;
static PyObject *__pyx_kp_u_Function_cuDeviceGetGraphMemAttr;
static PyObject *__pyx_kp_u_Function_cuDeviceGetLuid_not_fou;
static PyObject *__pyx_kp_u_Function_cuDeviceGetMemPool_not;
static PyObject *__pyx_kp_u_Function_cuDeviceGetName_not_fou;
static PyObject *__pyx_kp_u_Function_cuDeviceGetNvSciSyncAtt;
static PyObject *__pyx_kp_u_Function_cuDeviceGetP2PAttribute;
static PyObject *__pyx_kp_u_Function_cuDeviceGetPCIBusId_not;
static PyObject *__pyx_kp_u_Function_cuDeviceGetProperties_n;
static PyObject *__pyx_kp_u_Function_cuDeviceGetTexture1DLin;
static PyObject *__pyx_kp_u_Function_cuDeviceGetUuid_not_fou;
static PyObject *__pyx_kp_u_Function_cuDeviceGetUuid_v2_not;
static PyObject *__pyx_kp_u_Function_cuDeviceGet_not_found;
static PyObject *__pyx_kp_u_Function_cuDeviceGraphMemTrim_no;
static PyObject *__pyx_kp_u_Function_cuDevicePrimaryCtxGetSt;
static PyObject *__pyx_kp_u_Function_cuDevicePrimaryCtxRelea;
static PyObject *__pyx_kp_u_Function_cuDevicePrimaryCtxReset;
static PyObject *__pyx_kp_u_Function_cuDevicePrimaryCtxRetai;
static PyObject *__pyx_kp_u_Function_cuDevicePrimaryCtxSetFl;
static PyObject *__pyx_kp_u_Function_cuDeviceSetGraphMemAttr;
static PyObject *__pyx_kp_u_Function_cuDeviceSetMemPool_not;
static PyObject *__pyx_kp_u_Function_cuDeviceTotalMem_v2_not;
static PyObject *__pyx_kp_u_Function_cuDriverGetVersion_not;
static PyObject *__pyx_kp_u_Function_cuEGLStreamConsumerAcqu;
static PyObject *__pyx_kp_u_Function_cuEGLStreamConsumerConn;
static PyObject *__pyx_kp_u_Function_cuEGLStreamConsumerConn_2;
static PyObject *__pyx_kp_u_Function_cuEGLStreamConsumerDisc;
static PyObject *__pyx_kp_u_Function_cuEGLStreamConsumerRele;
static PyObject *__pyx_kp_u_Function_cuEGLStreamProducerConn;
static PyObject *__pyx_kp_u_Function_cuEGLStreamProducerDisc;
static PyObject *__pyx_kp_u_Function_cuEGLStreamProducerPres;
static PyObject *__pyx_kp_u_Function_cuEGLStreamProducerRetu;
static PyObject *__pyx_kp_u_Function_cuEventCreateFromEGLSyn;
static PyObject *__pyx_kp_u_Function_cuEventCreate_not_found;
static PyObject *__pyx_kp_u_Function_cuEventDestroy_v2_not_f;
static PyObject *__pyx_kp_u_Function_cuEventElapsedTime_not;
static PyObject *__pyx_kp_u_Function_cuEventQuery_not_found;
static PyObject *__pyx_kp_u_Function_cuEventRecordWithFlags;
static PyObject *__pyx_kp_u_Function_cuEventRecord_not_found;
static PyObject *__pyx_kp_u_Function_cuEventSynchronize_not;
static PyObject *__pyx_kp_u_Function_cuExternalMemoryGetMapp;
static PyObject *__pyx_kp_u_Function_cuExternalMemoryGetMapp_2;
static PyObject *__pyx_kp_u_Function_cuFlushGPUDirectRDMAWri;
static PyObject *__pyx_kp_u_Function_cuFuncGetAttribute_not;
static PyObject *__pyx_kp_u_Function_cuFuncGetModule_not_fou;
static PyObject *__pyx_kp_u_Function_cuFuncSetAttribute_not;
static PyObject *__pyx_kp_u_Function_cuFuncSetBlockShape_not;
static PyObject *__pyx_kp_u_Function_cuFuncSetCacheConfig_no;
static PyObject *__pyx_kp_u_Function_cuFuncSetSharedMemConfi;
static PyObject *__pyx_kp_u_Function_cuFuncSetSharedSize_not;
static PyObject *__pyx_kp_u_Function_cuGLGetDevices_v2_not_f;
static PyObject *__pyx_kp_u_Function_cuGetErrorName_not_foun;
static PyObject *__pyx_kp_u_Function_cuGetErrorString_not_fo;
static PyObject *__pyx_kp_u_Function_cuGetExportTable_not_fo;
static PyObject *__pyx_kp_u_Function_cuGetProcAddress_v2_not;
static PyObject *__pyx_kp_u_Function_cuGraphAddBatchMemOpNod;
static PyObject *__pyx_kp_u_Function_cuGraphAddChildGraphNod;
static PyObject *__pyx_kp_u_Function_cuGraphAddDependencies;
static PyObject *__pyx_kp_u_Function_cuGraphAddEmptyNode_not;
static PyObject *__pyx_kp_u_Function_cuGraphAddEventRecordNo;
static PyObject *__pyx_kp_u_Function_cuGraphAddEventWaitNode;
static PyObject *__pyx_kp_u_Function_cuGraphAddExternalSemap;
static PyObject *__pyx_kp_u_Function_cuGraphAddExternalSemap_2;
static PyObject *__pyx_kp_u_Function_cuGraphAddHostNode_not;
static PyObject *__pyx_kp_u_Function_cuGraphAddKernelNode_v2;
static PyObject *__pyx_kp_u_Function_cuGraphAddMemAllocNode;
static PyObject *__pyx_kp_u_Function_cuGraphAddMemFreeNode_n;
static PyObject *__pyx_kp_u_Function_cuGraphAddMemcpyNode_no;
static PyObject *__pyx_kp_u_Function_cuGraphAddMemsetNode_no;
static PyObject *__pyx_kp_u_Function_cuGraphAddNode_not_foun;
static PyObject *__pyx_kp_u_Function_cuGraphBatchMemOpNodeGe;
static PyObject *__pyx_kp_u_Function_cuGraphBatchMemOpNodeSe;
static PyObject *__pyx_kp_u_Function_cuGraphChildGraphNodeGe;
static PyObject *__pyx_kp_u_Function_cuGraphClone_not_found;
static PyObject *__pyx_kp_u_Function_cuGraphCreate_not_found;
static PyObject *__pyx_kp_u_Function_cuGraphDebugDotPrint_no;
static PyObject *__pyx_kp_u_Function_cuGraphDestroyNode_not;
static PyObject *__pyx_kp_u_Function_cuGraphDestroy_not_foun;
static PyObject *__pyx_kp_u_Function_cuGraphEventRecordNodeG;
static PyObject *__pyx_kp_u_Function_cuGraphEventRecordNodeS;
static PyObject *__pyx_kp_u_Function_cuGraphEventWaitNodeGet;
static PyObject *__pyx_kp_u_Function_cuGraphEventWaitNodeSet;
static PyObject *__pyx_kp_u_Function_cuGraphExecBatchMemOpNo;
static PyObject *__pyx_kp_u_Function_cuGraphExecChildGraphNo;
static PyObject *__pyx_kp_u_Function_cuGraphExecDestroy_not;
static PyObject *__pyx_kp_u_Function_cuGraphExecEventRecordN;
static PyObject *__pyx_kp_u_Function_cuGraphExecEventWaitNod;
static PyObject *__pyx_kp_u_Function_cuGraphExecExternalSema;
static PyObject *__pyx_kp_u_Function_cuGraphExecExternalSema_2;
static PyObject *__pyx_kp_u_Function_cuGraphExecGetFlags_not;
static PyObject *__pyx_kp_u_Function_cuGraphExecHostNodeSetP;
static PyObject *__pyx_kp_u_Function_cuGraphExecKernelNodeSe;
static PyObject *__pyx_kp_u_Function_cuGraphExecMemcpyNodeSe;
static PyObject *__pyx_kp_u_Function_cuGraphExecMemsetNodeSe;
static PyObject *__pyx_kp_u_Function_cuGraphExecNodeSetParam;
static PyObject *__pyx_kp_u_Function_cuGraphExecUpdate_v2_no;
static PyObject *__pyx_kp_u_Function_cuGraphExternalSemaphor;
static PyObject *__pyx_kp_u_Function_cuGraphExternalSemaphor_2;
static PyObject *__pyx_kp_u_Function_cuGraphExternalSemaphor_3;
static PyObject *__pyx_kp_u_Function_cuGraphExternalSemaphor_4;
static PyObject *__pyx_kp_u_Function_cuGraphGetEdges_not_fou;
static PyObject *__pyx_kp_u_Function_cuGraphGetNodes_not_fou;
static PyObject *__pyx_kp_u_Function_cuGraphGetRootNodes_not;
static PyObject *__pyx_kp_u_Function_cuGraphHostNodeGetParam;
static PyObject *__pyx_kp_u_Function_cuGraphHostNodeSetParam;
static PyObject *__pyx_kp_u_Function_cuGraphInstantiateWithF;
static PyObject *__pyx_kp_u_Function_cuGraphInstantiateWithP;
static PyObject *__pyx_kp_u_Function_cuGraphKernelNodeCopyAt;
static PyObject *__pyx_kp_u_Function_cuGraphKernelNodeGetAtt;
static PyObject *__pyx_kp_u_Function_cuGraphKernelNodeGetPar;
static PyObject *__pyx_kp_u_Function_cuGraphKernelNodeSetAtt;
static PyObject *__pyx_kp_u_Function_cuGraphKernelNodeSetPar;
static PyObject *__pyx_kp_u_Function_cuGraphLaunch_not_found;
static PyObject *__pyx_kp_u_Function_cuGraphMemAllocNodeGetP;
static PyObject *__pyx_kp_u_Function_cuGraphMemFreeNodeGetPa;
static PyObject *__pyx_kp_u_Function_cuGraphMemcpyNodeGetPar;
static PyObject *__pyx_kp_u_Function_cuGraphMemcpyNodeSetPar;
static PyObject *__pyx_kp_u_Function_cuGraphMemsetNodeGetPar;
static PyObject *__pyx_kp_u_Function_cuGraphMemsetNodeSetPar;
static PyObject *__pyx_kp_u_Function_cuGraphNodeFindInClone;
static PyObject *__pyx_kp_u_Function_cuGraphNodeGetDependenc;
static PyObject *__pyx_kp_u_Function_cuGraphNodeGetDependent;
static PyObject *__pyx_kp_u_Function_cuGraphNodeGetEnabled_n;
static PyObject *__pyx_kp_u_Function_cuGraphNodeGetType_not;
static PyObject *__pyx_kp_u_Function_cuGraphNodeSetEnabled_n;
static PyObject *__pyx_kp_u_Function_cuGraphNodeSetParams_no;
static PyObject *__pyx_kp_u_Function_cuGraphReleaseUserObjec;
static PyObject *__pyx_kp_u_Function_cuGraphRemoveDependenci;
static PyObject *__pyx_kp_u_Function_cuGraphRetainUserObject;
static PyObject *__pyx_kp_u_Function_cuGraphUpload_not_found;
static PyObject *__pyx_kp_u_Function_cuGraphicsEGLRegisterIm;
static PyObject *__pyx_kp_u_Function_cuGraphicsGLRegisterBuf;
static PyObject *__pyx_kp_u_Function_cuGraphicsGLRegisterIma;
static PyObject *__pyx_kp_u_Function_cuGraphicsMapResources;
static PyObject *__pyx_kp_u_Function_cuGraphicsResourceGetMa;
static PyObject *__pyx_kp_u_Function_cuGraphicsResourceGetMa_2;
static PyObject *__pyx_kp_u_Function_cuGraphicsResourceGetMa_3;
static PyObject *__pyx_kp_u_Function_cuGraphicsResourceSetMa;
static PyObject *__pyx_kp_u_Function_cuGraphicsSubResourceGe;
static PyObject *__pyx_kp_u_Function_cuGraphicsUnmapResource;
static PyObject *__pyx_kp_u_Function_cuGraphicsUnregisterRes;
static PyObject *__pyx_kp_u_Function_cuGraphicsVDPAURegister;
static PyObject *__pyx_kp_u_Function_cuGraphicsVDPAURegister_2;
static PyObject *__pyx_kp_u_Function_cuImportExternalMemory;
static PyObject *__pyx_kp_u_Function_cuImportExternalSemapho;
static PyObject *__pyx_kp_u_Function_cuInit_not_found;
static PyObject *__pyx_kp_u_Function_cuIpcCloseMemHandle_not;
static PyObject *__pyx_kp_u_Function_cuIpcGetEventHandle_not;
static PyObject *__pyx_kp_u_Function_cuIpcGetMemHandle_not_f;
static PyObject *__pyx_kp_u_Function_cuIpcOpenEventHandle_no;
static PyObject *__pyx_kp_u_Function_cuIpcOpenMemHandle_v2_n;
static PyObject *__pyx_kp_u_Function_cuKernelGetAttribute_no;
static PyObject *__pyx_kp_u_Function_cuKernelGetFunction_not;
static PyObject *__pyx_kp_u_Function_cuKernelSetAttribute_no;
static PyObject *__pyx_kp_u_Function_cuKernelSetCacheConfig;
static PyObject *__pyx_kp_u_Function_cuLaunchCooperativeKern;
static PyObject *__pyx_kp_u_Function_cuLaunchCooperativeKern_2;
static PyObject *__pyx_kp_u_Function_cuLaunchGridAsync_not_f;
static PyObject *__pyx_kp_u_Function_cuLaunchGrid_not_found;
static PyObject *__pyx_kp_u_Function_cuLaunchHostFunc_not_fo;
static PyObject *__pyx_kp_u_Function_cuLaunchKernelEx_not_fo;
static PyObject *__pyx_kp_u_Function_cuLaunchKernel_not_foun;
static PyObject *__pyx_kp_u_Function_cuLaunch_not_found;
static PyObject *__pyx_kp_u_Function_cuLibraryGetGlobal_not;
static PyObject *__pyx_kp_u_Function_cuLibraryGetKernel_not;
static PyObject *__pyx_kp_u_Function_cuLibraryGetManaged_not;
static PyObject *__pyx_kp_u_Function_cuLibraryGetModule_not;
static PyObject *__pyx_kp_u_Function_cuLibraryGetUnifiedFunc;
static PyObject *__pyx_kp_u_Function_cuLibraryLoadData_not_f;
static PyObject *__pyx_kp_u_Function_cuLibraryLoadFromFile_n;
static PyObject *__pyx_kp_u_Function_cuLibraryUnload_not_fou;
static PyObject *__pyx_kp_u_Function_cuLinkAddData_v2_not_fo;
static PyObject *__pyx_kp_u_Function_cuLinkAddFile_v2_not_fo;
static PyObject *__pyx_kp_u_Function_cuLinkComplete_not_foun;
static PyObject *__pyx_kp_u_Function_cuLinkCreate_v2_not_fou;
static PyObject *__pyx_kp_u_Function_cuLinkDestroy_not_found;
static PyObject *__pyx_kp_u_Function_cuMemAddressFree_not_fo;
static PyObject *__pyx_kp_u_Function_cuMemAddressReserve_not;
static PyObject *__pyx_kp_u_Function_cuMemAdvise_not_found;
static PyObject *__pyx_kp_u_Function_cuMemAdvise_v2_not_foun;
static PyObject *__pyx_kp_u_Function_cuMemAllocAsync_not_fou;
static PyObject *__pyx_kp_u_Function_cuMemAllocFromPoolAsync;
static PyObject *__pyx_kp_u_Function_cuMemAllocHost_v2_not_f;
static PyObject *__pyx_kp_u_Function_cuMemAllocManaged_not_f;
static PyObject *__pyx_kp_u_Function_cuMemAllocPitch_v2_not;
static PyObject *__pyx_kp_u_Function_cuMemAlloc_v2_not_found;
static PyObject *__pyx_kp_u_Function_cuMemCreate_not_found;
static PyObject *__pyx_kp_u_Function_cuMemExportToShareableH;
static PyObject *__pyx_kp_u_Function_cuMemFreeAsync_not_foun;
static PyObject *__pyx_kp_u_Function_cuMemFreeHost_not_found;
static PyObject *__pyx_kp_u_Function_cuMemFree_v2_not_found;
static PyObject *__pyx_kp_u_Function_cuMemGetAccess_not_foun;
static PyObject *__pyx_kp_u_Function_cuMemGetAddressRange_v2;
static PyObject *__pyx_kp_u_Function_cuMemGetAllocationGranu;
static PyObject *__pyx_kp_u_Function_cuMemGetAllocationPrope;
static PyObject *__pyx_kp_u_Function_cuMemGetHandleForAddres;
static PyObject *__pyx_kp_u_Function_cuMemGetInfo_v2_not_fou;
static PyObject *__pyx_kp_u_Function_cuMemHostAlloc_not_foun;
static PyObject *__pyx_kp_u_Function_cuMemHostGetDevicePoint;
static PyObject *__pyx_kp_u_Function_cuMemHostGetFlags_not_f;
static PyObject *__pyx_kp_u_Function_cuMemHostRegister_v2_no;
static PyObject *__pyx_kp_u_Function_cuMemHostUnregister_not;
static PyObject *__pyx_kp_u_Function_cuMemImportFromShareabl;
static PyObject *__pyx_kp_u_Function_cuMemMapArrayAsync_not;
static PyObject *__pyx_kp_u_Function_cuMemMap_not_found;
static PyObject *__pyx_kp_u_Function_cuMemPoolCreate_not_fou;
static PyObject *__pyx_kp_u_Function_cuMemPoolDestroy_not_fo;
static PyObject *__pyx_kp_u_Function_cuMemPoolExportPointer;
static PyObject *__pyx_kp_u_Function_cuMemPoolExportToSharea;
static PyObject *__pyx_kp_u_Function_cuMemPoolGetAccess_not;
static PyObject *__pyx_kp_u_Function_cuMemPoolGetAttribute_n;
static PyObject *__pyx_kp_u_Function_cuMemPoolImportFromShar;
static PyObject *__pyx_kp_u_Function_cuMemPoolImportPointer;
static PyObject *__pyx_kp_u_Function_cuMemPoolSetAccess_not;
static PyObject *__pyx_kp_u_Function_cuMemPoolSetAttribute_n;
static PyObject *__pyx_kp_u_Function_cuMemPoolTrimTo_not_fou;
static PyObject *__pyx_kp_u_Function_cuMemPrefetchAsync_not;
static PyObject *__pyx_kp_u_Function_cuMemPrefetchAsync_v2_n;
static PyObject *__pyx_kp_u_Function_cuMemRangeGetAttribute;
static PyObject *__pyx_kp_u_Function_cuMemRangeGetAttributes;
static PyObject *__pyx_kp_u_Function_cuMemRelease_not_found;
static PyObject *__pyx_kp_u_Function_cuMemRetainAllocationHa;
static PyObject *__pyx_kp_u_Function_cuMemSetAccess_not_foun;
static PyObject *__pyx_kp_u_Function_cuMemUnmap_not_found;
static PyObject *__pyx_kp_u_Function_cuMemcpy2DAsync_v2_not;
static PyObject *__pyx_kp_u_Function_cuMemcpy2DUnaligned_v2;
static PyObject *__pyx_kp_u_Function_cuMemcpy2D_v2_not_found;
static PyObject *__pyx_kp_u_Function_cuMemcpy3DAsync_v2_not;
static PyObject *__pyx_kp_u_Function_cuMemcpy3DPeerAsync_not;
static PyObject *__pyx_kp_u_Function_cuMemcpy3DPeer_not_foun;
static PyObject *__pyx_kp_u_Function_cuMemcpy3D_v2_not_found;
static PyObject *__pyx_kp_u_Function_cuMemcpyAsync_not_found;
static PyObject *__pyx_kp_u_Function_cuMemcpyAtoA_v2_not_fou;
static PyObject *__pyx_kp_u_Function_cuMemcpyAtoD_v2_not_fou;
static PyObject *__pyx_kp_u_Function_cuMemcpyAtoHAsync_v2_no;
static PyObject *__pyx_kp_u_Function_cuMemcpyAtoH_v2_not_fou;
static PyObject *__pyx_kp_u_Function_cuMemcpyDtoA_v2_not_fou;
static PyObject *__pyx_kp_u_Function_cuMemcpyDtoDAsync_v2_no;
static PyObject *__pyx_kp_u_Function_cuMemcpyDtoD_v2_not_fou;
static PyObject *__pyx_kp_u_Function_cuMemcpyDtoHAsync_v2_no;
static PyObject *__pyx_kp_u_Function_cuMemcpyDtoH_v2_not_fou;
static PyObject *__pyx_kp_u_Function_cuMemcpyHtoAAsync_v2_no;
static PyObject *__pyx_kp_u_Function_cuMemcpyHtoA_v2_not_fou;
static PyObject *__pyx_kp_u_Function_cuMemcpyHtoDAsync_v2_no;
static PyObject *__pyx_kp_u_Function_cuMemcpyHtoD_v2_not_fou;
static PyObject *__pyx_kp_u_Function_cuMemcpyPeerAsync_not_f;
static PyObject *__pyx_kp_u_Function_cuMemcpyPeer_not_found;
static PyObject *__pyx_kp_u_Function_cuMemcpy_not_found;
static PyObject *__pyx_kp_u_Function_cuMemsetD16Async_not_fo;
static PyObject *__pyx_kp_u_Function_cuMemsetD16_v2_not_foun;
static PyObject *__pyx_kp_u_Function_cuMemsetD2D16Async_not;
static PyObject *__pyx_kp_u_Function_cuMemsetD2D16_v2_not_fo;
static PyObject *__pyx_kp_u_Function_cuMemsetD2D32Async_not;
static PyObject *__pyx_kp_u_Function_cuMemsetD2D32_v2_not_fo;
static PyObject *__pyx_kp_u_Function_cuMemsetD2D8Async_not_f;
static PyObject *__pyx_kp_u_Function_cuMemsetD2D8_v2_not_fou;
static PyObject *__pyx_kp_u_Function_cuMemsetD32Async_not_fo;
static PyObject *__pyx_kp_u_Function_cuMemsetD32_v2_not_foun;
static PyObject *__pyx_kp_u_Function_cuMemsetD8Async_not_fou;
static PyObject *__pyx_kp_u_Function_cuMemsetD8_v2_not_found;
static PyObject *__pyx_kp_u_Function_cuMipmappedArrayCreate;
static PyObject *__pyx_kp_u_Function_cuMipmappedArrayDestroy;
static PyObject *__pyx_kp_u_Function_cuMipmappedArrayGetLeve;
static PyObject *__pyx_kp_u_Function_cuMipmappedArrayGetMemo;
static PyObject *__pyx_kp_u_Function_cuMipmappedArrayGetSpar;
static PyObject *__pyx_kp_u_Function_cuModuleGetFunction_not;
static PyObject *__pyx_kp_u_Function_cuModuleGetGlobal_v2_no;
static PyObject *__pyx_kp_u_Function_cuModuleGetLoadingMode;
static PyObject *__pyx_kp_u_Function_cuModuleGetSurfRef_not;
static PyObject *__pyx_kp_u_Function_cuModuleGetTexRef_not_f;
static PyObject *__pyx_kp_u_Function_cuModuleLoadDataEx_not;
static PyObject *__pyx_kp_u_Function_cuModuleLoadData_not_fo;
static PyObject *__pyx_kp_u_Function_cuModuleLoadFatBinary_n;
static PyObject *__pyx_kp_u_Function_cuModuleLoad_not_found;
static PyObject *__pyx_kp_u_Function_cuModuleUnload_not_foun;
static PyObject *__pyx_kp_u_Function_cuMulticastAddDevice_no;
static PyObject *__pyx_kp_u_Function_cuMulticastBindAddr_not;
static PyObject *__pyx_kp_u_Function_cuMulticastBindMem_not;
static PyObject *__pyx_kp_u_Function_cuMulticastCreate_not_f;
static PyObject *__pyx_kp_u_Function_cuMulticastGetGranulari;
static PyObject *__pyx_kp_u_Function_cuMulticastUnbind_not_f;
static PyObject *__pyx_kp_u_Function_cuOccupancyAvailableDyn;
static PyObject *__pyx_kp_u_Function_cuOccupancyMaxActiveBlo;
static PyObject *__pyx_kp_u_Function_cuOccupancyMaxActiveBlo_2;
static PyObject *__pyx_kp_u_Function_cuOccupancyMaxActiveClu;
static PyObject *__pyx_kp_u_Function_cuOccupancyMaxPotential;
static PyObject *__pyx_kp_u_Function_cuOccupancyMaxPotential_2;
static PyObject *__pyx_kp_u_Function_cuOccupancyMaxPotential_3;
static PyObject *__pyx_kp_u_Function_cuParamSetSize_not_foun;
static PyObject *__pyx_kp_u_Function_cuParamSetTexRef_not_fo;
static PyObject *__pyx_kp_u_Function_cuParamSetf_not_found;
static PyObject *__pyx_kp_u_Function_cuParamSeti_not_found;
static PyObject *__pyx_kp_u_Function_cuParamSetv_not_found;
static PyObject *__pyx_kp_u_Function_cuPointerGetAttribute_n;
static PyObject *__pyx_kp_u_Function_cuPointerGetAttributes;
static PyObject *__pyx_kp_u_Function_cuPointerSetAttribute_n;
static PyObject *__pyx_kp_u_Function_cuProfilerStart_not_fou;
static PyObject *__pyx_kp_u_Function_cuProfilerStop_not_foun;
static PyObject *__pyx_kp_u_Function_cuSignalExternalSemapho;
static PyObject *__pyx_kp_u_Function_cuStreamAddCallback_not;
static PyObject *__pyx_kp_u_Function_cuStreamAttachMemAsync;
static PyObject *__pyx_kp_u_Function_cuStreamBatchMemOp_v2_n;
static PyObject *__pyx_kp_u_Function_cuStreamBeginCapture_v2;
static PyObject *__pyx_kp_u_Function_cuStreamCopyAttributes;
static PyObject *__pyx_kp_u_Function_cuStreamCreateWithPrior;
static PyObject *__pyx_kp_u_Function_cuStreamCreate_not_foun;
static PyObject *__pyx_kp_u_Function_cuStreamDestroy_v2_not;
static PyObject *__pyx_kp_u_Function_cuStreamEndCapture_not;
static PyObject *__pyx_kp_u_Function_cuStreamGetAttribute_no;
static PyObject *__pyx_kp_u_Function_cuStreamGetCaptureInfo;
static PyObject *__pyx_kp_u_Function_cuStreamGetCtx_not_foun;
static PyObject *__pyx_kp_u_Function_cuStreamGetFlags_not_fo;
static PyObject *__pyx_kp_u_Function_cuStreamGetId_not_found;
static PyObject *__pyx_kp_u_Function_cuStreamGetPriority_not;
static PyObject *__pyx_kp_u_Function_cuStreamIsCapturing_not;
static PyObject *__pyx_kp_u_Function_cuStreamQuery_not_found;
static PyObject *__pyx_kp_u_Function_cuStreamSetAttribute_no;
static PyObject *__pyx_kp_u_Function_cuStreamSynchronize_not;
static PyObject *__pyx_kp_u_Function_cuStreamUpdateCaptureDe;
static PyObject *__pyx_kp_u_Function_cuStreamWaitEvent_not_f;
static PyObject *__pyx_kp_u_Function_cuStreamWaitValue32_v2;
static PyObject *__pyx_kp_u_Function_cuStreamWaitValue64_v2;
static PyObject *__pyx_kp_u_Function_cuStreamWriteValue32_v2;
static PyObject *__pyx_kp_u_Function_cuStreamWriteValue64_v2;
static PyObject *__pyx_kp_u_Function_cuSurfObjectCreate_not;
static PyObject *__pyx_kp_u_Function_cuSurfObjectDestroy_not;
static PyObject *__pyx_kp_u_Function_cuSurfObjectGetResource;
static PyObject *__pyx_kp_u_Function_cuSurfRefGetArray_not_f;
static PyObject *__pyx_kp_u_Function_cuSurfRefSetArray_not_f;
static PyObject *__pyx_kp_u_Function_cuTensorMapEncodeIm2col;
static PyObject *__pyx_kp_u_Function_cuTensorMapEncodeTiled;
static PyObject *__pyx_kp_u_Function_cuTensorMapReplaceAddre;
static PyObject *__pyx_kp_u_Function_cuTexObjectCreate_not_f;
static PyObject *__pyx_kp_u_Function_cuTexObjectDestroy_not;
static PyObject *__pyx_kp_u_Function_cuTexObjectGetResourceD;
static PyObject *__pyx_kp_u_Function_cuTexObjectGetResourceV;
static PyObject *__pyx_kp_u_Function_cuTexObjectGetTextureDe;
static PyObject *__pyx_kp_u_Function_cuTexRefCreate_not_foun;
static PyObject *__pyx_kp_u_Function_cuTexRefDestroy_not_fou;
static PyObject *__pyx_kp_u_Function_cuTexRefGetAddressMode;
static PyObject *__pyx_kp_u_Function_cuTexRefGetAddress_v2_n;
static PyObject *__pyx_kp_u_Function_cuTexRefGetArray_not_fo;
static PyObject *__pyx_kp_u_Function_cuTexRefGetBorderColor;
static PyObject *__pyx_kp_u_Function_cuTexRefGetFilterMode_n;
static PyObject *__pyx_kp_u_Function_cuTexRefGetFlags_not_fo;
static PyObject *__pyx_kp_u_Function_cuTexRefGetFormat_not_f;
static PyObject *__pyx_kp_u_Function_cuTexRefGetMaxAnisotrop;
static PyObject *__pyx_kp_u_Function_cuTexRefGetMipmapFilter;
static PyObject *__pyx_kp_u_Function_cuTexRefGetMipmapLevelB;
static PyObject *__pyx_kp_u_Function_cuTexRefGetMipmapLevelC;
static PyObject *__pyx_kp_u_Function_cuTexRefGetMipmappedArr;
static PyObject *__pyx_kp_u_Function_cuTexRefSetAddress2D_v3;
static PyObject *__pyx_kp_u_Function_cuTexRefSetAddressMode;
static PyObject *__pyx_kp_u_Function_cuTexRefSetAddress_v2_n;
static PyObject *__pyx_kp_u_Function_cuTexRefSetArray_not_fo;
static PyObject *__pyx_kp_u_Function_cuTexRefSetBorderColor;
static PyObject *__pyx_kp_u_Function_cuTexRefSetFilterMode_n;
static PyObject *__pyx_kp_u_Function_cuTexRefSetFlags_not_fo;
static PyObject *__pyx_kp_u_Function_cuTexRefSetFormat_not_f;
static PyObject *__pyx_kp_u_Function_cuTexRefSetMaxAnisotrop;
static PyObject *__pyx_kp_u_Function_cuTexRefSetMipmapFilter;
static PyObject *__pyx_kp_u_Function_cuTexRefSetMipmapLevelB;
static PyObject *__pyx_kp_u_Function_cuTexRefSetMipmapLevelC;
static PyObject *__pyx_kp_u_Function_cuTexRefSetMipmappedArr;
static PyObject *__pyx_kp_u_Function_cuThreadExchangeStreamC;
static PyObject *__pyx_kp_u_Function_cuUserObjectCreate_not;
static PyObject *__pyx_kp_u_Function_cuUserObjectRelease_not;
static PyObject *__pyx_kp_u_Function_cuUserObjectRetain_not;
static PyObject *__pyx_kp_u_Function_cuVDPAUCtxCreate_v2_not;
static PyObject *__pyx_kp_u_Function_cuVDPAUGetDevice_not_fo;
static PyObject *__pyx_kp_u_Function_cuWaitExternalSemaphore;
static PyObject *__pyx_n_s_GetProcAddress;
static PyObject *__pyx_n_s_LoadLibraryEx;
static PyObject *__pyx_n_s_RuntimeError;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_u_cuArray3DCreate_v2;
static PyObject *__pyx_n_u_cuArray3DGetDescriptor_v2;
static PyObject *__pyx_n_u_cuArrayCreate_v2;
static PyObject *__pyx_n_u_cuArrayDestroy;
static PyObject *__pyx_n_u_cuArrayGetDescriptor_v2;
static PyObject *__pyx_n_u_cuArrayGetMemoryRequirements;
static PyObject *__pyx_n_u_cuArrayGetPlane;
static PyObject *__pyx_n_u_cuArrayGetSparseProperties;
static PyObject *__pyx_n_u_cuCoredumpGetAttribute;
static PyObject *__pyx_n_u_cuCoredumpGetAttributeGlobal;
static PyObject *__pyx_n_u_cuCoredumpSetAttribute;
static PyObject *__pyx_n_u_cuCoredumpSetAttributeGlobal;
static PyObject *__pyx_n_u_cuCtxAttach;
static PyObject *__pyx_n_u_cuCtxCreate_v2;
static PyObject *__pyx_n_u_cuCtxCreate_v3;
static PyObject *__pyx_n_u_cuCtxDestroy_v2;
static PyObject *__pyx_n_u_cuCtxDetach;
static PyObject *__pyx_n_u_cuCtxDisablePeerAccess;
static PyObject *__pyx_n_u_cuCtxEnablePeerAccess;
static PyObject *__pyx_n_u_cuCtxGetApiVersion;
static PyObject *__pyx_n_u_cuCtxGetCacheConfig;
static PyObject *__pyx_n_u_cuCtxGetCurrent;
static PyObject *__pyx_n_u_cuCtxGetDevice;
static PyObject *__pyx_n_u_cuCtxGetExecAffinity;
static PyObject *__pyx_n_u_cuCtxGetFlags;
static PyObject *__pyx_n_u_cuCtxGetId;
static PyObject *__pyx_n_u_cuCtxGetLimit;
static PyObject *__pyx_n_u_cuCtxGetSharedMemConfig;
static PyObject *__pyx_n_u_cuCtxGetStreamPriorityRange;
static PyObject *__pyx_n_u_cuCtxPopCurrent_v2;
static PyObject *__pyx_n_u_cuCtxPushCurrent_v2;
static PyObject *__pyx_n_u_cuCtxResetPersistingL2Cache;
static PyObject *__pyx_n_u_cuCtxSetCacheConfig;
static PyObject *__pyx_n_u_cuCtxSetCurrent;
static PyObject *__pyx_n_u_cuCtxSetFlags;
static PyObject *__pyx_n_u_cuCtxSetLimit;
static PyObject *__pyx_n_u_cuCtxSetSharedMemConfig;
static PyObject *__pyx_n_u_cuCtxSynchronize;
static PyObject *__pyx_n_u_cuDestroyExternalMemory;
static PyObject *__pyx_n_u_cuDestroyExternalSemaphore;
static PyObject *__pyx_n_u_cuDeviceCanAccessPeer;
static PyObject *__pyx_n_u_cuDeviceComputeCapability;
static PyObject *__pyx_n_u_cuDeviceGet;
static PyObject *__pyx_n_u_cuDeviceGetAttribute;
static PyObject *__pyx_n_u_cuDeviceGetByPCIBusId;
static PyObject *__pyx_n_u_cuDeviceGetCount;
static PyObject *__pyx_n_u_cuDeviceGetDefaultMemPool;
static PyObject *__pyx_n_u_cuDeviceGetExecAffinitySupport;
static PyObject *__pyx_n_u_cuDeviceGetGraphMemAttribute;
static PyObject *__pyx_n_u_cuDeviceGetLuid;
static PyObject *__pyx_n_u_cuDeviceGetMemPool;
static PyObject *__pyx_n_u_cuDeviceGetName;
static PyObject *__pyx_n_u_cuDeviceGetNvSciSyncAttributes;
static PyObject *__pyx_n_u_cuDeviceGetP2PAttribute;
static PyObject *__pyx_n_u_cuDeviceGetPCIBusId;
static PyObject *__pyx_n_u_cuDeviceGetProperties;
static PyObject *__pyx_n_u_cuDeviceGetTexture1DLinearMaxWid;
static PyObject *__pyx_n_u_cuDeviceGetUuid;
static PyObject *__pyx_n_u_cuDeviceGetUuid_v2;
static PyObject *__pyx_n_u_cuDeviceGraphMemTrim;
static PyObject *__pyx_n_u_cuDevicePrimaryCtxGetState;
static PyObject *__pyx_n_u_cuDevicePrimaryCtxRelease_v2;
static PyObject *__pyx_n_u_cuDevicePrimaryCtxReset_v2;
static PyObject *__pyx_n_u_cuDevicePrimaryCtxRetain;
static PyObject *__pyx_n_u_cuDevicePrimaryCtxSetFlags_v2;
static PyObject *__pyx_n_u_cuDeviceSetGraphMemAttribute;
static PyObject *__pyx_n_u_cuDeviceSetMemPool;
static PyObject *__pyx_n_u_cuDeviceTotalMem_v2;
static PyObject *__pyx_n_u_cuDriverGetVersion;
static PyObject *__pyx_n_u_cuEGLStreamConsumerAcquireFrame;
static PyObject *__pyx_n_u_cuEGLStreamConsumerConnect;
static PyObject *__pyx_n_u_cuEGLStreamConsumerConnectWithFl;
static PyObject *__pyx_n_u_cuEGLStreamConsumerDisconnect;
static PyObject *__pyx_n_u_cuEGLStreamConsumerReleaseFrame;
static PyObject *__pyx_n_u_cuEGLStreamProducerConnect;
static PyObject *__pyx_n_u_cuEGLStreamProducerDisconnect;
static PyObject *__pyx_n_u_cuEGLStreamProducerPresentFrame;
static PyObject *__pyx_n_u_cuEGLStreamProducerReturnFrame;
static PyObject *__pyx_n_u_cuEventCreate;
static PyObject *__pyx_n_u_cuEventCreateFromEGLSync;
static PyObject *__pyx_n_u_cuEventDestroy_v2;
static PyObject *__pyx_n_u_cuEventElapsedTime;
static PyObject *__pyx_n_u_cuEventQuery;
static PyObject *__pyx_n_u_cuEventRecord;
static PyObject *__pyx_n_u_cuEventRecordWithFlags;
static PyObject *__pyx_n_u_cuEventRecordWithFlags_ptsz;
static PyObject *__pyx_n_u_cuEventRecord_ptsz;
static PyObject *__pyx_n_u_cuEventSynchronize;
static PyObject *__pyx_n_u_cuExternalMemoryGetMappedBuffer;
static PyObject *__pyx_n_u_cuExternalMemoryGetMappedMipmapp;
static PyObject *__pyx_n_u_cuFlushGPUDirectRDMAWrites;
static PyObject *__pyx_n_u_cuFuncGetAttribute;
static PyObject *__pyx_n_u_cuFuncGetModule;
static PyObject *__pyx_n_u_cuFuncSetAttribute;
static PyObject *__pyx_n_u_cuFuncSetBlockShape;
static PyObject *__pyx_n_u_cuFuncSetCacheConfig;
static PyObject *__pyx_n_u_cuFuncSetSharedMemConfig;
static PyObject *__pyx_n_u_cuFuncSetSharedSize;
static PyObject *__pyx_n_u_cuGLGetDevices_v2;
static PyObject *__pyx_n_u_cuGetErrorName;
static PyObject *__pyx_n_u_cuGetErrorString;
static PyObject *__pyx_n_u_cuGetExportTable;
static PyObject *__pyx_n_u_cuGetProcAddress_v2;
static PyObject *__pyx_n_u_cuGraphAddBatchMemOpNode;
static PyObject *__pyx_n_u_cuGraphAddChildGraphNode;
static PyObject *__pyx_n_u_cuGraphAddDependencies;
static PyObject *__pyx_n_u_cuGraphAddEmptyNode;
static PyObject *__pyx_n_u_cuGraphAddEventRecordNode;
static PyObject *__pyx_n_u_cuGraphAddEventWaitNode;
static PyObject *__pyx_n_u_cuGraphAddExternalSemaphoresSign;
static PyObject *__pyx_n_u_cuGraphAddExternalSemaphoresWait;
static PyObject *__pyx_n_u_cuGraphAddHostNode;
static PyObject *__pyx_n_u_cuGraphAddKernelNode_v2;
static PyObject *__pyx_n_u_cuGraphAddMemAllocNode;
static PyObject *__pyx_n_u_cuGraphAddMemFreeNode;
static PyObject *__pyx_n_u_cuGraphAddMemcpyNode;
static PyObject *__pyx_n_u_cuGraphAddMemsetNode;
static PyObject *__pyx_n_u_cuGraphAddNode;
static PyObject *__pyx_n_u_cuGraphBatchMemOpNodeGetParams;
static PyObject *__pyx_n_u_cuGraphBatchMemOpNodeSetParams;
static PyObject *__pyx_n_u_cuGraphChildGraphNodeGetGraph;
static PyObject *__pyx_n_u_cuGraphClone;
static PyObject *__pyx_n_u_cuGraphCreate;
static PyObject *__pyx_n_u_cuGraphDebugDotPrint;
static PyObject *__pyx_n_u_cuGraphDestroy;
static PyObject *__pyx_n_u_cuGraphDestroyNode;
static PyObject *__pyx_n_u_cuGraphEventRecordNodeGetEvent;
static PyObject *__pyx_n_u_cuGraphEventRecordNodeSetEvent;
static PyObject *__pyx_n_u_cuGraphEventWaitNodeGetEvent;
static PyObject *__pyx_n_u_cuGraphEventWaitNodeSetEvent;
static PyObject *__pyx_n_u_cuGraphExecBatchMemOpNodeSetPara;
static PyObject *__pyx_n_u_cuGraphExecChildGraphNodeSetPara;
static PyObject *__pyx_n_u_cuGraphExecDestroy;
static PyObject *__pyx_n_u_cuGraphExecEventRecordNodeSetEve;
static PyObject *__pyx_n_u_cuGraphExecEventWaitNodeSetEvent;
static PyObject *__pyx_n_u_cuGraphExecExternalSemaphoresSig;
static PyObject *__pyx_n_u_cuGraphExecExternalSemaphoresWai;
static PyObject *__pyx_n_u_cuGraphExecGetFlags;
static PyObject *__pyx_n_u_cuGraphExecHostNodeSetParams;
static PyObject *__pyx_n_u_cuGraphExecKernelNodeSetParams_v;
static PyObject *__pyx_n_u_cuGraphExecMemcpyNodeSetParams;
static PyObject *__pyx_n_u_cuGraphExecMemsetNodeSetParams;
static PyObject *__pyx_n_u_cuGraphExecNodeSetParams;
static PyObject *__pyx_n_u_cuGraphExecUpdate_v2;
static PyObject *__pyx_n_u_cuGraphExternalSemaphoresSignalN;
static PyObject *__pyx_n_u_cuGraphExternalSemaphoresSignalN_2;
static PyObject *__pyx_n_u_cuGraphExternalSemaphoresWaitNod;
static PyObject *__pyx_n_u_cuGraphExternalSemaphoresWaitNod_2;
static PyObject *__pyx_n_u_cuGraphGetEdges;
static PyObject *__pyx_n_u_cuGraphGetNodes;
static PyObject *__pyx_n_u_cuGraphGetRootNodes;
static PyObject *__pyx_n_u_cuGraphHostNodeGetParams;
static PyObject *__pyx_n_u_cuGraphHostNodeSetParams;
static PyObject *__pyx_n_u_cuGraphInstantiateWithFlags;
static PyObject *__pyx_n_u_cuGraphInstantiateWithParams;
static PyObject *__pyx_n_u_cuGraphInstantiateWithParams_pts;
static PyObject *__pyx_n_u_cuGraphKernelNodeCopyAttributes;
static PyObject *__pyx_n_u_cuGraphKernelNodeGetAttribute;
static PyObject *__pyx_n_u_cuGraphKernelNodeGetParams_v2;
static PyObject *__pyx_n_u_cuGraphKernelNodeSetAttribute;
static PyObject *__pyx_n_u_cuGraphKernelNodeSetParams_v2;
static PyObject *__pyx_n_u_cuGraphLaunch;
static PyObject *__pyx_n_u_cuGraphLaunch_ptsz;
static PyObject *__pyx_n_u_cuGraphMemAllocNodeGetParams;
static PyObject *__pyx_n_u_cuGraphMemFreeNodeGetParams;
static PyObject *__pyx_n_u_cuGraphMemcpyNodeGetParams;
static PyObject *__pyx_n_u_cuGraphMemcpyNodeSetParams;
static PyObject *__pyx_n_u_cuGraphMemsetNodeGetParams;
static PyObject *__pyx_n_u_cuGraphMemsetNodeSetParams;
static PyObject *__pyx_n_u_cuGraphNodeFindInClone;
static PyObject *__pyx_n_u_cuGraphNodeGetDependencies;
static PyObject *__pyx_n_u_cuGraphNodeGetDependentNodes;
static PyObject *__pyx_n_u_cuGraphNodeGetEnabled;
static PyObject *__pyx_n_u_cuGraphNodeGetType;
static PyObject *__pyx_n_u_cuGraphNodeSetEnabled;
static PyObject *__pyx_n_u_cuGraphNodeSetParams;
static PyObject *__pyx_n_u_cuGraphReleaseUserObject;
static PyObject *__pyx_n_u_cuGraphRemoveDependencies;
static PyObject *__pyx_n_u_cuGraphRetainUserObject;
static PyObject *__pyx_n_u_cuGraphUpload;
static PyObject *__pyx_n_u_cuGraphUpload_ptsz;
static PyObject *__pyx_n_u_cuGraphicsEGLRegisterImage;
static PyObject *__pyx_n_u_cuGraphicsGLRegisterBuffer;
static PyObject *__pyx_n_u_cuGraphicsGLRegisterImage;
static PyObject *__pyx_n_u_cuGraphicsMapResources;
static PyObject *__pyx_n_u_cuGraphicsMapResources_ptsz;
static PyObject *__pyx_n_u_cuGraphicsResourceGetMappedEglFr;
static PyObject *__pyx_n_u_cuGraphicsResourceGetMappedMipma;
static PyObject *__pyx_n_u_cuGraphicsResourceGetMappedPoint;
static PyObject *__pyx_n_u_cuGraphicsResourceSetMapFlags_v2;
static PyObject *__pyx_n_u_cuGraphicsSubResourceGetMappedAr;
static PyObject *__pyx_n_u_cuGraphicsUnmapResources;
static PyObject *__pyx_n_u_cuGraphicsUnmapResources_ptsz;
static PyObject *__pyx_n_u_cuGraphicsUnregisterResource;
static PyObject *__pyx_n_u_cuGraphicsVDPAURegisterOutputSur;
static PyObject *__pyx_n_u_cuGraphicsVDPAURegisterVideoSurf;
static PyObject *__pyx_n_u_cuImportExternalMemory;
static PyObject *__pyx_n_u_cuImportExternalSemaphore;
static PyObject *__pyx_n_u_cuInit;
static PyObject *__pyx_n_u_cuIpcCloseMemHandle;
static PyObject *__pyx_n_u_cuIpcGetEventHandle;
static PyObject *__pyx_n_u_cuIpcGetMemHandle;
static PyObject *__pyx_n_u_cuIpcOpenEventHandle;
static PyObject *__pyx_n_u_cuIpcOpenMemHandle_v2;
static PyObject *__pyx_n_u_cuKernelGetAttribute;
static PyObject *__pyx_n_u_cuKernelGetFunction;
static PyObject *__pyx_n_u_cuKernelSetAttribute;
static PyObject *__pyx_n_u_cuKernelSetCacheConfig;
static PyObject *__pyx_n_u_cuLaunch;
static PyObject *__pyx_n_u_cuLaunchCooperativeKernel;
static PyObject *__pyx_n_u_cuLaunchCooperativeKernelMultiDe;
static PyObject *__pyx_n_u_cuLaunchCooperativeKernel_ptsz;
static PyObject *__pyx_n_u_cuLaunchGrid;
static PyObject *__pyx_n_u_cuLaunchGridAsync;
static PyObject *__pyx_n_u_cuLaunchHostFunc;
static PyObject *__pyx_n_u_cuLaunchHostFunc_ptsz;
static PyObject *__pyx_n_u_cuLaunchKernel;
static PyObject *__pyx_n_u_cuLaunchKernelEx;
static PyObject *__pyx_n_u_cuLaunchKernelEx_ptsz;
static PyObject *__pyx_n_u_cuLaunchKernel_ptsz;
static PyObject *__pyx_n_u_cuLibraryGetGlobal;
static PyObject *__pyx_n_u_cuLibraryGetKernel;
static PyObject *__pyx_n_u_cuLibraryGetManaged;
static PyObject *__pyx_n_u_cuLibraryGetModule;
static PyObject *__pyx_n_u_cuLibraryGetUnifiedFunction;
static PyObject *__pyx_n_u_cuLibraryLoadData;
static PyObject *__pyx_n_u_cuLibraryLoadFromFile;
static PyObject *__pyx_n_u_cuLibraryUnload;
static PyObject *__pyx_n_u_cuLinkAddData_v2;
static PyObject *__pyx_n_u_cuLinkAddFile_v2;
static PyObject *__pyx_n_u_cuLinkComplete;
static PyObject *__pyx_n_u_cuLinkCreate_v2;
static PyObject *__pyx_n_u_cuLinkDestroy;
static PyObject *__pyx_n_u_cuMemAddressFree;
static PyObject *__pyx_n_u_cuMemAddressReserve;
static PyObject *__pyx_n_u_cuMemAdvise;
static PyObject *__pyx_n_u_cuMemAdvise_v2;
static PyObject *__pyx_n_u_cuMemAllocAsync;
static PyObject *__pyx_n_u_cuMemAllocAsync_ptsz;
static PyObject *__pyx_n_u_cuMemAllocFromPoolAsync;
static PyObject *__pyx_n_u_cuMemAllocFromPoolAsync_ptsz;
static PyObject *__pyx_n_u_cuMemAllocHost_v2;
static PyObject *__pyx_n_u_cuMemAllocManaged;
static PyObject *__pyx_n_u_cuMemAllocPitch_v2;
static PyObject *__pyx_n_u_cuMemAlloc_v2;
static PyObject *__pyx_n_u_cuMemCreate;
static PyObject *__pyx_n_u_cuMemExportToShareableHandle;
static PyObject *__pyx_n_u_cuMemFreeAsync;
static PyObject *__pyx_n_u_cuMemFreeAsync_ptsz;
static PyObject *__pyx_n_u_cuMemFreeHost;
static PyObject *__pyx_n_u_cuMemFree_v2;
static PyObject *__pyx_n_u_cuMemGetAccess;
static PyObject *__pyx_n_u_cuMemGetAddressRange_v2;
static PyObject *__pyx_n_u_cuMemGetAllocationGranularity;
static PyObject *__pyx_n_u_cuMemGetAllocationPropertiesFrom;
static PyObject *__pyx_n_u_cuMemGetHandleForAddressRange;
static PyObject *__pyx_n_u_cuMemGetInfo_v2;
static PyObject *__pyx_n_u_cuMemHostAlloc;
static PyObject *__pyx_n_u_cuMemHostGetDevicePointer_v2;
static PyObject *__pyx_n_u_cuMemHostGetFlags;
static PyObject *__pyx_n_u_cuMemHostRegister_v2;
static PyObject *__pyx_n_u_cuMemHostUnregister;
static PyObject *__pyx_n_u_cuMemImportFromShareableHandle;
static PyObject *__pyx_n_u_cuMemMap;
static PyObject *__pyx_n_u_cuMemMapArrayAsync;
static PyObject *__pyx_n_u_cuMemMapArrayAsync_ptsz;
static PyObject *__pyx_n_u_cuMemPoolCreate;
static PyObject *__pyx_n_u_cuMemPoolDestroy;
static PyObject *__pyx_n_u_cuMemPoolExportPointer;
static PyObject *__pyx_n_u_cuMemPoolExportToShareableHandle;
static PyObject *__pyx_n_u_cuMemPoolGetAccess;
static PyObject *__pyx_n_u_cuMemPoolGetAttribute;
static PyObject *__pyx_n_u_cuMemPoolImportFromShareableHand;
static PyObject *__pyx_n_u_cuMemPoolImportPointer;
static PyObject *__pyx_n_u_cuMemPoolSetAccess;
static PyObject *__pyx_n_u_cuMemPoolSetAttribute;
static PyObject *__pyx_n_u_cuMemPoolTrimTo;
static PyObject *__pyx_n_u_cuMemPrefetchAsync;
static PyObject *__pyx_n_u_cuMemPrefetchAsync_ptsz;
static PyObject *__pyx_n_u_cuMemPrefetchAsync_v2;
static PyObject *__pyx_n_u_cuMemPrefetchAsync_v2_ptsz;
static PyObject *__pyx_n_u_cuMemRangeGetAttribute;
static PyObject *__pyx_n_u_cuMemRangeGetAttributes;
static PyObject *__pyx_n_u_cuMemRelease;
static PyObject *__pyx_n_u_cuMemRetainAllocationHandle;
static PyObject *__pyx_n_u_cuMemSetAccess;
static PyObject *__pyx_n_u_cuMemUnmap;
static PyObject *__pyx_n_u_cuMemcpy;
static PyObject *__pyx_n_u_cuMemcpy2DAsync_v2;
static PyObject *__pyx_n_u_cuMemcpy2DAsync_v2_ptsz;
static PyObject *__pyx_n_u_cuMemcpy2DUnaligned_v2;
static PyObject *__pyx_n_u_cuMemcpy2DUnaligned_v2_ptds;
static PyObject *__pyx_n_u_cuMemcpy2D_v2;
static PyObject *__pyx_n_u_cuMemcpy2D_v2_ptds;
static PyObject *__pyx_n_u_cuMemcpy3DAsync_v2;
static PyObject *__pyx_n_u_cuMemcpy3DAsync_v2_ptsz;
static PyObject *__pyx_n_u_cuMemcpy3DPeer;
static PyObject *__pyx_n_u_cuMemcpy3DPeerAsync;
static PyObject *__pyx_n_u_cuMemcpy3DPeerAsync_ptsz;
static PyObject *__pyx_n_u_cuMemcpy3DPeer_ptds;
static PyObject *__pyx_n_u_cuMemcpy3D_v2;
static PyObject *__pyx_n_u_cuMemcpy3D_v2_ptds;
static PyObject *__pyx_n_u_cuMemcpyAsync;
static PyObject *__pyx_n_u_cuMemcpyAsync_ptsz;
static PyObject *__pyx_n_u_cuMemcpyAtoA_v2;
static PyObject *__pyx_n_u_cuMemcpyAtoA_v2_ptds;
static PyObject *__pyx_n_u_cuMemcpyAtoD_v2;
static PyObject *__pyx_n_u_cuMemcpyAtoD_v2_ptds;
static PyObject *__pyx_n_u_cuMemcpyAtoHAsync_v2;
static PyObject *__pyx_n_u_cuMemcpyAtoHAsync_v2_ptsz;
static PyObject *__pyx_n_u_cuMemcpyAtoH_v2;
static PyObject *__pyx_n_u_cuMemcpyAtoH_v2_ptds;
static PyObject *__pyx_n_u_cuMemcpyDtoA_v2;
static PyObject *__pyx_n_u_cuMemcpyDtoA_v2_ptds;
static PyObject *__pyx_n_u_cuMemcpyDtoDAsync_v2;
static PyObject *__pyx_n_u_cuMemcpyDtoDAsync_v2_ptsz;
static PyObject *__pyx_n_u_cuMemcpyDtoD_v2;
static PyObject *__pyx_n_u_cuMemcpyDtoD_v2_ptds;
static PyObject *__pyx_n_u_cuMemcpyDtoHAsync_v2;
static PyObject *__pyx_n_u_cuMemcpyDtoHAsync_v2_ptsz;
static PyObject *__pyx_n_u_cuMemcpyDtoH_v2;
static PyObject *__pyx_n_u_cuMemcpyDtoH_v2_ptds;
static PyObject *__pyx_n_u_cuMemcpyHtoAAsync_v2;
static PyObject *__pyx_n_u_cuMemcpyHtoAAsync_v2_ptsz;
static PyObject *__pyx_n_u_cuMemcpyHtoA_v2;
static PyObject *__pyx_n_u_cuMemcpyHtoA_v2_ptds;
static PyObject *__pyx_n_u_cuMemcpyHtoDAsync_v2;
static PyObject *__pyx_n_u_cuMemcpyHtoDAsync_v2_ptsz;
static PyObject *__pyx_n_u_cuMemcpyHtoD_v2;
static PyObject *__pyx_n_u_cuMemcpyHtoD_v2_ptds;
static PyObject *__pyx_n_u_cuMemcpyPeer;
static PyObject *__pyx_n_u_cuMemcpyPeerAsync;
static PyObject *__pyx_n_u_cuMemcpyPeerAsync_ptsz;
static PyObject *__pyx_n_u_cuMemcpyPeer_ptds;
static PyObject *__pyx_n_u_cuMemcpy_ptds;
static PyObject *__pyx_n_u_cuMemsetD16Async;
static PyObject *__pyx_n_u_cuMemsetD16Async_ptsz;
static PyObject *__pyx_n_u_cuMemsetD16_v2;
static PyObject *__pyx_n_u_cuMemsetD16_v2_ptds;
static PyObject *__pyx_n_u_cuMemsetD2D16Async;
static PyObject *__pyx_n_u_cuMemsetD2D16Async_ptsz;
static PyObject *__pyx_n_u_cuMemsetD2D16_v2;
static PyObject *__pyx_n_u_cuMemsetD2D16_v2_ptds;
static PyObject *__pyx_n_u_cuMemsetD2D32Async;
static PyObject *__pyx_n_u_cuMemsetD2D32Async_ptsz;
static PyObject *__pyx_n_u_cuMemsetD2D32_v2;
static PyObject *__pyx_n_u_cuMemsetD2D32_v2_ptds;
static PyObject *__pyx_n_u_cuMemsetD2D8Async;
static PyObject *__pyx_n_u_cuMemsetD2D8Async_ptsz;
static PyObject *__pyx_n_u_cuMemsetD2D8_v2;
static PyObject *__pyx_n_u_cuMemsetD2D8_v2_ptds;
static PyObject *__pyx_n_u_cuMemsetD32Async;
static PyObject *__pyx_n_u_cuMemsetD32Async_ptsz;
static PyObject *__pyx_n_u_cuMemsetD32_v2;
static PyObject *__pyx_n_u_cuMemsetD32_v2_ptds;
static PyObject *__pyx_n_u_cuMemsetD8Async;
static PyObject *__pyx_n_u_cuMemsetD8Async_ptsz;
static PyObject *__pyx_n_u_cuMemsetD8_v2;
static PyObject *__pyx_n_u_cuMemsetD8_v2_ptds;
static PyObject *__pyx_n_u_cuMipmappedArrayCreate;
static PyObject *__pyx_n_u_cuMipmappedArrayDestroy;
static PyObject *__pyx_n_u_cuMipmappedArrayGetLevel;
static PyObject *__pyx_n_u_cuMipmappedArrayGetMemoryRequire;
static PyObject *__pyx_n_u_cuMipmappedArrayGetSparsePropert;
static PyObject *__pyx_n_u_cuModuleGetFunction;
static PyObject *__pyx_n_u_cuModuleGetGlobal_v2;
static PyObject *__pyx_n_u_cuModuleGetLoadingMode;
static PyObject *__pyx_n_u_cuModuleGetSurfRef;
static PyObject *__pyx_n_u_cuModuleGetTexRef;
static PyObject *__pyx_n_u_cuModuleLoad;
static PyObject *__pyx_n_u_cuModuleLoadData;
static PyObject *__pyx_n_u_cuModuleLoadDataEx;
static PyObject *__pyx_n_u_cuModuleLoadFatBinary;
static PyObject *__pyx_n_u_cuModuleUnload;
static PyObject *__pyx_n_u_cuMulticastAddDevice;
static PyObject *__pyx_n_u_cuMulticastBindAddr;
static PyObject *__pyx_n_u_cuMulticastBindMem;
static PyObject *__pyx_n_u_cuMulticastCreate;
static PyObject *__pyx_n_u_cuMulticastGetGranularity;
static PyObject *__pyx_n_u_cuMulticastUnbind;
static PyObject *__pyx_n_u_cuOccupancyAvailableDynamicSMemP;
static PyObject *__pyx_n_u_cuOccupancyMaxActiveBlocksPerMul;
static PyObject *__pyx_n_u_cuOccupancyMaxActiveBlocksPerMul_2;
static PyObject *__pyx_n_u_cuOccupancyMaxActiveClusters;
static PyObject *__pyx_n_u_cuOccupancyMaxPotentialBlockSize;
static PyObject *__pyx_n_u_cuOccupancyMaxPotentialBlockSize_2;
static PyObject *__pyx_n_u_cuOccupancyMaxPotentialClusterSi;
static PyObject *__pyx_n_u_cuParamSetSize;
static PyObject *__pyx_n_u_cuParamSetTexRef;
static PyObject *__pyx_n_u_cuParamSetf;
static PyObject *__pyx_n_u_cuParamSeti;
static PyObject *__pyx_n_u_cuParamSetv;
static PyObject *__pyx_n_u_cuPointerGetAttribute;
static PyObject *__pyx_n_u_cuPointerGetAttributes;
static PyObject *__pyx_n_u_cuPointerSetAttribute;
static PyObject *__pyx_n_u_cuProfilerStart;
static PyObject *__pyx_n_u_cuProfilerStop;
static PyObject *__pyx_n_u_cuSignalExternalSemaphoresAsync;
static PyObject *__pyx_n_u_cuSignalExternalSemaphoresAsync_2;
static PyObject *__pyx_n_u_cuStreamAddCallback;
static PyObject *__pyx_n_u_cuStreamAddCallback_ptsz;
static PyObject *__pyx_n_u_cuStreamAttachMemAsync;
static PyObject *__pyx_n_u_cuStreamAttachMemAsync_ptsz;
static PyObject *__pyx_n_u_cuStreamBatchMemOp_v2;
static PyObject *__pyx_n_u_cuStreamBatchMemOp_v2_ptsz;
static PyObject *__pyx_n_u_cuStreamBeginCapture_v2;
static PyObject *__pyx_n_u_cuStreamBeginCapture_v2_ptsz;
static PyObject *__pyx_n_u_cuStreamCopyAttributes;
static PyObject *__pyx_n_u_cuStreamCopyAttributes_ptsz;
static PyObject *__pyx_n_u_cuStreamCreate;
static PyObject *__pyx_n_u_cuStreamCreateWithPriority;
static PyObject *__pyx_n_u_cuStreamDestroy_v2;
static PyObject *__pyx_n_u_cuStreamEndCapture;
static PyObject *__pyx_n_u_cuStreamEndCapture_ptsz;
static PyObject *__pyx_n_u_cuStreamGetAttribute;
static PyObject *__pyx_n_u_cuStreamGetAttribute_ptsz;
static PyObject *__pyx_n_u_cuStreamGetCaptureInfo_v2;
static PyObject *__pyx_n_u_cuStreamGetCaptureInfo_v2_ptsz;
static PyObject *__pyx_n_u_cuStreamGetCtx;
static PyObject *__pyx_n_u_cuStreamGetCtx_ptsz;
static PyObject *__pyx_n_u_cuStreamGetFlags;
static PyObject *__pyx_n_u_cuStreamGetFlags_ptsz;
static PyObject *__pyx_n_u_cuStreamGetId;
static PyObject *__pyx_n_u_cuStreamGetId_ptsz;
static PyObject *__pyx_n_u_cuStreamGetPriority;
static PyObject *__pyx_n_u_cuStreamGetPriority_ptsz;
static PyObject *__pyx_n_u_cuStreamIsCapturing;
static PyObject *__pyx_n_u_cuStreamIsCapturing_ptsz;
static PyObject *__pyx_n_u_cuStreamQuery;
static PyObject *__pyx_n_u_cuStreamQuery_ptsz;
static PyObject *__pyx_n_u_cuStreamSetAttribute;
static PyObject *__pyx_n_u_cuStreamSetAttribute_ptsz;
static PyObject *__pyx_n_u_cuStreamSynchronize;
static PyObject *__pyx_n_u_cuStreamSynchronize_ptsz;
static PyObject *__pyx_n_u_cuStreamUpdateCaptureDependencie;
static PyObject *__pyx_n_u_cuStreamUpdateCaptureDependencie_2;
static PyObject *__pyx_n_u_cuStreamWaitEvent;
static PyObject *__pyx_n_u_cuStreamWaitEvent_ptsz;
static PyObject *__pyx_n_u_cuStreamWaitValue32_v2;
static PyObject *__pyx_n_u_cuStreamWaitValue32_v2_ptsz;
static PyObject *__pyx_n_u_cuStreamWaitValue64_v2;
static PyObject *__pyx_n_u_cuStreamWaitValue64_v2_ptsz;
static PyObject *__pyx_n_u_cuStreamWriteValue32_v2;
static PyObject *__pyx_n_u_cuStreamWriteValue32_v2_ptsz;
static PyObject *__pyx_n_u_cuStreamWriteValue64_v2;
static PyObject *__pyx_n_u_cuStreamWriteValue64_v2_ptsz;
static PyObject *__pyx_n_u_cuSurfObjectCreate;
static PyObject *__pyx_n_u_cuSurfObjectDestroy;
static PyObject *__pyx_n_u_cuSurfObjectGetResourceDesc;
static PyObject *__pyx_n_u_cuSurfRefGetArray;
static PyObject *__pyx_n_u_cuSurfRefSetArray;
static PyObject *__pyx_n_u_cuTensorMapEncodeIm2col;
static PyObject *__pyx_n_u_cuTensorMapEncodeTiled;
static PyObject *__pyx_n_u_cuTensorMapReplaceAddress;
static PyObject *__pyx_n_u_cuTexObjectCreate;
static PyObject *__pyx_n_u_cuTexObjectDestroy;
static PyObject *__pyx_n_u_cuTexObjectGetResourceDesc;
static PyObject *__pyx_n_u_cuTexObjectGetResourceViewDesc;
static PyObject *__pyx_n_u_cuTexObjectGetTextureDesc;
static PyObject *__pyx_n_u_cuTexRefCreate;
static PyObject *__pyx_n_u_cuTexRefDestroy;
static PyObject *__pyx_n_u_cuTexRefGetAddressMode;
static PyObject *__pyx_n_u_cuTexRefGetAddress_v2;
static PyObject *__pyx_n_u_cuTexRefGetArray;
static PyObject *__pyx_n_u_cuTexRefGetBorderColor;
static PyObject *__pyx_n_u_cuTexRefGetFilterMode;
static PyObject *__pyx_n_u_cuTexRefGetFlags;
static PyObject *__pyx_n_u_cuTexRefGetFormat;
static PyObject *__pyx_n_u_cuTexRefGetMaxAnisotropy;
static PyObject *__pyx_n_u_cuTexRefGetMipmapFilterMode;
static PyObject *__pyx_n_u_cuTexRefGetMipmapLevelBias;
static PyObject *__pyx_n_u_cuTexRefGetMipmapLevelClamp;
static PyObject *__pyx_n_u_cuTexRefGetMipmappedArray;
static PyObject *__pyx_n_u_cuTexRefSetAddress2D_v3;
static PyObject *__pyx_n_u_cuTexRefSetAddressMode;
static PyObject *__pyx_n_u_cuTexRefSetAddress_v2;
static PyObject *__pyx_n_u_cuTexRefSetArray;
static PyObject *__pyx_n_u_cuTexRefSetBorderColor;
static PyObject *__pyx_n_u_cuTexRefSetFilterMode;
static PyObject *__pyx_n_u_cuTexRefSetFlags;
static PyObject *__pyx_n_u_cuTexRefSetFormat;
static PyObject *__pyx_n_u_cuTexRefSetMaxAnisotropy;
static PyObject *__pyx_n_u_cuTexRefSetMipmapFilterMode;
static PyObject *__pyx_n_u_cuTexRefSetMipmapLevelBias;
static PyObject *__pyx_n_u_cuTexRefSetMipmapLevelClamp;
static PyObject *__pyx_n_u_cuTexRefSetMipmappedArray;
static PyObject *__pyx_n_u_cuThreadExchangeStreamCaptureMod;
static PyObject *__pyx_n_u_cuUserObjectCreate;
static PyObject *__pyx_n_u_cuUserObjectRelease;
static PyObject *__pyx_n_u_cuUserObjectRetain;
static PyObject *__pyx_n_u_cuVDPAUCtxCreate_v2;
static PyObject *__pyx_n_u_cuVDPAUGetDevice;
static PyObject *__pyx_n_u_cuWaitExternalSemaphoresAsync;
static PyObject *__pyx_n_u_cuWaitExternalSemaphoresAsync_pt;
static PyObject *__pyx_n_s_default;
static PyObject *__pyx_n_s_error;
static PyObject *__pyx_n_s_getenv;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_maxsize;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_kp_u_nvcuda_dll;
static PyObject *__pyx_n_s_os;
static PyObject *__pyx_n_s_pywintypes;
static PyObject *__pyx_n_s_struct;
static PyObject *__pyx_n_s_sys;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_win32api;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_4294967296;
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__8;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__12;
static PyObject *__pyx_tuple__13;
static PyObject *__pyx_tuple__14;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__17;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__19;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__21;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_tuple__23;
static PyObject *__pyx_tuple__24;
static PyObject *__pyx_tuple__25;
static PyObject *__pyx_tuple__26;
static PyObject *__pyx_tuple__27;
static PyObject *__pyx_tuple__28;
static PyObject *__pyx_tuple__29;
static PyObject *__pyx_tuple__30;
static PyObject *__pyx_tuple__31;
static PyObject *__pyx_tuple__32;
static PyObject *__pyx_tuple__33;
static PyObject *__pyx_tuple__34;
static PyObject *__pyx_tuple__35;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__37;
static PyObject *__pyx_tuple__38;
static PyObject *__pyx_tuple__39;
static PyObject *__pyx_tuple__40;
static PyObject *__pyx_tuple__41;
static PyObject *__pyx_tuple__42;
static PyObject *__pyx_tuple__43;
static PyObject *__pyx_tuple__44;
static PyObject *__pyx_tuple__45;
static PyObject *__pyx_tuple__46;
static PyObject *__pyx_tuple__47;
static PyObject *__pyx_tuple__48;
static PyObject *__pyx_tuple__49;
static PyObject *__pyx_tuple__50;
static PyObject *__pyx_tuple__51;
static PyObject *__pyx_tuple__52;
static PyObject *__pyx_tuple__53;
static PyObject *__pyx_tuple__54;
static PyObject *__pyx_tuple__55;
static PyObject *__pyx_tuple__56;
static PyObject *__pyx_tuple__57;
static PyObject *__pyx_tuple__58;
static PyObject *__pyx_tuple__59;
static PyObject *__pyx_tuple__60;
static PyObject *__pyx_tuple__61;
static PyObject *__pyx_tuple__62;
static PyObject *__pyx_tuple__63;
static PyObject *__pyx_tuple__64;
static PyObject *__pyx_tuple__65;
static PyObject *__pyx_tuple__66;
static PyObject *__pyx_tuple__67;
static PyObject *__pyx_tuple__68;
static PyObject *__pyx_tuple__69;
static PyObject *__pyx_tuple__70;
static PyObject *__pyx_tuple__71;
static PyObject *__pyx_tuple__72;
static PyObject *__pyx_tuple__73;
static PyObject *__pyx_tuple__74;
static PyObject *__pyx_tuple__75;
static PyObject *__pyx_tuple__76;
static PyObject *__pyx_tuple__77;
static PyObject *__pyx_tuple__78;
static PyObject *__pyx_tuple__79;
static PyObject *__pyx_tuple__80;
static PyObject *__pyx_tuple__81;
static PyObject *__pyx_tuple__82;
static PyObject *__pyx_tuple__83;
static PyObject *__pyx_tuple__84;
static PyObject *__pyx_tuple__85;
static PyObject *__pyx_tuple__86;
static PyObject *__pyx_tuple__87;
static PyObject *__pyx_tuple__88;
static PyObject *__pyx_tuple__89;
static PyObject *__pyx_tuple__90;
static PyObject *__pyx_tuple__91;
static PyObject *__pyx_tuple__92;
static PyObject *__pyx_tuple__93;
static PyObject *__pyx_tuple__94;
static PyObject *__pyx_tuple__95;
static PyObject *__pyx_tuple__96;
static PyObject *__pyx_tuple__97;
static PyObject *__pyx_tuple__98;
static PyObject *__pyx_tuple__99;
static PyObject *__pyx_tuple__100;
static PyObject *__pyx_tuple__101;
static PyObject *__pyx_tuple__102;
static PyObject *__pyx_tuple__103;
static PyObject *__pyx_tuple__104;
static PyObject *__pyx_tuple__105;
static PyObject *__pyx_tuple__106;
static PyObject *__pyx_tuple__107;
static PyObject *__pyx_tuple__108;
static PyObject *__pyx_tuple__109;
static PyObject *__pyx_tuple__110;
static PyObject *__pyx_tuple__111;
static PyObject *__pyx_tuple__112;
static PyObject *__pyx_tuple__113;
static PyObject *__pyx_tuple__114;
static PyObject *__pyx_tuple__115;
static PyObject *__pyx_tuple__116;
static PyObject *__pyx_tuple__117;
static PyObject *__pyx_tuple__118;
static PyObject *__pyx_tuple__119;
static PyObject *__pyx_tuple__120;
static PyObject *__pyx_tuple__121;
static PyObject *__pyx_tuple__122;
static PyObject *__pyx_tuple__123;
static PyObject *__pyx_tuple__124;
static PyObject *__pyx_tuple__125;
static PyObject *__pyx_tuple__126;
static PyObject *__pyx_tuple__127;
static PyObject *__pyx_tuple__128;
static PyObject *__pyx_tuple__129;
static PyObject *__pyx_tuple__130;
static PyObject *__pyx_tuple__131;
static PyObject *__pyx_tuple__132;
static PyObject *__pyx_tuple__133;
static PyObject *__pyx_tuple__134;
static PyObject *__pyx_tuple__135;
static PyObject *__pyx_tuple__136;
static PyObject *__pyx_tuple__137;
static PyObject *__pyx_tuple__138;
static PyObject *__pyx_tuple__139;
static PyObject *__pyx_tuple__140;
static PyObject *__pyx_tuple__141;
static PyObject *__pyx_tuple__142;
static PyObject *__pyx_tuple__143;
static PyObject *__pyx_tuple__144;
static PyObject *__pyx_tuple__145;
static PyObject *__pyx_tuple__146;
static PyObject *__pyx_tuple__147;
static PyObject *__pyx_tuple__148;
static PyObject *__pyx_tuple__149;
static PyObject *__pyx_tuple__150;
static PyObject *__pyx_tuple__151;
static PyObject *__pyx_tuple__152;
static PyObject *__pyx_tuple__153;
static PyObject *__pyx_tuple__154;
static PyObject *__pyx_tuple__155;
static PyObject *__pyx_tuple__156;
static PyObject *__pyx_tuple__157;
static PyObject *__pyx_tuple__158;
static PyObject *__pyx_tuple__159;
static PyObject *__pyx_tuple__160;
static PyObject *__pyx_tuple__161;
static PyObject *__pyx_tuple__162;
static PyObject *__pyx_tuple__163;
static PyObject *__pyx_tuple__164;
static PyObject *__pyx_tuple__165;
static PyObject *__pyx_tuple__166;
static PyObject *__pyx_tuple__167;
static PyObject *__pyx_tuple__168;
static PyObject *__pyx_tuple__169;
static PyObject *__pyx_tuple__170;
static PyObject *__pyx_tuple__171;
static PyObject *__pyx_tuple__172;
static PyObject *__pyx_tuple__173;
static PyObject *__pyx_tuple__174;
static PyObject *__pyx_tuple__175;
static PyObject *__pyx_tuple__176;
static PyObject *__pyx_tuple__177;
static PyObject *__pyx_tuple__178;
static PyObject *__pyx_tuple__179;
static PyObject *__pyx_tuple__180;
static PyObject *__pyx_tuple__181;
static PyObject *__pyx_tuple__182;
static PyObject *__pyx_tuple__183;
static PyObject *__pyx_tuple__184;
static PyObject *__pyx_tuple__185;
static PyObject *__pyx_tuple__186;
static PyObject *__pyx_tuple__187;
static PyObject *__pyx_tuple__188;
static PyObject *__pyx_tuple__189;
static PyObject *__pyx_tuple__190;
static PyObject *__pyx_tuple__191;
static PyObject *__pyx_tuple__192;
static PyObject *__pyx_tuple__193;
static PyObject *__pyx_tuple__194;
static PyObject *__pyx_tuple__195;
static PyObject *__pyx_tuple__196;
static PyObject *__pyx_tuple__197;
static PyObject *__pyx_tuple__198;
static PyObject *__pyx_tuple__199;
static PyObject *__pyx_tuple__200;
static PyObject *__pyx_tuple__201;
static PyObject *__pyx_tuple__202;
static PyObject *__pyx_tuple__203;
static PyObject *__pyx_tuple__204;
static PyObject *__pyx_tuple__205;
static PyObject *__pyx_tuple__206;
static PyObject *__pyx_tuple__207;
static PyObject *__pyx_tuple__208;
static PyObject *__pyx_tuple__209;
static PyObject *__pyx_tuple__210;
static PyObject *__pyx_tuple__211;
static PyObject *__pyx_tuple__212;
static PyObject *__pyx_tuple__213;
static PyObject *__pyx_tuple__214;
static PyObject *__pyx_tuple__215;
static PyObject *__pyx_tuple__216;
static PyObject *__pyx_tuple__217;
static PyObject *__pyx_tuple__218;
static PyObject *__pyx_tuple__219;
static PyObject *__pyx_tuple__220;
static PyObject *__pyx_tuple__221;
static PyObject *__pyx_tuple__222;
static PyObject *__pyx_tuple__223;
static PyObject *__pyx_tuple__224;
static PyObject *__pyx_tuple__225;
static PyObject *__pyx_tuple__226;
static PyObject *__pyx_tuple__227;
static PyObject *__pyx_tuple__228;
static PyObject *__pyx_tuple__229;
static PyObject *__pyx_tuple__230;
static PyObject *__pyx_tuple__231;
static PyObject *__pyx_tuple__232;
static PyObject *__pyx_tuple__233;
static PyObject *__pyx_tuple__234;
static PyObject *__pyx_tuple__235;
static PyObject *__pyx_tuple__236;
static PyObject *__pyx_tuple__237;
static PyObject *__pyx_tuple__238;
static PyObject *__pyx_tuple__239;
static PyObject *__pyx_tuple__240;
static PyObject *__pyx_tuple__241;
static PyObject *__pyx_tuple__242;
static PyObject *__pyx_tuple__243;
static PyObject *__pyx_tuple__244;
static PyObject *__pyx_tuple__245;
static PyObject *__pyx_tuple__246;
static PyObject *__pyx_tuple__247;
static PyObject *__pyx_tuple__248;
static PyObject *__pyx_tuple__249;
static PyObject *__pyx_tuple__250;
static PyObject *__pyx_tuple__251;
static PyObject *__pyx_tuple__252;
static PyObject *__pyx_tuple__253;
static PyObject *__pyx_tuple__254;
static PyObject *__pyx_tuple__255;
static PyObject *__pyx_tuple__256;
static PyObject *__pyx_tuple__257;
static PyObject *__pyx_tuple__258;
static PyObject *__pyx_tuple__259;
static PyObject *__pyx_tuple__260;
static PyObject *__pyx_tuple__261;
static PyObject *__pyx_tuple__262;
static PyObject *__pyx_tuple__263;
static PyObject *__pyx_tuple__264;
static PyObject *__pyx_tuple__265;
static PyObject *__pyx_tuple__266;
static PyObject *__pyx_tuple__267;
static PyObject *__pyx_tuple__268;
static PyObject *__pyx_tuple__269;
static PyObject *__pyx_tuple__270;
static PyObject *__pyx_tuple__271;
static PyObject *__pyx_tuple__272;
static PyObject *__pyx_tuple__273;
static PyObject *__pyx_tuple__274;
static PyObject *__pyx_tuple__275;
static PyObject *__pyx_tuple__276;
static PyObject *__pyx_tuple__277;
static PyObject *__pyx_tuple__278;
static PyObject *__pyx_tuple__279;
static PyObject *__pyx_tuple__280;
static PyObject *__pyx_tuple__281;
static PyObject *__pyx_tuple__282;
static PyObject *__pyx_tuple__283;
static PyObject *__pyx_tuple__284;
static PyObject *__pyx_tuple__285;
static PyObject *__pyx_tuple__286;
static PyObject *__pyx_tuple__287;
static PyObject *__pyx_tuple__288;
static PyObject *__pyx_tuple__289;
static PyObject *__pyx_tuple__290;
static PyObject *__pyx_tuple__291;
static PyObject *__pyx_tuple__292;
static PyObject *__pyx_tuple__293;
static PyObject *__pyx_tuple__294;
static PyObject *__pyx_tuple__295;
static PyObject *__pyx_tuple__296;
static PyObject *__pyx_tuple__297;
static PyObject *__pyx_tuple__298;
static PyObject *__pyx_tuple__299;
static PyObject *__pyx_tuple__300;
static PyObject *__pyx_tuple__301;
static PyObject *__pyx_tuple__302;
static PyObject *__pyx_tuple__303;
static PyObject *__pyx_tuple__304;
static PyObject *__pyx_tuple__305;
static PyObject *__pyx_tuple__306;
static PyObject *__pyx_tuple__307;
static PyObject *__pyx_tuple__308;
static PyObject *__pyx_tuple__309;
static PyObject *__pyx_tuple__310;
static PyObject *__pyx_tuple__311;
static PyObject *__pyx_tuple__312;
static PyObject *__pyx_tuple__313;
static PyObject *__pyx_tuple__314;
static PyObject *__pyx_tuple__315;
static PyObject *__pyx_tuple__316;
static PyObject *__pyx_tuple__317;
static PyObject *__pyx_tuple__318;
static PyObject *__pyx_tuple__319;
static PyObject *__pyx_tuple__320;
static PyObject *__pyx_tuple__321;
static PyObject *__pyx_tuple__322;
static PyObject *__pyx_tuple__323;
static PyObject *__pyx_tuple__324;
static PyObject *__pyx_tuple__325;
static PyObject *__pyx_tuple__326;
static PyObject *__pyx_tuple__327;
static PyObject *__pyx_tuple__328;
static PyObject *__pyx_tuple__329;
static PyObject *__pyx_tuple__330;
static PyObject *__pyx_tuple__331;
static PyObject *__pyx_tuple__332;
static PyObject *__pyx_tuple__333;
static PyObject *__pyx_tuple__334;
static PyObject *__pyx_tuple__335;
static PyObject *__pyx_tuple__336;
static PyObject *__pyx_tuple__337;
static PyObject *__pyx_tuple__338;
static PyObject *__pyx_tuple__339;
static PyObject *__pyx_tuple__340;
static PyObject *__pyx_tuple__341;
static PyObject *__pyx_tuple__342;
static PyObject *__pyx_tuple__343;
static PyObject *__pyx_tuple__344;
static PyObject *__pyx_tuple__345;
static PyObject *__pyx_tuple__346;
static PyObject *__pyx_tuple__347;
static PyObject *__pyx_tuple__348;
static PyObject *__pyx_tuple__349;
static PyObject *__pyx_tuple__350;
static PyObject *__pyx_tuple__351;
static PyObject *__pyx_tuple__352;
static PyObject *__pyx_tuple__353;
static PyObject *__pyx_tuple__354;
static PyObject *__pyx_tuple__355;
static PyObject *__pyx_tuple__356;
static PyObject *__pyx_tuple__357;
static PyObject *__pyx_tuple__358;
static PyObject *__pyx_tuple__359;
static PyObject *__pyx_tuple__360;
static PyObject *__pyx_tuple__361;
static PyObject *__pyx_tuple__362;
static PyObject *__pyx_tuple__363;
static PyObject *__pyx_tuple__364;
static PyObject *__pyx_tuple__365;
static PyObject *__pyx_tuple__366;
static PyObject *__pyx_tuple__367;
static PyObject *__pyx_tuple__368;
static PyObject *__pyx_tuple__369;
static PyObject *__pyx_tuple__370;
static PyObject *__pyx_tuple__371;
static PyObject *__pyx_tuple__372;
static PyObject *__pyx_tuple__373;
static PyObject *__pyx_tuple__374;
static PyObject *__pyx_tuple__375;
static PyObject *__pyx_tuple__376;
static PyObject *__pyx_tuple__377;
static PyObject *__pyx_tuple__378;
static PyObject *__pyx_tuple__379;
static PyObject *__pyx_tuple__380;
static PyObject *__pyx_tuple__381;
static PyObject *__pyx_tuple__382;
static PyObject *__pyx_tuple__383;
static PyObject *__pyx_tuple__384;
static PyObject *__pyx_tuple__385;
static PyObject *__pyx_tuple__386;
static PyObject *__pyx_tuple__387;
static PyObject *__pyx_tuple__388;
static PyObject *__pyx_tuple__389;
static PyObject *__pyx_tuple__390;
static PyObject *__pyx_tuple__391;
static PyObject *__pyx_tuple__392;
static PyObject *__pyx_tuple__393;
static PyObject *__pyx_tuple__394;
static PyObject *__pyx_tuple__395;
static PyObject *__pyx_tuple__396;
static PyObject *__pyx_tuple__397;
static PyObject *__pyx_tuple__398;
static PyObject *__pyx_tuple__399;
static PyObject *__pyx_tuple__400;
static PyObject *__pyx_tuple__401;
static PyObject *__pyx_tuple__402;
static PyObject *__pyx_tuple__403;
static PyObject *__pyx_tuple__404;
static PyObject *__pyx_tuple__405;
static PyObject *__pyx_tuple__406;
static PyObject *__pyx_tuple__407;
static PyObject *__pyx_tuple__408;
static PyObject *__pyx_tuple__409;
static PyObject *__pyx_tuple__410;
static PyObject *__pyx_tuple__411;
static PyObject *__pyx_tuple__412;
static PyObject *__pyx_tuple__413;
static PyObject *__pyx_tuple__414;
static PyObject *__pyx_tuple__415;
static PyObject *__pyx_tuple__416;
static PyObject *__pyx_tuple__417;
static PyObject *__pyx_tuple__418;
/* Late includes */

/* "cuda/_cuda/ccuda.pyx":433
 * cdef void *__cuGraphicsVDPAURegisterOutputSurface = NULL
 * 
 * cdef int cuPythonInit() except -1 nogil:             # <<<<<<<<<<<<<<
 *     global __cuPythonInit
 *     cdef bint usePTDS
 */

static int __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(void) {
  int __pyx_v_usePTDS;
  char __pyx_v_libPath[0x104];
  int __pyx_v_status;
  PyObject *__pyx_v_path = NULL;
  long __pyx_v_LOAD_LIBRARY_SEARCH_SYSTEM32;
  PyObject *__pyx_v_handle = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_e = NULL;
  int __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  char const *__pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  unsigned PY_LONG_LONG __pyx_t_21;
  CUresult __pyx_t_22;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("cuPythonInit", 1);
  __Pyx_TraceCall("cuPythonInit", __pyx_f[0], 433, 1, __PYX_ERR(0, 433, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":434
 * 
 * cdef int cuPythonInit() except -1 nogil:
 *     global __cuPythonInit             # <<<<<<<<<<<<<<
 *     cdef bint usePTDS
 *     if __cuPythonInit:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":436
 *     global __cuPythonInit
 *     cdef bint usePTDS
 *     if __cuPythonInit:             # <<<<<<<<<<<<<<
 *         return 0
 *     __cuPythonInit = True
 */
    __pyx_t_1 = (__pyx_v_4cuda_5_cuda_5ccuda___cuPythonInit != 0);
    if (__pyx_t_1) {

      /* "cuda/_cuda/ccuda.pyx":437
 *     cdef bint usePTDS
 *     if __cuPythonInit:
 *         return 0             # <<<<<<<<<<<<<<
 *     __cuPythonInit = True
 *     with gil:
 */
      __pyx_r = 0;
      goto __pyx_L3_return;

      /* "cuda/_cuda/ccuda.pyx":436
 *     global __cuPythonInit
 *     cdef bint usePTDS
 *     if __cuPythonInit:             # <<<<<<<<<<<<<<
 *         return 0
 *     __cuPythonInit = True
 */
    }

    /* "cuda/_cuda/ccuda.pyx":438
 *     if __cuPythonInit:
 *         return 0
 *     __cuPythonInit = True             # <<<<<<<<<<<<<<
 *     with gil:
 *         usePTDS = os.getenv('CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM', default=0)
 */
    __pyx_v_4cuda_5_cuda_5ccuda___cuPythonInit = 1;

    /* "cuda/_cuda/ccuda.pyx":439
 *         return 0
 *     __cuPythonInit = True
 *     with gil:             # <<<<<<<<<<<<<<
 *         usePTDS = os.getenv('CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM', default=0)
 * 
 */
    {
        #ifdef WITH_THREAD
        PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
        #endif
        /*try:*/ {

          /* "cuda/_cuda/ccuda.pyx":440
 *     __cuPythonInit = True
 *     with gil:
 *         usePTDS = os.getenv('CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM', default=0)             # <<<<<<<<<<<<<<
 * 
 *     # Load library
 */
          __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 440, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getenv); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 440, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 440, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_2);
          if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_default, __pyx_int_0) < 0) __PYX_ERR(0, 440, __pyx_L8_error)
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple_, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 440, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 440, __pyx_L8_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_v_usePTDS = __pyx_t_1;
        }

        /* "cuda/_cuda/ccuda.pyx":439
 *         return 0
 *     __cuPythonInit = True
 *     with gil:             # <<<<<<<<<<<<<<
 *         usePTDS = os.getenv('CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM', default=0)
 * 
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            __Pyx_PyGILState_Release(__pyx_gilstate_save);
            #endif
            goto __pyx_L9;
          }
          __pyx_L8_error: {
            #ifdef WITH_THREAD
            __Pyx_PyGILState_Release(__pyx_gilstate_save);
            #endif
            goto __pyx_L4_error;
          }
          __pyx_L9:;
        }
    }

    /* "cuda/_cuda/ccuda.pyx":444
 *     # Load library
 *     cdef char libPath[260]
 *     libPath[0] = 0             # <<<<<<<<<<<<<<
 *     with gil:
 *         status = loader.getCUDALibraryPath(libPath, sys.maxsize > 2**32)
 */
    (__pyx_v_libPath[0]) = 0;

    /* "cuda/_cuda/ccuda.pyx":445
 *     cdef char libPath[260]
 *     libPath[0] = 0
 *     with gil:             # <<<<<<<<<<<<<<
 *         status = loader.getCUDALibraryPath(libPath, sys.maxsize > 2**32)
 *         if status == 0 and len(libPath) != 0:
 */
    {
        #ifdef WITH_THREAD
        PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
        #endif
        /*try:*/ {

          /* "cuda/_cuda/ccuda.pyx":446
 *     libPath[0] = 0
 *     with gil:
 *         status = loader.getCUDALibraryPath(libPath, sys.maxsize > 2**32)             # <<<<<<<<<<<<<<
 *         if status == 0 and len(libPath) != 0:
 *             path = libPath.decode('utf-8')
 */
          __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_sys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 446, __pyx_L11_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_maxsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 446, __pyx_L11_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_int_4294967296, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 446, __pyx_L11_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 446, __pyx_L11_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_v_status = getCUDALibraryPath(__pyx_v_libPath, __pyx_t_1);

          /* "cuda/_cuda/ccuda.pyx":447
 *     with gil:
 *         status = loader.getCUDALibraryPath(libPath, sys.maxsize > 2**32)
 *         if status == 0 and len(libPath) != 0:             # <<<<<<<<<<<<<<
 *             path = libPath.decode('utf-8')
 *         else:
 */
          __pyx_t_5 = ((__pyx_v_status == 0) != 0);
          if (__pyx_t_5) {
          } else {
            __pyx_t_1 = __pyx_t_5;
            goto __pyx_L14_bool_binop_done;
          }
          __pyx_t_6 = strlen(__pyx_v_libPath); 
          __pyx_t_5 = ((__pyx_t_6 != 0) != 0);
          __pyx_t_1 = __pyx_t_5;
          __pyx_L14_bool_binop_done:;
          if (__pyx_t_1) {

            /* "cuda/_cuda/ccuda.pyx":448
 *         status = loader.getCUDALibraryPath(libPath, sys.maxsize > 2**32)
 *         if status == 0 and len(libPath) != 0:
 *             path = libPath.decode('utf-8')             # <<<<<<<<<<<<<<
 *         else:
 *             path = 'nvcuda.dll'
 */
            __pyx_t_4 = __Pyx_decode_c_string(__pyx_v_libPath, 0, strlen(__pyx_v_libPath), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 448, __pyx_L11_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_v_path = __pyx_t_4;
            __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":447
 *     with gil:
 *         status = loader.getCUDALibraryPath(libPath, sys.maxsize > 2**32)
 *         if status == 0 and len(libPath) != 0:             # <<<<<<<<<<<<<<
 *             path = libPath.decode('utf-8')
 *         else:
 */
            goto __pyx_L13;
          }

          /* "cuda/_cuda/ccuda.pyx":450
 *             path = libPath.decode('utf-8')
 *         else:
 *             path = 'nvcuda.dll'             # <<<<<<<<<<<<<<
 *         LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x00000800
 *         try:
 */
          /*else*/ {
            __Pyx_INCREF(__pyx_kp_u_nvcuda_dll);
            __pyx_v_path = __pyx_kp_u_nvcuda_dll;
          }
          __pyx_L13:;

          /* "cuda/_cuda/ccuda.pyx":451
 *         else:
 *             path = 'nvcuda.dll'
 *         LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x00000800             # <<<<<<<<<<<<<<
 *         try:
 *             handle = win32api.LoadLibraryEx(path, 0, LOAD_LIBRARY_SEARCH_SYSTEM32)
 */
          __pyx_v_LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x00000800;

          /* "cuda/_cuda/ccuda.pyx":452
 *             path = 'nvcuda.dll'
 *         LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x00000800
 *         try:             # <<<<<<<<<<<<<<
 *             handle = win32api.LoadLibraryEx(path, 0, LOAD_LIBRARY_SEARCH_SYSTEM32)
 *         except error as e:
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":453
 *         LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x00000800
 *         try:
 *             handle = win32api.LoadLibraryEx(path, 0, LOAD_LIBRARY_SEARCH_SYSTEM32)             # <<<<<<<<<<<<<<
 *         except error as e:
 *             raise RuntimeError('Failed to LoadLibraryEx ' + path)
 */
              __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_win32api); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L16_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_LoadLibraryEx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 453, __pyx_L16_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_LOAD_LIBRARY_SEARCH_SYSTEM32); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L16_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_10 = NULL;
              __pyx_t_11 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_11 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_v_path, __pyx_int_0, __pyx_t_2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 453, __pyx_L16_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_v_path, __pyx_int_0, __pyx_t_2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 453, __pyx_L16_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 453, __pyx_L16_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_path);
                __Pyx_GIVEREF(__pyx_v_path);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_v_path);
                __Pyx_INCREF(__pyx_int_0);
                __Pyx_GIVEREF(__pyx_int_0);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_int_0);
                __Pyx_GIVEREF(__pyx_t_2);
                PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_11, __pyx_t_2);
                __pyx_t_2 = 0;
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 453, __pyx_L16_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_v_handle = __pyx_t_4;
              __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":452
 *             path = 'nvcuda.dll'
 *         LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x00000800
 *         try:             # <<<<<<<<<<<<<<
 *             handle = win32api.LoadLibraryEx(path, 0, LOAD_LIBRARY_SEARCH_SYSTEM32)
 *         except error as e:
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L21_try_end;
            __pyx_L16_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":454
 *         try:
 *             handle = win32api.LoadLibraryEx(path, 0, LOAD_LIBRARY_SEARCH_SYSTEM32)
 *         except error as e:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Failed to LoadLibraryEx ' + path)
 * 
 */
            __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_12);
            __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 454, __pyx_L18_except_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_2);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_ErrRestore(__pyx_t_4, __pyx_t_3, __pyx_t_12);
            __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_12 = 0;
            if (__pyx_t_11) {
              __Pyx_AddTraceback("cuda._cuda.ccuda.cuPythonInit", __pyx_clineno, __pyx_lineno, __pyx_filename);
              if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_3, &__pyx_t_4) < 0) __PYX_ERR(0, 454, __pyx_L18_except_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_GOTREF(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_3);
              __pyx_v_e = __pyx_t_3;
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":455
 *             handle = win32api.LoadLibraryEx(path, 0, LOAD_LIBRARY_SEARCH_SYSTEM32)
 *         except error as e:
 *             raise RuntimeError('Failed to LoadLibraryEx ' + path)             # <<<<<<<<<<<<<<
 * 
 *     # Get latest __cuGetProcAddress_v2
 */
                __pyx_t_2 = PyNumber_Add(__pyx_kp_u_Failed_to_LoadLibraryEx, __pyx_v_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 455, __pyx_L27_error)
                __Pyx_GOTREF(__pyx_t_2);
                __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 455, __pyx_L27_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                __Pyx_Raise(__pyx_t_10, 0, 0, 0);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __PYX_ERR(0, 455, __pyx_L27_error)
              }

              /* "cuda/_cuda/ccuda.pyx":454
 *         try:
 *             handle = win32api.LoadLibraryEx(path, 0, LOAD_LIBRARY_SEARCH_SYSTEM32)
 *         except error as e:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Failed to LoadLibraryEx ' + path)
 * 
 */
              /*finally:*/ {
                __pyx_L27_error:;
                /*exception exit:*/{
                  __Pyx_PyThreadState_declare
                  __Pyx_PyThreadState_assign
                  __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                  if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
                  if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
                  __Pyx_XGOTREF(__pyx_t_15);
                  __Pyx_XGOTREF(__pyx_t_16);
                  __Pyx_XGOTREF(__pyx_t_17);
                  __Pyx_XGOTREF(__pyx_t_18);
                  __Pyx_XGOTREF(__pyx_t_19);
                  __Pyx_XGOTREF(__pyx_t_20);
                  __pyx_t_11 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
                  {
                    __Pyx_DECREF(__pyx_v_e);
                    __pyx_v_e = NULL;
                  }
                  if (PY_MAJOR_VERSION >= 3) {
                    __Pyx_XGIVEREF(__pyx_t_18);
                    __Pyx_XGIVEREF(__pyx_t_19);
                    __Pyx_XGIVEREF(__pyx_t_20);
                    __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
                  }
                  __Pyx_XGIVEREF(__pyx_t_15);
                  __Pyx_XGIVEREF(__pyx_t_16);
                  __Pyx_XGIVEREF(__pyx_t_17);
                  __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
                  __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
                  __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
                  goto __pyx_L18_except_error;
                }
              }
            }
            goto __pyx_L18_except_error;
            __pyx_L18_except_error:;

            /* "cuda/_cuda/ccuda.pyx":452
 *             path = 'nvcuda.dll'
 *         LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x00000800
 *         try:             # <<<<<<<<<<<<<<
 *             handle = win32api.LoadLibraryEx(path, 0, LOAD_LIBRARY_SEARCH_SYSTEM32)
 *         except error as e:
 */
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            goto __pyx_L11_error;
            __pyx_L21_try_end:;
          }
        }

        /* "cuda/_cuda/ccuda.pyx":445
 *     cdef char libPath[260]
 *     libPath[0] = 0
 *     with gil:             # <<<<<<<<<<<<<<
 *         status = loader.getCUDALibraryPath(libPath, sys.maxsize > 2**32)
 *         if status == 0 and len(libPath) != 0:
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            __Pyx_PyGILState_Release(__pyx_gilstate_save);
            #endif
            goto __pyx_L12;
          }
          __pyx_L11_error: {
            #ifdef WITH_THREAD
            __Pyx_PyGILState_Release(__pyx_gilstate_save);
            #endif
            goto __pyx_L4_error;
          }
          __pyx_L12:;
        }
    }

    /* "cuda/_cuda/ccuda.pyx":458
 * 
 *     # Get latest __cuGetProcAddress_v2
 *     with gil:             # <<<<<<<<<<<<<<
 *         try:
 *             global __cuGetProcAddress_v2
 */
    {
        #ifdef WITH_THREAD
        PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
        #endif
        /*try:*/ {

          /* "cuda/_cuda/ccuda.pyx":459
 *     # Get latest __cuGetProcAddress_v2
 *     with gil:
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGetProcAddress_v2
 *             __cuGetProcAddress_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetProcAddress_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":461
 *         try:
 *             global __cuGetProcAddress_v2
 *             __cuGetProcAddress_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetProcAddress_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 461, __pyx_L36_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 461, __pyx_L36_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGetProcAddress_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 461, __pyx_L36_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGetProcAddress_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 461, __pyx_L36_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 461, __pyx_L36_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGetProcAddress_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuGetProcAddress_v2);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGetProcAddress_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 461, __pyx_L36_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 461, __pyx_L36_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGetProcAddress_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":459
 *     # Get latest __cuGetProcAddress_v2
 *     with gil:
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGetProcAddress_v2
 *             __cuGetProcAddress_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetProcAddress_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L41_try_end;
            __pyx_L36_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":462
 *             global __cuGetProcAddress_v2
 *             __cuGetProcAddress_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetProcAddress_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L37_exception_handled;
            }
            __pyx_L37_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L41_try_end:;
          }
        }

        /* "cuda/_cuda/ccuda.pyx":458
 * 
 *     # Get latest __cuGetProcAddress_v2
 *     with gil:             # <<<<<<<<<<<<<<
 *         try:
 *             global __cuGetProcAddress_v2
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            __Pyx_PyGILState_Release(__pyx_gilstate_save);
            #endif
            goto __pyx_L35;
          }
          __pyx_L35:;
        }
    }

    /* "cuda/_cuda/ccuda.pyx":466
 * 
 *     # Load using cuGetProcAddress if available
 *     if __cuGetProcAddress_v2 != NULL:             # <<<<<<<<<<<<<<
 *         if usePTDS:
 *             # Get all PTDS version of functions
 */
    __pyx_t_1 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGetProcAddress_v2 != NULL) != 0);
    if (__pyx_t_1) {

      /* "cuda/_cuda/ccuda.pyx":467
 *     # Load using cuGetProcAddress if available
 *     if __cuGetProcAddress_v2 != NULL:
 *         if usePTDS:             # <<<<<<<<<<<<<<
 *             # Get all PTDS version of functions
 *             pass
 */
      __pyx_t_1 = (__pyx_v_usePTDS != 0);
      if (__pyx_t_1) {

        /* "cuda/_cuda/ccuda.pyx":471
 *             pass
 *             global __cuMemcpy
 *             cuGetProcAddress('cuMemcpy', &__cuMemcpy, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyPeer
 *             cuGetProcAddress('cuMemcpyPeer', &__cuMemcpyPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 471, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":473
 *             cuGetProcAddress('cuMemcpy', &__cuMemcpy, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemcpyPeer
 *             cuGetProcAddress('cuMemcpyPeer', &__cuMemcpyPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyHtoD_v2
 *             cuGetProcAddress('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyPeer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyPeer), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 473, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":475
 *             cuGetProcAddress('cuMemcpyPeer', &__cuMemcpyPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemcpyHtoD_v2
 *             cuGetProcAddress('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyDtoH_v2
 *             cuGetProcAddress('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyHtoD"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoD_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 475, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":477
 *             cuGetProcAddress('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemcpyDtoH_v2
 *             cuGetProcAddress('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyDtoD_v2
 *             cuGetProcAddress('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyDtoH"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoH_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 477, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":479
 *             cuGetProcAddress('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemcpyDtoD_v2
 *             cuGetProcAddress('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyDtoA_v2
 *             cuGetProcAddress('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyDtoD"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoD_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 479, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":481
 *             cuGetProcAddress('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemcpyDtoA_v2
 *             cuGetProcAddress('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyAtoD_v2
 *             cuGetProcAddress('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyDtoA"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoA_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 481, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":483
 *             cuGetProcAddress('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemcpyAtoD_v2
 *             cuGetProcAddress('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyHtoA_v2
 *             cuGetProcAddress('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyAtoD"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoD_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 483, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":485
 *             cuGetProcAddress('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemcpyHtoA_v2
 *             cuGetProcAddress('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyAtoH_v2
 *             cuGetProcAddress('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyHtoA"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoA_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 485, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":487
 *             cuGetProcAddress('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemcpyAtoH_v2
 *             cuGetProcAddress('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyAtoA_v2
 *             cuGetProcAddress('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyAtoH"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoH_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 487, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":489
 *             cuGetProcAddress('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemcpyAtoA_v2
 *             cuGetProcAddress('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpy2D_v2
 *             cuGetProcAddress('cuMemcpy2D', &__cuMemcpy2D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyAtoA"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoA_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 489, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":491
 *             cuGetProcAddress('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemcpy2D_v2
 *             cuGetProcAddress('cuMemcpy2D', &__cuMemcpy2D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpy2DUnaligned_v2
 *             cuGetProcAddress('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy2D"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2D_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 491, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":493
 *             cuGetProcAddress('cuMemcpy2D', &__cuMemcpy2D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemcpy2DUnaligned_v2
 *             cuGetProcAddress('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpy3D_v2
 *             cuGetProcAddress('cuMemcpy3D', &__cuMemcpy3D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy2DUnaligned"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2DUnaligned_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 493, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":495
 *             cuGetProcAddress('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemcpy3D_v2
 *             cuGetProcAddress('cuMemcpy3D', &__cuMemcpy3D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpy3DPeer
 *             cuGetProcAddress('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy3D"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3D_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 495, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":497
 *             cuGetProcAddress('cuMemcpy3D', &__cuMemcpy3D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemcpy3DPeer
 *             cuGetProcAddress('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyAsync
 *             cuGetProcAddress('cuMemcpyAsync', &__cuMemcpyAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy3DPeer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DPeer), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 497, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":499
 *             cuGetProcAddress('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemcpyAsync
 *             cuGetProcAddress('cuMemcpyAsync', &__cuMemcpyAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyPeerAsync
 *             cuGetProcAddress('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAsync), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 499, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":501
 *             cuGetProcAddress('cuMemcpyAsync', &__cuMemcpyAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemcpyPeerAsync
 *             cuGetProcAddress('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyHtoDAsync_v2
 *             cuGetProcAddress('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyPeerAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyPeerAsync), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 501, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":503
 *             cuGetProcAddress('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemcpyHtoDAsync_v2
 *             cuGetProcAddress('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyDtoHAsync_v2
 *             cuGetProcAddress('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyHtoDAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoDAsync_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 503, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":505
 *             cuGetProcAddress('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemcpyDtoHAsync_v2
 *             cuGetProcAddress('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyDtoDAsync_v2
 *             cuGetProcAddress('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyDtoHAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoHAsync_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 505, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":507
 *             cuGetProcAddress('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemcpyDtoDAsync_v2
 *             cuGetProcAddress('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyHtoAAsync_v2
 *             cuGetProcAddress('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyDtoDAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoDAsync_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 507, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":509
 *             cuGetProcAddress('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemcpyHtoAAsync_v2
 *             cuGetProcAddress('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyAtoHAsync_v2
 *             cuGetProcAddress('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyHtoAAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoAAsync_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 509, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":511
 *             cuGetProcAddress('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemcpyAtoHAsync_v2
 *             cuGetProcAddress('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpy2DAsync_v2
 *             cuGetProcAddress('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyAtoHAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoHAsync_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 511, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":513
 *             cuGetProcAddress('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemcpy2DAsync_v2
 *             cuGetProcAddress('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpy3DAsync_v2
 *             cuGetProcAddress('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy2DAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2DAsync_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 513, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":515
 *             cuGetProcAddress('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemcpy3DAsync_v2
 *             cuGetProcAddress('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpy3DPeerAsync
 *             cuGetProcAddress('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy3DAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DAsync_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 515, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":517
 *             cuGetProcAddress('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemcpy3DPeerAsync
 *             cuGetProcAddress('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD8_v2
 *             cuGetProcAddress('cuMemsetD8', &__cuMemsetD8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy3DPeerAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DPeerAsync), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 517, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":519
 *             cuGetProcAddress('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemsetD8_v2
 *             cuGetProcAddress('cuMemsetD8', &__cuMemsetD8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD16_v2
 *             cuGetProcAddress('cuMemsetD16', &__cuMemsetD16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD8"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD8_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 519, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":521
 *             cuGetProcAddress('cuMemsetD8', &__cuMemsetD8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemsetD16_v2
 *             cuGetProcAddress('cuMemsetD16', &__cuMemsetD16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD32_v2
 *             cuGetProcAddress('cuMemsetD32', &__cuMemsetD32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD16"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD16_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 521, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":523
 *             cuGetProcAddress('cuMemsetD16', &__cuMemsetD16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemsetD32_v2
 *             cuGetProcAddress('cuMemsetD32', &__cuMemsetD32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD2D8_v2
 *             cuGetProcAddress('cuMemsetD2D8', &__cuMemsetD2D8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD32"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD32_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 523, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":525
 *             cuGetProcAddress('cuMemsetD32', &__cuMemsetD32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemsetD2D8_v2
 *             cuGetProcAddress('cuMemsetD2D8', &__cuMemsetD2D8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD2D16_v2
 *             cuGetProcAddress('cuMemsetD2D16', &__cuMemsetD2D16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD2D8"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D8_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 525, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":527
 *             cuGetProcAddress('cuMemsetD2D8', &__cuMemsetD2D8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemsetD2D16_v2
 *             cuGetProcAddress('cuMemsetD2D16', &__cuMemsetD2D16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD2D32_v2
 *             cuGetProcAddress('cuMemsetD2D32', &__cuMemsetD2D32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD2D16"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D16_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 527, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":529
 *             cuGetProcAddress('cuMemsetD2D16', &__cuMemsetD2D16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemsetD2D32_v2
 *             cuGetProcAddress('cuMemsetD2D32', &__cuMemsetD2D32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD8Async
 *             cuGetProcAddress('cuMemsetD8Async', &__cuMemsetD8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD2D32"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D32_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 529, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":531
 *             cuGetProcAddress('cuMemsetD2D32', &__cuMemsetD2D32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemsetD8Async
 *             cuGetProcAddress('cuMemsetD8Async', &__cuMemsetD8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD16Async
 *             cuGetProcAddress('cuMemsetD16Async', &__cuMemsetD16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD8Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD8Async), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 531, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":533
 *             cuGetProcAddress('cuMemsetD8Async', &__cuMemsetD8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemsetD16Async
 *             cuGetProcAddress('cuMemsetD16Async', &__cuMemsetD16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD32Async
 *             cuGetProcAddress('cuMemsetD32Async', &__cuMemsetD32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD16Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD16Async), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 533, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":535
 *             cuGetProcAddress('cuMemsetD16Async', &__cuMemsetD16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemsetD32Async
 *             cuGetProcAddress('cuMemsetD32Async', &__cuMemsetD32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD2D8Async
 *             cuGetProcAddress('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD32Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD32Async), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 535, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":537
 *             cuGetProcAddress('cuMemsetD32Async', &__cuMemsetD32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemsetD2D8Async
 *             cuGetProcAddress('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD2D16Async
 *             cuGetProcAddress('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD2D8Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D8Async), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 537, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":539
 *             cuGetProcAddress('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemsetD2D16Async
 *             cuGetProcAddress('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD2D32Async
 *             cuGetProcAddress('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD2D16Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D16Async), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 539, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":541
 *             cuGetProcAddress('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemsetD2D32Async
 *             cuGetProcAddress('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemMapArrayAsync
 *             cuGetProcAddress('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD2D32Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D32Async), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 541, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":543
 *             cuGetProcAddress('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemMapArrayAsync
 *             cuGetProcAddress('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemFreeAsync
 *             cuGetProcAddress('cuMemFreeAsync', &__cuMemFreeAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemMapArrayAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemMapArrayAsync), 0x2B02, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 543, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":545
 *             cuGetProcAddress('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemFreeAsync
 *             cuGetProcAddress('cuMemFreeAsync', &__cuMemFreeAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemAllocAsync
 *             cuGetProcAddress('cuMemAllocAsync', &__cuMemAllocAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemFreeAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemFreeAsync), 0x2B0C, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 545, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":547
 *             cuGetProcAddress('cuMemFreeAsync', &__cuMemFreeAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemAllocAsync
 *             cuGetProcAddress('cuMemAllocAsync', &__cuMemAllocAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemAllocFromPoolAsync
 *             cuGetProcAddress('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemAllocAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocAsync), 0x2B0C, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 547, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":549
 *             cuGetProcAddress('cuMemAllocAsync', &__cuMemAllocAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemAllocFromPoolAsync
 *             cuGetProcAddress('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemPrefetchAsync
 *             cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemAllocFromPoolAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocFromPoolAsync), 0x2B0C, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 549, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":551
 *             cuGetProcAddress('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemPrefetchAsync
 *             cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemPrefetchAsync_v2
 *             cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync_v2, 12020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemPrefetchAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPrefetchAsync), 0x1F40, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 551, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":553
 *             cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuMemPrefetchAsync_v2
 *             cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync_v2, 12020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamGetPriority
 *             cuGetProcAddress('cuStreamGetPriority', &__cuStreamGetPriority, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemPrefetchAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPrefetchAsync_v2), 0x2EF4, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 553, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":555
 *             cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync_v2, 12020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuStreamGetPriority
 *             cuGetProcAddress('cuStreamGetPriority', &__cuStreamGetPriority, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamGetFlags
 *             cuGetProcAddress('cuStreamGetFlags', &__cuStreamGetFlags, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamGetPriority"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetPriority), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 555, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":557
 *             cuGetProcAddress('cuStreamGetPriority', &__cuStreamGetPriority, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuStreamGetFlags
 *             cuGetProcAddress('cuStreamGetFlags', &__cuStreamGetFlags, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamGetId
 *             cuGetProcAddress('cuStreamGetId', &__cuStreamGetId, 12000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamGetFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetFlags), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 557, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":559
 *             cuGetProcAddress('cuStreamGetFlags', &__cuStreamGetFlags, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuStreamGetId
 *             cuGetProcAddress('cuStreamGetId', &__cuStreamGetId, 12000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamGetCtx
 *             cuGetProcAddress('cuStreamGetCtx', &__cuStreamGetCtx, 9020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamGetId"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetId), 0x2EE0, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 559, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":561
 *             cuGetProcAddress('cuStreamGetId', &__cuStreamGetId, 12000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuStreamGetCtx
 *             cuGetProcAddress('cuStreamGetCtx', &__cuStreamGetCtx, 9020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamWaitEvent
 *             cuGetProcAddress('cuStreamWaitEvent', &__cuStreamWaitEvent, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamGetCtx"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCtx), 0x233C, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 561, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":563
 *             cuGetProcAddress('cuStreamGetCtx', &__cuStreamGetCtx, 9020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuStreamWaitEvent
 *             cuGetProcAddress('cuStreamWaitEvent', &__cuStreamWaitEvent, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamAddCallback
 *             cuGetProcAddress('cuStreamAddCallback', &__cuStreamAddCallback, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamWaitEvent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitEvent), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 563, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":565
 *             cuGetProcAddress('cuStreamWaitEvent', &__cuStreamWaitEvent, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuStreamAddCallback
 *             cuGetProcAddress('cuStreamAddCallback', &__cuStreamAddCallback, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamBeginCapture_v2
 *             cuGetProcAddress('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamAddCallback"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamAddCallback), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 565, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":567
 *             cuGetProcAddress('cuStreamAddCallback', &__cuStreamAddCallback, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuStreamBeginCapture_v2
 *             cuGetProcAddress('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamEndCapture
 *             cuGetProcAddress('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamBeginCapture"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamBeginCapture_v2), 0x271A, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 567, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":569
 *             cuGetProcAddress('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuStreamEndCapture
 *             cuGetProcAddress('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamIsCapturing
 *             cuGetProcAddress('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamEndCapture"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamEndCapture), 0x2710, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 569, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":571
 *             cuGetProcAddress('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuStreamIsCapturing
 *             cuGetProcAddress('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamGetCaptureInfo_v2
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamIsCapturing"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamIsCapturing), 0x2710, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 571, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":573
 *             cuGetProcAddress('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuStreamGetCaptureInfo_v2
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamUpdateCaptureDependencies
 *             cuGetProcAddress('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamGetCaptureInfo"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCaptureInfo_v2), 0x2B16, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 573, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":575
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuStreamUpdateCaptureDependencies
 *             cuGetProcAddress('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamAttachMemAsync
 *             cuGetProcAddress('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamUpdateCaptureDependencies"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamUpdateCaptureDependencies), 0x2B16, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 575, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":577
 *             cuGetProcAddress('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuStreamAttachMemAsync
 *             cuGetProcAddress('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamQuery
 *             cuGetProcAddress('cuStreamQuery', &__cuStreamQuery, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamAttachMemAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamAttachMemAsync), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 577, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":579
 *             cuGetProcAddress('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuStreamQuery
 *             cuGetProcAddress('cuStreamQuery', &__cuStreamQuery, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamSynchronize
 *             cuGetProcAddress('cuStreamSynchronize', &__cuStreamSynchronize, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamQuery"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamQuery), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 579, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":581
 *             cuGetProcAddress('cuStreamQuery', &__cuStreamQuery, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuStreamSynchronize
 *             cuGetProcAddress('cuStreamSynchronize', &__cuStreamSynchronize, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamCopyAttributes
 *             cuGetProcAddress('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamSynchronize"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamSynchronize), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 581, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":583
 *             cuGetProcAddress('cuStreamSynchronize', &__cuStreamSynchronize, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuStreamCopyAttributes
 *             cuGetProcAddress('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamGetAttribute
 *             cuGetProcAddress('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamCopyAttributes"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamCopyAttributes), 0x2AF8, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 583, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":585
 *             cuGetProcAddress('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuStreamGetAttribute
 *             cuGetProcAddress('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamSetAttribute
 *             cuGetProcAddress('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamGetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetAttribute), 0x2AF8, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 585, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":587
 *             cuGetProcAddress('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuStreamSetAttribute
 *             cuGetProcAddress('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuEventRecord
 *             cuGetProcAddress('cuEventRecord', &__cuEventRecord, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamSetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamSetAttribute), 0x2AF8, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 587, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":589
 *             cuGetProcAddress('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuEventRecord
 *             cuGetProcAddress('cuEventRecord', &__cuEventRecord, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuEventRecordWithFlags
 *             cuGetProcAddress('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEventRecord"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEventRecord), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 589, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":591
 *             cuGetProcAddress('cuEventRecord', &__cuEventRecord, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuEventRecordWithFlags
 *             cuGetProcAddress('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuSignalExternalSemaphoresAsync
 *             cuGetProcAddress('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEventRecordWithFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEventRecordWithFlags), 0x2B02, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 591, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":593
 *             cuGetProcAddress('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuSignalExternalSemaphoresAsync
 *             cuGetProcAddress('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuWaitExternalSemaphoresAsync
 *             cuGetProcAddress('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuSignalExternalSemaphoresAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuSignalExternalSemaphoresAsync), 0x2710, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 593, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":595
 *             cuGetProcAddress('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuWaitExternalSemaphoresAsync
 *             cuGetProcAddress('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamWaitValue32_v2
 *             cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuWaitExternalSemaphoresAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuWaitExternalSemaphoresAsync), 0x2710, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 595, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":597
 *             cuGetProcAddress('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuStreamWaitValue32_v2
 *             cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamWaitValue64_v2
 *             cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamWaitValue32"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue32_v2), 0x2B3E, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 597, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":599
 *             cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuStreamWaitValue64_v2
 *             cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamWriteValue32_v2
 *             cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamWaitValue64"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue64_v2), 0x2B3E, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 599, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":601
 *             cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuStreamWriteValue32_v2
 *             cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamWriteValue64_v2
 *             cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamWriteValue32"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue32_v2), 0x2B3E, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 601, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":603
 *             cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuStreamWriteValue64_v2
 *             cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamBatchMemOp_v2
 *             cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamWriteValue64"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue64_v2), 0x2B3E, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 603, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":605
 *             cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuStreamBatchMemOp_v2
 *             cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuLaunchKernel
 *             cuGetProcAddress('cuLaunchKernel', &__cuLaunchKernel, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamBatchMemOp"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamBatchMemOp_v2), 0x2B3E, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 605, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":607
 *             cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuLaunchKernel
 *             cuGetProcAddress('cuLaunchKernel', &__cuLaunchKernel, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuLaunchKernelEx
 *             cuGetProcAddress('cuLaunchKernelEx', &__cuLaunchKernelEx, 11060, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLaunchKernel"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchKernel), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 607, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":609
 *             cuGetProcAddress('cuLaunchKernel', &__cuLaunchKernel, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuLaunchKernelEx
 *             cuGetProcAddress('cuLaunchKernelEx', &__cuLaunchKernelEx, 11060, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuLaunchCooperativeKernel
 *             cuGetProcAddress('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLaunchKernelEx"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchKernelEx), 0x2B34, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 609, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":611
 *             cuGetProcAddress('cuLaunchKernelEx', &__cuLaunchKernelEx, 11060, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuLaunchCooperativeKernel
 *             cuGetProcAddress('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuLaunchHostFunc
 *             cuGetProcAddress('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLaunchCooperativeKernel"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchCooperativeKernel), 0x2328, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 611, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":613
 *             cuGetProcAddress('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuLaunchHostFunc
 *             cuGetProcAddress('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuGraphInstantiateWithParams
 *             cuGetProcAddress('cuGraphInstantiateWithParams', &__cuGraphInstantiateWithParams, 12000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLaunchHostFunc"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchHostFunc), 0x2710, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 613, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":615
 *             cuGetProcAddress('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuGraphInstantiateWithParams
 *             cuGetProcAddress('cuGraphInstantiateWithParams', &__cuGraphInstantiateWithParams, 12000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuGraphUpload
 *             cuGetProcAddress('cuGraphUpload', &__cuGraphUpload, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphInstantiateWithParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphInstantiateWithParams), 0x2EE0, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 615, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":617
 *             cuGetProcAddress('cuGraphInstantiateWithParams', &__cuGraphInstantiateWithParams, 12000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuGraphUpload
 *             cuGetProcAddress('cuGraphUpload', &__cuGraphUpload, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuGraphLaunch
 *             cuGetProcAddress('cuGraphLaunch', &__cuGraphLaunch, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphUpload"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphUpload), 0x2B02, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 617, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":619
 *             cuGetProcAddress('cuGraphUpload', &__cuGraphUpload, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuGraphLaunch
 *             cuGetProcAddress('cuGraphLaunch', &__cuGraphLaunch, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuGraphicsMapResources
 *             cuGetProcAddress('cuGraphicsMapResources', &__cuGraphicsMapResources, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphLaunch"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphLaunch), 0x2710, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 619, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":621
 *             cuGetProcAddress('cuGraphLaunch', &__cuGraphLaunch, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuGraphicsMapResources
 *             cuGetProcAddress('cuGraphicsMapResources', &__cuGraphicsMapResources, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *             global __cuGraphicsUnmapResources
 *             cuGetProcAddress('cuGraphicsUnmapResources', &__cuGraphicsUnmapResources, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsMapResources"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsMapResources), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 621, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":623
 *             cuGetProcAddress('cuGraphicsMapResources', &__cuGraphicsMapResources, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)
 *             global __cuGraphicsUnmapResources
 *             cuGetProcAddress('cuGraphicsUnmapResources', &__cuGraphicsUnmapResources, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL)             # <<<<<<<<<<<<<<
 *         else:
 *             # Else get the regular version
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsUnmapResources"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsUnmapResources), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 623, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":467
 *     # Load using cuGetProcAddress if available
 *     if __cuGetProcAddress_v2 != NULL:
 *         if usePTDS:             # <<<<<<<<<<<<<<
 *             # Get all PTDS version of functions
 *             pass
 */
        goto __pyx_L43;
      }

      /* "cuda/_cuda/ccuda.pyx":626
 *         else:
 *             # Else get the regular version
 *             pass             # <<<<<<<<<<<<<<
 *             global __cuMemcpy
 *             cuGetProcAddress('cuMemcpy', &__cuMemcpy, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      /*else*/ {

        /* "cuda/_cuda/ccuda.pyx":628
 *             pass
 *             global __cuMemcpy
 *             cuGetProcAddress('cuMemcpy', &__cuMemcpy, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyPeer
 *             cuGetProcAddress('cuMemcpyPeer', &__cuMemcpyPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 628, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":630
 *             cuGetProcAddress('cuMemcpy', &__cuMemcpy, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemcpyPeer
 *             cuGetProcAddress('cuMemcpyPeer', &__cuMemcpyPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyHtoD_v2
 *             cuGetProcAddress('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyPeer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyPeer), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 630, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":632
 *             cuGetProcAddress('cuMemcpyPeer', &__cuMemcpyPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemcpyHtoD_v2
 *             cuGetProcAddress('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyDtoH_v2
 *             cuGetProcAddress('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyHtoD"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoD_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 632, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":634
 *             cuGetProcAddress('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemcpyDtoH_v2
 *             cuGetProcAddress('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyDtoD_v2
 *             cuGetProcAddress('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyDtoH"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoH_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 634, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":636
 *             cuGetProcAddress('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemcpyDtoD_v2
 *             cuGetProcAddress('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyDtoA_v2
 *             cuGetProcAddress('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyDtoD"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoD_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 636, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":638
 *             cuGetProcAddress('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemcpyDtoA_v2
 *             cuGetProcAddress('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyAtoD_v2
 *             cuGetProcAddress('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyDtoA"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoA_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 638, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":640
 *             cuGetProcAddress('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemcpyAtoD_v2
 *             cuGetProcAddress('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyHtoA_v2
 *             cuGetProcAddress('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyAtoD"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoD_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 640, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":642
 *             cuGetProcAddress('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemcpyHtoA_v2
 *             cuGetProcAddress('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyAtoH_v2
 *             cuGetProcAddress('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyHtoA"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoA_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 642, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":644
 *             cuGetProcAddress('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemcpyAtoH_v2
 *             cuGetProcAddress('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyAtoA_v2
 *             cuGetProcAddress('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyAtoH"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoH_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 644, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":646
 *             cuGetProcAddress('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemcpyAtoA_v2
 *             cuGetProcAddress('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpy2D_v2
 *             cuGetProcAddress('cuMemcpy2D', &__cuMemcpy2D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyAtoA"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoA_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 646, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":648
 *             cuGetProcAddress('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemcpy2D_v2
 *             cuGetProcAddress('cuMemcpy2D', &__cuMemcpy2D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpy2DUnaligned_v2
 *             cuGetProcAddress('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy2D"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2D_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 648, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":650
 *             cuGetProcAddress('cuMemcpy2D', &__cuMemcpy2D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemcpy2DUnaligned_v2
 *             cuGetProcAddress('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpy3D_v2
 *             cuGetProcAddress('cuMemcpy3D', &__cuMemcpy3D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy2DUnaligned"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2DUnaligned_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 650, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":652
 *             cuGetProcAddress('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemcpy3D_v2
 *             cuGetProcAddress('cuMemcpy3D', &__cuMemcpy3D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpy3DPeer
 *             cuGetProcAddress('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy3D"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3D_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 652, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":654
 *             cuGetProcAddress('cuMemcpy3D', &__cuMemcpy3D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemcpy3DPeer
 *             cuGetProcAddress('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyAsync
 *             cuGetProcAddress('cuMemcpyAsync', &__cuMemcpyAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy3DPeer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DPeer), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 654, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":656
 *             cuGetProcAddress('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemcpyAsync
 *             cuGetProcAddress('cuMemcpyAsync', &__cuMemcpyAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyPeerAsync
 *             cuGetProcAddress('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAsync), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 656, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":658
 *             cuGetProcAddress('cuMemcpyAsync', &__cuMemcpyAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemcpyPeerAsync
 *             cuGetProcAddress('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyHtoDAsync_v2
 *             cuGetProcAddress('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyPeerAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyPeerAsync), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 658, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":660
 *             cuGetProcAddress('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemcpyHtoDAsync_v2
 *             cuGetProcAddress('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyDtoHAsync_v2
 *             cuGetProcAddress('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyHtoDAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoDAsync_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 660, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":662
 *             cuGetProcAddress('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemcpyDtoHAsync_v2
 *             cuGetProcAddress('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyDtoDAsync_v2
 *             cuGetProcAddress('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyDtoHAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoHAsync_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 662, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":664
 *             cuGetProcAddress('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemcpyDtoDAsync_v2
 *             cuGetProcAddress('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyHtoAAsync_v2
 *             cuGetProcAddress('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyDtoDAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoDAsync_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 664, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":666
 *             cuGetProcAddress('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemcpyHtoAAsync_v2
 *             cuGetProcAddress('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyAtoHAsync_v2
 *             cuGetProcAddress('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyHtoAAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoAAsync_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 666, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":668
 *             cuGetProcAddress('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemcpyAtoHAsync_v2
 *             cuGetProcAddress('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpy2DAsync_v2
 *             cuGetProcAddress('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyAtoHAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoHAsync_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 668, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":670
 *             cuGetProcAddress('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemcpy2DAsync_v2
 *             cuGetProcAddress('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpy3DAsync_v2
 *             cuGetProcAddress('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy2DAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2DAsync_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 670, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":672
 *             cuGetProcAddress('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemcpy3DAsync_v2
 *             cuGetProcAddress('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemcpy3DPeerAsync
 *             cuGetProcAddress('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy3DAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DAsync_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 672, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":674
 *             cuGetProcAddress('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemcpy3DPeerAsync
 *             cuGetProcAddress('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD8_v2
 *             cuGetProcAddress('cuMemsetD8', &__cuMemsetD8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy3DPeerAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DPeerAsync), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 674, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":676
 *             cuGetProcAddress('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemsetD8_v2
 *             cuGetProcAddress('cuMemsetD8', &__cuMemsetD8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD16_v2
 *             cuGetProcAddress('cuMemsetD16', &__cuMemsetD16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD8"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD8_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 676, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":678
 *             cuGetProcAddress('cuMemsetD8', &__cuMemsetD8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemsetD16_v2
 *             cuGetProcAddress('cuMemsetD16', &__cuMemsetD16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD32_v2
 *             cuGetProcAddress('cuMemsetD32', &__cuMemsetD32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD16"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD16_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 678, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":680
 *             cuGetProcAddress('cuMemsetD16', &__cuMemsetD16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemsetD32_v2
 *             cuGetProcAddress('cuMemsetD32', &__cuMemsetD32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD2D8_v2
 *             cuGetProcAddress('cuMemsetD2D8', &__cuMemsetD2D8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD32"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD32_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 680, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":682
 *             cuGetProcAddress('cuMemsetD32', &__cuMemsetD32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemsetD2D8_v2
 *             cuGetProcAddress('cuMemsetD2D8', &__cuMemsetD2D8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD2D16_v2
 *             cuGetProcAddress('cuMemsetD2D16', &__cuMemsetD2D16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD2D8"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D8_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 682, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":684
 *             cuGetProcAddress('cuMemsetD2D8', &__cuMemsetD2D8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemsetD2D16_v2
 *             cuGetProcAddress('cuMemsetD2D16', &__cuMemsetD2D16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD2D32_v2
 *             cuGetProcAddress('cuMemsetD2D32', &__cuMemsetD2D32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD2D16"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D16_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 684, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":686
 *             cuGetProcAddress('cuMemsetD2D16', &__cuMemsetD2D16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemsetD2D32_v2
 *             cuGetProcAddress('cuMemsetD2D32', &__cuMemsetD2D32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD8Async
 *             cuGetProcAddress('cuMemsetD8Async', &__cuMemsetD8Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD2D32"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D32_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 686, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":688
 *             cuGetProcAddress('cuMemsetD2D32', &__cuMemsetD2D32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemsetD8Async
 *             cuGetProcAddress('cuMemsetD8Async', &__cuMemsetD8Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD16Async
 *             cuGetProcAddress('cuMemsetD16Async', &__cuMemsetD16Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD8Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD8Async), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 688, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":690
 *             cuGetProcAddress('cuMemsetD8Async', &__cuMemsetD8Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemsetD16Async
 *             cuGetProcAddress('cuMemsetD16Async', &__cuMemsetD16Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD32Async
 *             cuGetProcAddress('cuMemsetD32Async', &__cuMemsetD32Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD16Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD16Async), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 690, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":692
 *             cuGetProcAddress('cuMemsetD16Async', &__cuMemsetD16Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemsetD32Async
 *             cuGetProcAddress('cuMemsetD32Async', &__cuMemsetD32Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD2D8Async
 *             cuGetProcAddress('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD32Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD32Async), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 692, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":694
 *             cuGetProcAddress('cuMemsetD32Async', &__cuMemsetD32Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemsetD2D8Async
 *             cuGetProcAddress('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD2D16Async
 *             cuGetProcAddress('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD2D8Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D8Async), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 694, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":696
 *             cuGetProcAddress('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemsetD2D16Async
 *             cuGetProcAddress('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD2D32Async
 *             cuGetProcAddress('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD2D16Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D16Async), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 696, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":698
 *             cuGetProcAddress('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemsetD2D32Async
 *             cuGetProcAddress('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemMapArrayAsync
 *             cuGetProcAddress('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemsetD2D32Async"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D32Async), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 698, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":700
 *             cuGetProcAddress('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemMapArrayAsync
 *             cuGetProcAddress('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemFreeAsync
 *             cuGetProcAddress('cuMemFreeAsync', &__cuMemFreeAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemMapArrayAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemMapArrayAsync), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 700, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":702
 *             cuGetProcAddress('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemFreeAsync
 *             cuGetProcAddress('cuMemFreeAsync', &__cuMemFreeAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemAllocAsync
 *             cuGetProcAddress('cuMemAllocAsync', &__cuMemAllocAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemFreeAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemFreeAsync), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 702, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":704
 *             cuGetProcAddress('cuMemFreeAsync', &__cuMemFreeAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemAllocAsync
 *             cuGetProcAddress('cuMemAllocAsync', &__cuMemAllocAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemAllocFromPoolAsync
 *             cuGetProcAddress('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemAllocAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocAsync), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 704, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":706
 *             cuGetProcAddress('cuMemAllocAsync', &__cuMemAllocAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemAllocFromPoolAsync
 *             cuGetProcAddress('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemPrefetchAsync
 *             cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemAllocFromPoolAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocFromPoolAsync), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 706, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":708
 *             cuGetProcAddress('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemPrefetchAsync
 *             cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuMemPrefetchAsync_v2
 *             cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync_v2, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemPrefetchAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPrefetchAsync), 0x1F40, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 708, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":710
 *             cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuMemPrefetchAsync_v2
 *             cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync_v2, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamGetPriority
 *             cuGetProcAddress('cuStreamGetPriority', &__cuStreamGetPriority, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemPrefetchAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPrefetchAsync_v2), 0x2EF4, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 710, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":712
 *             cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync_v2, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuStreamGetPriority
 *             cuGetProcAddress('cuStreamGetPriority', &__cuStreamGetPriority, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamGetFlags
 *             cuGetProcAddress('cuStreamGetFlags', &__cuStreamGetFlags, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamGetPriority"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetPriority), 0x13BA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 712, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":714
 *             cuGetProcAddress('cuStreamGetPriority', &__cuStreamGetPriority, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuStreamGetFlags
 *             cuGetProcAddress('cuStreamGetFlags', &__cuStreamGetFlags, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamGetId
 *             cuGetProcAddress('cuStreamGetId', &__cuStreamGetId, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamGetFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetFlags), 0x13BA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 714, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":716
 *             cuGetProcAddress('cuStreamGetFlags', &__cuStreamGetFlags, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuStreamGetId
 *             cuGetProcAddress('cuStreamGetId', &__cuStreamGetId, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamGetCtx
 *             cuGetProcAddress('cuStreamGetCtx', &__cuStreamGetCtx, 9020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamGetId"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetId), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 716, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":718
 *             cuGetProcAddress('cuStreamGetId', &__cuStreamGetId, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuStreamGetCtx
 *             cuGetProcAddress('cuStreamGetCtx', &__cuStreamGetCtx, 9020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamWaitEvent
 *             cuGetProcAddress('cuStreamWaitEvent', &__cuStreamWaitEvent, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamGetCtx"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCtx), 0x233C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 718, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":720
 *             cuGetProcAddress('cuStreamGetCtx', &__cuStreamGetCtx, 9020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuStreamWaitEvent
 *             cuGetProcAddress('cuStreamWaitEvent', &__cuStreamWaitEvent, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamAddCallback
 *             cuGetProcAddress('cuStreamAddCallback', &__cuStreamAddCallback, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamWaitEvent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitEvent), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 720, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":722
 *             cuGetProcAddress('cuStreamWaitEvent', &__cuStreamWaitEvent, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuStreamAddCallback
 *             cuGetProcAddress('cuStreamAddCallback', &__cuStreamAddCallback, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamBeginCapture_v2
 *             cuGetProcAddress('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamAddCallback"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamAddCallback), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 722, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":724
 *             cuGetProcAddress('cuStreamAddCallback', &__cuStreamAddCallback, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuStreamBeginCapture_v2
 *             cuGetProcAddress('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamEndCapture
 *             cuGetProcAddress('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamBeginCapture"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamBeginCapture_v2), 0x271A, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 724, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":726
 *             cuGetProcAddress('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuStreamEndCapture
 *             cuGetProcAddress('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamIsCapturing
 *             cuGetProcAddress('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamEndCapture"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamEndCapture), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 726, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":728
 *             cuGetProcAddress('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuStreamIsCapturing
 *             cuGetProcAddress('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamGetCaptureInfo_v2
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamIsCapturing"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamIsCapturing), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 728, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":730
 *             cuGetProcAddress('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuStreamGetCaptureInfo_v2
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamUpdateCaptureDependencies
 *             cuGetProcAddress('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamGetCaptureInfo"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCaptureInfo_v2), 0x2B16, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 730, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":732
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuStreamUpdateCaptureDependencies
 *             cuGetProcAddress('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamAttachMemAsync
 *             cuGetProcAddress('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamUpdateCaptureDependencies"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamUpdateCaptureDependencies), 0x2B16, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 732, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":734
 *             cuGetProcAddress('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuStreamAttachMemAsync
 *             cuGetProcAddress('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamQuery
 *             cuGetProcAddress('cuStreamQuery', &__cuStreamQuery, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamAttachMemAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamAttachMemAsync), 0x1770, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 734, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":736
 *             cuGetProcAddress('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuStreamQuery
 *             cuGetProcAddress('cuStreamQuery', &__cuStreamQuery, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamSynchronize
 *             cuGetProcAddress('cuStreamSynchronize', &__cuStreamSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamQuery"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamQuery), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 736, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":738
 *             cuGetProcAddress('cuStreamQuery', &__cuStreamQuery, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuStreamSynchronize
 *             cuGetProcAddress('cuStreamSynchronize', &__cuStreamSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamCopyAttributes
 *             cuGetProcAddress('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamSynchronize"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamSynchronize), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 738, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":740
 *             cuGetProcAddress('cuStreamSynchronize', &__cuStreamSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuStreamCopyAttributes
 *             cuGetProcAddress('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamGetAttribute
 *             cuGetProcAddress('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamCopyAttributes"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamCopyAttributes), 0x2AF8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 740, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":742
 *             cuGetProcAddress('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuStreamGetAttribute
 *             cuGetProcAddress('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamSetAttribute
 *             cuGetProcAddress('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamGetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetAttribute), 0x2AF8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 742, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":744
 *             cuGetProcAddress('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuStreamSetAttribute
 *             cuGetProcAddress('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuEventRecord
 *             cuGetProcAddress('cuEventRecord', &__cuEventRecord, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamSetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamSetAttribute), 0x2AF8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 744, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":746
 *             cuGetProcAddress('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuEventRecord
 *             cuGetProcAddress('cuEventRecord', &__cuEventRecord, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuEventRecordWithFlags
 *             cuGetProcAddress('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEventRecord"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEventRecord), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 746, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":748
 *             cuGetProcAddress('cuEventRecord', &__cuEventRecord, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuEventRecordWithFlags
 *             cuGetProcAddress('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuSignalExternalSemaphoresAsync
 *             cuGetProcAddress('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEventRecordWithFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEventRecordWithFlags), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 748, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":750
 *             cuGetProcAddress('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuSignalExternalSemaphoresAsync
 *             cuGetProcAddress('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuWaitExternalSemaphoresAsync
 *             cuGetProcAddress('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuSignalExternalSemaphoresAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuSignalExternalSemaphoresAsync), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 750, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":752
 *             cuGetProcAddress('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuWaitExternalSemaphoresAsync
 *             cuGetProcAddress('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamWaitValue32_v2
 *             cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuWaitExternalSemaphoresAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuWaitExternalSemaphoresAsync), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 752, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":754
 *             cuGetProcAddress('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuStreamWaitValue32_v2
 *             cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamWaitValue64_v2
 *             cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamWaitValue32"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue32_v2), 0x2B3E, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 754, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":756
 *             cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuStreamWaitValue64_v2
 *             cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamWriteValue32_v2
 *             cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamWaitValue64"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue64_v2), 0x2B3E, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 756, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":758
 *             cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuStreamWriteValue32_v2
 *             cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamWriteValue64_v2
 *             cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamWriteValue32"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue32_v2), 0x2B3E, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 758, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":760
 *             cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuStreamWriteValue64_v2
 *             cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuStreamBatchMemOp_v2
 *             cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamWriteValue64"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue64_v2), 0x2B3E, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 760, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":762
 *             cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuStreamBatchMemOp_v2
 *             cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuLaunchKernel
 *             cuGetProcAddress('cuLaunchKernel', &__cuLaunchKernel, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamBatchMemOp"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamBatchMemOp_v2), 0x2B3E, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 762, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":764
 *             cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuLaunchKernel
 *             cuGetProcAddress('cuLaunchKernel', &__cuLaunchKernel, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuLaunchKernelEx
 *             cuGetProcAddress('cuLaunchKernelEx', &__cuLaunchKernelEx, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLaunchKernel"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchKernel), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 764, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":766
 *             cuGetProcAddress('cuLaunchKernel', &__cuLaunchKernel, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuLaunchKernelEx
 *             cuGetProcAddress('cuLaunchKernelEx', &__cuLaunchKernelEx, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuLaunchCooperativeKernel
 *             cuGetProcAddress('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLaunchKernelEx"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchKernelEx), 0x2B34, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 766, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":768
 *             cuGetProcAddress('cuLaunchKernelEx', &__cuLaunchKernelEx, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuLaunchCooperativeKernel
 *             cuGetProcAddress('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuLaunchHostFunc
 *             cuGetProcAddress('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLaunchCooperativeKernel"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchCooperativeKernel), 0x2328, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 768, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":770
 *             cuGetProcAddress('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuLaunchHostFunc
 *             cuGetProcAddress('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuGraphInstantiateWithParams
 *             cuGetProcAddress('cuGraphInstantiateWithParams', &__cuGraphInstantiateWithParams, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLaunchHostFunc"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchHostFunc), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 770, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":772
 *             cuGetProcAddress('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuGraphInstantiateWithParams
 *             cuGetProcAddress('cuGraphInstantiateWithParams', &__cuGraphInstantiateWithParams, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuGraphUpload
 *             cuGetProcAddress('cuGraphUpload', &__cuGraphUpload, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphInstantiateWithParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphInstantiateWithParams), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 772, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":774
 *             cuGetProcAddress('cuGraphInstantiateWithParams', &__cuGraphInstantiateWithParams, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuGraphUpload
 *             cuGetProcAddress('cuGraphUpload', &__cuGraphUpload, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuGraphLaunch
 *             cuGetProcAddress('cuGraphLaunch', &__cuGraphLaunch, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphUpload"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphUpload), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 774, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":776
 *             cuGetProcAddress('cuGraphUpload', &__cuGraphUpload, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuGraphLaunch
 *             cuGetProcAddress('cuGraphLaunch', &__cuGraphLaunch, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuGraphicsMapResources
 *             cuGetProcAddress('cuGraphicsMapResources', &__cuGraphicsMapResources, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphLaunch"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphLaunch), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 776, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":778
 *             cuGetProcAddress('cuGraphLaunch', &__cuGraphLaunch, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuGraphicsMapResources
 *             cuGetProcAddress('cuGraphicsMapResources', &__cuGraphicsMapResources, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *             global __cuGraphicsUnmapResources
 *             cuGetProcAddress('cuGraphicsUnmapResources', &__cuGraphicsUnmapResources, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsMapResources"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsMapResources), 0xBB8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 778, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":780
 *             cuGetProcAddress('cuGraphicsMapResources', &__cuGraphicsMapResources, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *             global __cuGraphicsUnmapResources
 *             cuGetProcAddress('cuGraphicsUnmapResources', &__cuGraphicsUnmapResources, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         # Get remaining functions
 *         global __cuGetErrorString
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsUnmapResources"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsUnmapResources), 0xBB8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 780, __pyx_L4_error)
      }
      __pyx_L43:;

      /* "cuda/_cuda/ccuda.pyx":783
 *         # Get remaining functions
 *         global __cuGetErrorString
 *         cuGetProcAddress('cuGetErrorString', &__cuGetErrorString, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGetErrorName
 *         cuGetProcAddress('cuGetErrorName', &__cuGetErrorName, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGetErrorString"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGetErrorString), 0x1770, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 783, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":785
 *         cuGetProcAddress('cuGetErrorString', &__cuGetErrorString, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGetErrorName
 *         cuGetProcAddress('cuGetErrorName', &__cuGetErrorName, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuInit
 *         cuGetProcAddress('cuInit', &__cuInit, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGetErrorName"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGetErrorName), 0x1770, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 785, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":787
 *         cuGetProcAddress('cuGetErrorName', &__cuGetErrorName, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuInit
 *         cuGetProcAddress('cuInit', &__cuInit, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDriverGetVersion
 *         cuGetProcAddress('cuDriverGetVersion', &__cuDriverGetVersion, 2020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuInit"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuInit), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 787, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":789
 *         cuGetProcAddress('cuInit', &__cuInit, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDriverGetVersion
 *         cuGetProcAddress('cuDriverGetVersion', &__cuDriverGetVersion, 2020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDeviceGet
 *         cuGetProcAddress('cuDeviceGet', &__cuDeviceGet, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDriverGetVersion"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDriverGetVersion), 0x7E4, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 789, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":791
 *         cuGetProcAddress('cuDriverGetVersion', &__cuDriverGetVersion, 2020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDeviceGet
 *         cuGetProcAddress('cuDeviceGet', &__cuDeviceGet, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDeviceGetCount
 *         cuGetProcAddress('cuDeviceGetCount', &__cuDeviceGetCount, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGet"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGet), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 791, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":793
 *         cuGetProcAddress('cuDeviceGet', &__cuDeviceGet, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDeviceGetCount
 *         cuGetProcAddress('cuDeviceGetCount', &__cuDeviceGetCount, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDeviceGetName
 *         cuGetProcAddress('cuDeviceGetName', &__cuDeviceGetName, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetCount"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetCount), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 793, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":795
 *         cuGetProcAddress('cuDeviceGetCount', &__cuDeviceGetCount, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDeviceGetName
 *         cuGetProcAddress('cuDeviceGetName', &__cuDeviceGetName, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDeviceGetUuid
 *         cuGetProcAddress('cuDeviceGetUuid', &__cuDeviceGetUuid, 9020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetName"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetName), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 795, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":797
 *         cuGetProcAddress('cuDeviceGetName', &__cuDeviceGetName, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDeviceGetUuid
 *         cuGetProcAddress('cuDeviceGetUuid', &__cuDeviceGetUuid, 9020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDeviceGetUuid_v2
 *         cuGetProcAddress('cuDeviceGetUuid', &__cuDeviceGetUuid_v2, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetUuid"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetUuid), 0x233C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 797, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":799
 *         cuGetProcAddress('cuDeviceGetUuid', &__cuDeviceGetUuid, 9020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDeviceGetUuid_v2
 *         cuGetProcAddress('cuDeviceGetUuid', &__cuDeviceGetUuid_v2, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDeviceGetLuid
 *         cuGetProcAddress('cuDeviceGetLuid', &__cuDeviceGetLuid, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetUuid"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetUuid_v2), 0x2B20, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 799, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":801
 *         cuGetProcAddress('cuDeviceGetUuid', &__cuDeviceGetUuid_v2, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDeviceGetLuid
 *         cuGetProcAddress('cuDeviceGetLuid', &__cuDeviceGetLuid, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDeviceTotalMem_v2
 *         cuGetProcAddress('cuDeviceTotalMem', &__cuDeviceTotalMem_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetLuid"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetLuid), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 801, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":803
 *         cuGetProcAddress('cuDeviceGetLuid', &__cuDeviceGetLuid, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDeviceTotalMem_v2
 *         cuGetProcAddress('cuDeviceTotalMem', &__cuDeviceTotalMem_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDeviceGetTexture1DLinearMaxWidth
 *         cuGetProcAddress('cuDeviceGetTexture1DLinearMaxWidth', &__cuDeviceGetTexture1DLinearMaxWidth, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceTotalMem"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceTotalMem_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 803, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":805
 *         cuGetProcAddress('cuDeviceTotalMem', &__cuDeviceTotalMem_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDeviceGetTexture1DLinearMaxWidth
 *         cuGetProcAddress('cuDeviceGetTexture1DLinearMaxWidth', &__cuDeviceGetTexture1DLinearMaxWidth, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDeviceGetAttribute
 *         cuGetProcAddress('cuDeviceGetAttribute', &__cuDeviceGetAttribute, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetTexture1DLinearMaxWidth"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetTexture1DLinearMaxWidth), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 805, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":807
 *         cuGetProcAddress('cuDeviceGetTexture1DLinearMaxWidth', &__cuDeviceGetTexture1DLinearMaxWidth, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDeviceGetAttribute
 *         cuGetProcAddress('cuDeviceGetAttribute', &__cuDeviceGetAttribute, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDeviceGetNvSciSyncAttributes
 *         cuGetProcAddress('cuDeviceGetNvSciSyncAttributes', &__cuDeviceGetNvSciSyncAttributes, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetAttribute), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 807, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":809
 *         cuGetProcAddress('cuDeviceGetAttribute', &__cuDeviceGetAttribute, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDeviceGetNvSciSyncAttributes
 *         cuGetProcAddress('cuDeviceGetNvSciSyncAttributes', &__cuDeviceGetNvSciSyncAttributes, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDeviceSetMemPool
 *         cuGetProcAddress('cuDeviceSetMemPool', &__cuDeviceSetMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetNvSciSyncAttributes"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetNvSciSyncAttributes), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 809, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":811
 *         cuGetProcAddress('cuDeviceGetNvSciSyncAttributes', &__cuDeviceGetNvSciSyncAttributes, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDeviceSetMemPool
 *         cuGetProcAddress('cuDeviceSetMemPool', &__cuDeviceSetMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDeviceGetMemPool
 *         cuGetProcAddress('cuDeviceGetMemPool', &__cuDeviceGetMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceSetMemPool"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceSetMemPool), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 811, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":813
 *         cuGetProcAddress('cuDeviceSetMemPool', &__cuDeviceSetMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDeviceGetMemPool
 *         cuGetProcAddress('cuDeviceGetMemPool', &__cuDeviceGetMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDeviceGetDefaultMemPool
 *         cuGetProcAddress('cuDeviceGetDefaultMemPool', &__cuDeviceGetDefaultMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetMemPool"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetMemPool), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 813, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":815
 *         cuGetProcAddress('cuDeviceGetMemPool', &__cuDeviceGetMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDeviceGetDefaultMemPool
 *         cuGetProcAddress('cuDeviceGetDefaultMemPool', &__cuDeviceGetDefaultMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDeviceGetExecAffinitySupport
 *         cuGetProcAddress('cuDeviceGetExecAffinitySupport', &__cuDeviceGetExecAffinitySupport, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetDefaultMemPool"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetDefaultMemPool), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 815, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":817
 *         cuGetProcAddress('cuDeviceGetDefaultMemPool', &__cuDeviceGetDefaultMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDeviceGetExecAffinitySupport
 *         cuGetProcAddress('cuDeviceGetExecAffinitySupport', &__cuDeviceGetExecAffinitySupport, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuFlushGPUDirectRDMAWrites
 *         cuGetProcAddress('cuFlushGPUDirectRDMAWrites', &__cuFlushGPUDirectRDMAWrites, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetExecAffinitySupport"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetExecAffinitySupport), 0x2B20, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 817, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":819
 *         cuGetProcAddress('cuDeviceGetExecAffinitySupport', &__cuDeviceGetExecAffinitySupport, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuFlushGPUDirectRDMAWrites
 *         cuGetProcAddress('cuFlushGPUDirectRDMAWrites', &__cuFlushGPUDirectRDMAWrites, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDeviceGetProperties
 *         cuGetProcAddress('cuDeviceGetProperties', &__cuDeviceGetProperties, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuFlushGPUDirectRDMAWrites"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuFlushGPUDirectRDMAWrites), 0x2B16, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 819, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":821
 *         cuGetProcAddress('cuFlushGPUDirectRDMAWrites', &__cuFlushGPUDirectRDMAWrites, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDeviceGetProperties
 *         cuGetProcAddress('cuDeviceGetProperties', &__cuDeviceGetProperties, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDeviceComputeCapability
 *         cuGetProcAddress('cuDeviceComputeCapability', &__cuDeviceComputeCapability, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetProperties"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetProperties), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 821, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":823
 *         cuGetProcAddress('cuDeviceGetProperties', &__cuDeviceGetProperties, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDeviceComputeCapability
 *         cuGetProcAddress('cuDeviceComputeCapability', &__cuDeviceComputeCapability, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDevicePrimaryCtxRetain
 *         cuGetProcAddress('cuDevicePrimaryCtxRetain', &__cuDevicePrimaryCtxRetain, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceComputeCapability"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceComputeCapability), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 823, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":825
 *         cuGetProcAddress('cuDeviceComputeCapability', &__cuDeviceComputeCapability, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDevicePrimaryCtxRetain
 *         cuGetProcAddress('cuDevicePrimaryCtxRetain', &__cuDevicePrimaryCtxRetain, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDevicePrimaryCtxRelease_v2
 *         cuGetProcAddress('cuDevicePrimaryCtxRelease', &__cuDevicePrimaryCtxRelease_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDevicePrimaryCtxRetain"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxRetain), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 825, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":827
 *         cuGetProcAddress('cuDevicePrimaryCtxRetain', &__cuDevicePrimaryCtxRetain, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDevicePrimaryCtxRelease_v2
 *         cuGetProcAddress('cuDevicePrimaryCtxRelease', &__cuDevicePrimaryCtxRelease_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDevicePrimaryCtxSetFlags_v2
 *         cuGetProcAddress('cuDevicePrimaryCtxSetFlags', &__cuDevicePrimaryCtxSetFlags_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDevicePrimaryCtxRelease"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxRelease_v2), 0x2AF8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 827, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":829
 *         cuGetProcAddress('cuDevicePrimaryCtxRelease', &__cuDevicePrimaryCtxRelease_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDevicePrimaryCtxSetFlags_v2
 *         cuGetProcAddress('cuDevicePrimaryCtxSetFlags', &__cuDevicePrimaryCtxSetFlags_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDevicePrimaryCtxGetState
 *         cuGetProcAddress('cuDevicePrimaryCtxGetState', &__cuDevicePrimaryCtxGetState, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDevicePrimaryCtxSetFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxSetFlags_v2), 0x2AF8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 829, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":831
 *         cuGetProcAddress('cuDevicePrimaryCtxSetFlags', &__cuDevicePrimaryCtxSetFlags_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDevicePrimaryCtxGetState
 *         cuGetProcAddress('cuDevicePrimaryCtxGetState', &__cuDevicePrimaryCtxGetState, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDevicePrimaryCtxReset_v2
 *         cuGetProcAddress('cuDevicePrimaryCtxReset', &__cuDevicePrimaryCtxReset_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDevicePrimaryCtxGetState"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxGetState), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 831, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":833
 *         cuGetProcAddress('cuDevicePrimaryCtxGetState', &__cuDevicePrimaryCtxGetState, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDevicePrimaryCtxReset_v2
 *         cuGetProcAddress('cuDevicePrimaryCtxReset', &__cuDevicePrimaryCtxReset_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCtxCreate_v2
 *         cuGetProcAddress('cuCtxCreate', &__cuCtxCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDevicePrimaryCtxReset"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxReset_v2), 0x2AF8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 833, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":835
 *         cuGetProcAddress('cuDevicePrimaryCtxReset', &__cuDevicePrimaryCtxReset_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCtxCreate_v2
 *         cuGetProcAddress('cuCtxCreate', &__cuCtxCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCtxCreate_v3
 *         cuGetProcAddress('cuCtxCreate', &__cuCtxCreate_v3, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxCreate_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 835, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":837
 *         cuGetProcAddress('cuCtxCreate', &__cuCtxCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCtxCreate_v3
 *         cuGetProcAddress('cuCtxCreate', &__cuCtxCreate_v3, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCtxDestroy_v2
 *         cuGetProcAddress('cuCtxDestroy', &__cuCtxDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxCreate_v3), 0x2B20, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 837, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":839
 *         cuGetProcAddress('cuCtxCreate', &__cuCtxCreate_v3, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCtxDestroy_v2
 *         cuGetProcAddress('cuCtxDestroy', &__cuCtxDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCtxPushCurrent_v2
 *         cuGetProcAddress('cuCtxPushCurrent', &__cuCtxPushCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxDestroy_v2), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 839, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":841
 *         cuGetProcAddress('cuCtxDestroy', &__cuCtxDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCtxPushCurrent_v2
 *         cuGetProcAddress('cuCtxPushCurrent', &__cuCtxPushCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCtxPopCurrent_v2
 *         cuGetProcAddress('cuCtxPopCurrent', &__cuCtxPopCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxPushCurrent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxPushCurrent_v2), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 841, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":843
 *         cuGetProcAddress('cuCtxPushCurrent', &__cuCtxPushCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCtxPopCurrent_v2
 *         cuGetProcAddress('cuCtxPopCurrent', &__cuCtxPopCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCtxSetCurrent
 *         cuGetProcAddress('cuCtxSetCurrent', &__cuCtxSetCurrent, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxPopCurrent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxPopCurrent_v2), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 843, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":845
 *         cuGetProcAddress('cuCtxPopCurrent', &__cuCtxPopCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCtxSetCurrent
 *         cuGetProcAddress('cuCtxSetCurrent', &__cuCtxSetCurrent, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCtxGetCurrent
 *         cuGetProcAddress('cuCtxGetCurrent', &__cuCtxGetCurrent, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxSetCurrent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetCurrent), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 845, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":847
 *         cuGetProcAddress('cuCtxSetCurrent', &__cuCtxSetCurrent, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCtxGetCurrent
 *         cuGetProcAddress('cuCtxGetCurrent', &__cuCtxGetCurrent, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCtxGetDevice
 *         cuGetProcAddress('cuCtxGetDevice', &__cuCtxGetDevice, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxGetCurrent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetCurrent), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 847, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":849
 *         cuGetProcAddress('cuCtxGetCurrent', &__cuCtxGetCurrent, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCtxGetDevice
 *         cuGetProcAddress('cuCtxGetDevice', &__cuCtxGetDevice, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCtxGetFlags
 *         cuGetProcAddress('cuCtxGetFlags', &__cuCtxGetFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxGetDevice"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetDevice), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 849, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":851
 *         cuGetProcAddress('cuCtxGetDevice', &__cuCtxGetDevice, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCtxGetFlags
 *         cuGetProcAddress('cuCtxGetFlags', &__cuCtxGetFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCtxSetFlags
 *         cuGetProcAddress('cuCtxSetFlags', &__cuCtxSetFlags, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxGetFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetFlags), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 851, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":853
 *         cuGetProcAddress('cuCtxGetFlags', &__cuCtxGetFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCtxSetFlags
 *         cuGetProcAddress('cuCtxSetFlags', &__cuCtxSetFlags, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCtxGetId
 *         cuGetProcAddress('cuCtxGetId', &__cuCtxGetId, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxSetFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetFlags), 0x2EEA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 853, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":855
 *         cuGetProcAddress('cuCtxSetFlags', &__cuCtxSetFlags, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCtxGetId
 *         cuGetProcAddress('cuCtxGetId', &__cuCtxGetId, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCtxSynchronize
 *         cuGetProcAddress('cuCtxSynchronize', &__cuCtxSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxGetId"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetId), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 855, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":857
 *         cuGetProcAddress('cuCtxGetId', &__cuCtxGetId, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCtxSynchronize
 *         cuGetProcAddress('cuCtxSynchronize', &__cuCtxSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCtxSetLimit
 *         cuGetProcAddress('cuCtxSetLimit', &__cuCtxSetLimit, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxSynchronize"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSynchronize), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 857, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":859
 *         cuGetProcAddress('cuCtxSynchronize', &__cuCtxSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCtxSetLimit
 *         cuGetProcAddress('cuCtxSetLimit', &__cuCtxSetLimit, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCtxGetLimit
 *         cuGetProcAddress('cuCtxGetLimit', &__cuCtxGetLimit, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxSetLimit"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetLimit), 0xBC2, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 859, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":861
 *         cuGetProcAddress('cuCtxSetLimit', &__cuCtxSetLimit, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCtxGetLimit
 *         cuGetProcAddress('cuCtxGetLimit', &__cuCtxGetLimit, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCtxGetCacheConfig
 *         cuGetProcAddress('cuCtxGetCacheConfig', &__cuCtxGetCacheConfig, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxGetLimit"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetLimit), 0xBC2, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 861, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":863
 *         cuGetProcAddress('cuCtxGetLimit', &__cuCtxGetLimit, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCtxGetCacheConfig
 *         cuGetProcAddress('cuCtxGetCacheConfig', &__cuCtxGetCacheConfig, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCtxSetCacheConfig
 *         cuGetProcAddress('cuCtxSetCacheConfig', &__cuCtxSetCacheConfig, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxGetCacheConfig"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetCacheConfig), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 863, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":865
 *         cuGetProcAddress('cuCtxGetCacheConfig', &__cuCtxGetCacheConfig, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCtxSetCacheConfig
 *         cuGetProcAddress('cuCtxSetCacheConfig', &__cuCtxSetCacheConfig, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCtxGetSharedMemConfig
 *         cuGetProcAddress('cuCtxGetSharedMemConfig', &__cuCtxGetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxSetCacheConfig"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetCacheConfig), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 865, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":867
 *         cuGetProcAddress('cuCtxSetCacheConfig', &__cuCtxSetCacheConfig, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCtxGetSharedMemConfig
 *         cuGetProcAddress('cuCtxGetSharedMemConfig', &__cuCtxGetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCtxSetSharedMemConfig
 *         cuGetProcAddress('cuCtxSetSharedMemConfig', &__cuCtxSetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxGetSharedMemConfig"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetSharedMemConfig), 0xFB4, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 867, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":869
 *         cuGetProcAddress('cuCtxGetSharedMemConfig', &__cuCtxGetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCtxSetSharedMemConfig
 *         cuGetProcAddress('cuCtxSetSharedMemConfig', &__cuCtxSetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCtxGetApiVersion
 *         cuGetProcAddress('cuCtxGetApiVersion', &__cuCtxGetApiVersion, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxSetSharedMemConfig"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetSharedMemConfig), 0xFB4, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 869, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":871
 *         cuGetProcAddress('cuCtxSetSharedMemConfig', &__cuCtxSetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCtxGetApiVersion
 *         cuGetProcAddress('cuCtxGetApiVersion', &__cuCtxGetApiVersion, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCtxGetStreamPriorityRange
 *         cuGetProcAddress('cuCtxGetStreamPriorityRange', &__cuCtxGetStreamPriorityRange, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxGetApiVersion"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetApiVersion), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 871, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":873
 *         cuGetProcAddress('cuCtxGetApiVersion', &__cuCtxGetApiVersion, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCtxGetStreamPriorityRange
 *         cuGetProcAddress('cuCtxGetStreamPriorityRange', &__cuCtxGetStreamPriorityRange, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCtxResetPersistingL2Cache
 *         cuGetProcAddress('cuCtxResetPersistingL2Cache', &__cuCtxResetPersistingL2Cache, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxGetStreamPriorityRange"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetStreamPriorityRange), 0x13BA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 873, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":875
 *         cuGetProcAddress('cuCtxGetStreamPriorityRange', &__cuCtxGetStreamPriorityRange, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCtxResetPersistingL2Cache
 *         cuGetProcAddress('cuCtxResetPersistingL2Cache', &__cuCtxResetPersistingL2Cache, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCtxGetExecAffinity
 *         cuGetProcAddress('cuCtxGetExecAffinity', &__cuCtxGetExecAffinity, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxResetPersistingL2Cache"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxResetPersistingL2Cache), 0x2AF8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 875, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":877
 *         cuGetProcAddress('cuCtxResetPersistingL2Cache', &__cuCtxResetPersistingL2Cache, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCtxGetExecAffinity
 *         cuGetProcAddress('cuCtxGetExecAffinity', &__cuCtxGetExecAffinity, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCtxAttach
 *         cuGetProcAddress('cuCtxAttach', &__cuCtxAttach, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxGetExecAffinity"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetExecAffinity), 0x2B20, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 877, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":879
 *         cuGetProcAddress('cuCtxGetExecAffinity', &__cuCtxGetExecAffinity, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCtxAttach
 *         cuGetProcAddress('cuCtxAttach', &__cuCtxAttach, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCtxDetach
 *         cuGetProcAddress('cuCtxDetach', &__cuCtxDetach, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxAttach"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxAttach), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 879, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":881
 *         cuGetProcAddress('cuCtxAttach', &__cuCtxAttach, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCtxDetach
 *         cuGetProcAddress('cuCtxDetach', &__cuCtxDetach, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuModuleLoad
 *         cuGetProcAddress('cuModuleLoad', &__cuModuleLoad, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxDetach"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxDetach), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 881, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":883
 *         cuGetProcAddress('cuCtxDetach', &__cuCtxDetach, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuModuleLoad
 *         cuGetProcAddress('cuModuleLoad', &__cuModuleLoad, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuModuleLoadData
 *         cuGetProcAddress('cuModuleLoadData', &__cuModuleLoadData, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuModuleLoad"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoad), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 883, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":885
 *         cuGetProcAddress('cuModuleLoad', &__cuModuleLoad, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuModuleLoadData
 *         cuGetProcAddress('cuModuleLoadData', &__cuModuleLoadData, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuModuleLoadDataEx
 *         cuGetProcAddress('cuModuleLoadDataEx', &__cuModuleLoadDataEx, 2010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuModuleLoadData"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadData), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 885, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":887
 *         cuGetProcAddress('cuModuleLoadData', &__cuModuleLoadData, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuModuleLoadDataEx
 *         cuGetProcAddress('cuModuleLoadDataEx', &__cuModuleLoadDataEx, 2010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuModuleLoadFatBinary
 *         cuGetProcAddress('cuModuleLoadFatBinary', &__cuModuleLoadFatBinary, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuModuleLoadDataEx"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadDataEx), 0x7DA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 887, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":889
 *         cuGetProcAddress('cuModuleLoadDataEx', &__cuModuleLoadDataEx, 2010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuModuleLoadFatBinary
 *         cuGetProcAddress('cuModuleLoadFatBinary', &__cuModuleLoadFatBinary, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuModuleUnload
 *         cuGetProcAddress('cuModuleUnload', &__cuModuleUnload, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuModuleLoadFatBinary"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadFatBinary), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 889, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":891
 *         cuGetProcAddress('cuModuleLoadFatBinary', &__cuModuleLoadFatBinary, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuModuleUnload
 *         cuGetProcAddress('cuModuleUnload', &__cuModuleUnload, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuModuleGetLoadingMode
 *         cuGetProcAddress('cuModuleGetLoadingMode', &__cuModuleGetLoadingMode, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuModuleUnload"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuModuleUnload), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 891, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":893
 *         cuGetProcAddress('cuModuleUnload', &__cuModuleUnload, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuModuleGetLoadingMode
 *         cuGetProcAddress('cuModuleGetLoadingMode', &__cuModuleGetLoadingMode, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuModuleGetFunction
 *         cuGetProcAddress('cuModuleGetFunction', &__cuModuleGetFunction, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuModuleGetLoadingMode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetLoadingMode), 0x2B3E, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 893, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":895
 *         cuGetProcAddress('cuModuleGetLoadingMode', &__cuModuleGetLoadingMode, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuModuleGetFunction
 *         cuGetProcAddress('cuModuleGetFunction', &__cuModuleGetFunction, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuModuleGetGlobal_v2
 *         cuGetProcAddress('cuModuleGetGlobal', &__cuModuleGetGlobal_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuModuleGetFunction"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetFunction), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 895, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":897
 *         cuGetProcAddress('cuModuleGetFunction', &__cuModuleGetFunction, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuModuleGetGlobal_v2
 *         cuGetProcAddress('cuModuleGetGlobal', &__cuModuleGetGlobal_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuLinkCreate_v2
 *         cuGetProcAddress('cuLinkCreate', &__cuLinkCreate_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuModuleGetGlobal"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetGlobal_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 897, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":899
 *         cuGetProcAddress('cuModuleGetGlobal', &__cuModuleGetGlobal_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuLinkCreate_v2
 *         cuGetProcAddress('cuLinkCreate', &__cuLinkCreate_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuLinkAddData_v2
 *         cuGetProcAddress('cuLinkAddData', &__cuLinkAddData_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLinkCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLinkCreate_v2), 0x17A2, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 899, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":901
 *         cuGetProcAddress('cuLinkCreate', &__cuLinkCreate_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuLinkAddData_v2
 *         cuGetProcAddress('cuLinkAddData', &__cuLinkAddData_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuLinkAddFile_v2
 *         cuGetProcAddress('cuLinkAddFile', &__cuLinkAddFile_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLinkAddData"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLinkAddData_v2), 0x17A2, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 901, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":903
 *         cuGetProcAddress('cuLinkAddData', &__cuLinkAddData_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuLinkAddFile_v2
 *         cuGetProcAddress('cuLinkAddFile', &__cuLinkAddFile_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuLinkComplete
 *         cuGetProcAddress('cuLinkComplete', &__cuLinkComplete, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLinkAddFile"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLinkAddFile_v2), 0x17A2, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 903, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":905
 *         cuGetProcAddress('cuLinkAddFile', &__cuLinkAddFile_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuLinkComplete
 *         cuGetProcAddress('cuLinkComplete', &__cuLinkComplete, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuLinkDestroy
 *         cuGetProcAddress('cuLinkDestroy', &__cuLinkDestroy, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLinkComplete"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLinkComplete), 0x13BA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 905, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":907
 *         cuGetProcAddress('cuLinkComplete', &__cuLinkComplete, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuLinkDestroy
 *         cuGetProcAddress('cuLinkDestroy', &__cuLinkDestroy, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuModuleGetTexRef
 *         cuGetProcAddress('cuModuleGetTexRef', &__cuModuleGetTexRef, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLinkDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLinkDestroy), 0x13BA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 907, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":909
 *         cuGetProcAddress('cuLinkDestroy', &__cuLinkDestroy, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuModuleGetTexRef
 *         cuGetProcAddress('cuModuleGetTexRef', &__cuModuleGetTexRef, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuModuleGetSurfRef
 *         cuGetProcAddress('cuModuleGetSurfRef', &__cuModuleGetSurfRef, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuModuleGetTexRef"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetTexRef), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 909, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":911
 *         cuGetProcAddress('cuModuleGetTexRef', &__cuModuleGetTexRef, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuModuleGetSurfRef
 *         cuGetProcAddress('cuModuleGetSurfRef', &__cuModuleGetSurfRef, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuLibraryLoadData
 *         cuGetProcAddress('cuLibraryLoadData', &__cuLibraryLoadData, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuModuleGetSurfRef"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetSurfRef), 0xBB8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 911, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":913
 *         cuGetProcAddress('cuModuleGetSurfRef', &__cuModuleGetSurfRef, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuLibraryLoadData
 *         cuGetProcAddress('cuLibraryLoadData', &__cuLibraryLoadData, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuLibraryLoadFromFile
 *         cuGetProcAddress('cuLibraryLoadFromFile', &__cuLibraryLoadFromFile, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLibraryLoadData"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryLoadData), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 913, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":915
 *         cuGetProcAddress('cuLibraryLoadData', &__cuLibraryLoadData, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuLibraryLoadFromFile
 *         cuGetProcAddress('cuLibraryLoadFromFile', &__cuLibraryLoadFromFile, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuLibraryUnload
 *         cuGetProcAddress('cuLibraryUnload', &__cuLibraryUnload, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLibraryLoadFromFile"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryLoadFromFile), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 915, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":917
 *         cuGetProcAddress('cuLibraryLoadFromFile', &__cuLibraryLoadFromFile, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuLibraryUnload
 *         cuGetProcAddress('cuLibraryUnload', &__cuLibraryUnload, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuLibraryGetKernel
 *         cuGetProcAddress('cuLibraryGetKernel', &__cuLibraryGetKernel, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLibraryUnload"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryUnload), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 917, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":919
 *         cuGetProcAddress('cuLibraryUnload', &__cuLibraryUnload, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuLibraryGetKernel
 *         cuGetProcAddress('cuLibraryGetKernel', &__cuLibraryGetKernel, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuLibraryGetModule
 *         cuGetProcAddress('cuLibraryGetModule', &__cuLibraryGetModule, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLibraryGetKernel"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetKernel), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 919, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":921
 *         cuGetProcAddress('cuLibraryGetKernel', &__cuLibraryGetKernel, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuLibraryGetModule
 *         cuGetProcAddress('cuLibraryGetModule', &__cuLibraryGetModule, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuKernelGetFunction
 *         cuGetProcAddress('cuKernelGetFunction', &__cuKernelGetFunction, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLibraryGetModule"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetModule), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 921, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":923
 *         cuGetProcAddress('cuLibraryGetModule', &__cuLibraryGetModule, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuKernelGetFunction
 *         cuGetProcAddress('cuKernelGetFunction', &__cuKernelGetFunction, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuLibraryGetGlobal
 *         cuGetProcAddress('cuLibraryGetGlobal', &__cuLibraryGetGlobal, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuKernelGetFunction"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuKernelGetFunction), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 923, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":925
 *         cuGetProcAddress('cuKernelGetFunction', &__cuKernelGetFunction, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuLibraryGetGlobal
 *         cuGetProcAddress('cuLibraryGetGlobal', &__cuLibraryGetGlobal, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuLibraryGetManaged
 *         cuGetProcAddress('cuLibraryGetManaged', &__cuLibraryGetManaged, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLibraryGetGlobal"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetGlobal), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 925, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":927
 *         cuGetProcAddress('cuLibraryGetGlobal', &__cuLibraryGetGlobal, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuLibraryGetManaged
 *         cuGetProcAddress('cuLibraryGetManaged', &__cuLibraryGetManaged, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuLibraryGetUnifiedFunction
 *         cuGetProcAddress('cuLibraryGetUnifiedFunction', &__cuLibraryGetUnifiedFunction, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLibraryGetManaged"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetManaged), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 927, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":929
 *         cuGetProcAddress('cuLibraryGetManaged', &__cuLibraryGetManaged, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuLibraryGetUnifiedFunction
 *         cuGetProcAddress('cuLibraryGetUnifiedFunction', &__cuLibraryGetUnifiedFunction, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuKernelGetAttribute
 *         cuGetProcAddress('cuKernelGetAttribute', &__cuKernelGetAttribute, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLibraryGetUnifiedFunction"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetUnifiedFunction), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 929, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":931
 *         cuGetProcAddress('cuLibraryGetUnifiedFunction', &__cuLibraryGetUnifiedFunction, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuKernelGetAttribute
 *         cuGetProcAddress('cuKernelGetAttribute', &__cuKernelGetAttribute, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuKernelSetAttribute
 *         cuGetProcAddress('cuKernelSetAttribute', &__cuKernelSetAttribute, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuKernelGetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuKernelGetAttribute), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 931, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":933
 *         cuGetProcAddress('cuKernelGetAttribute', &__cuKernelGetAttribute, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuKernelSetAttribute
 *         cuGetProcAddress('cuKernelSetAttribute', &__cuKernelSetAttribute, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuKernelSetCacheConfig
 *         cuGetProcAddress('cuKernelSetCacheConfig', &__cuKernelSetCacheConfig, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuKernelSetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuKernelSetAttribute), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 933, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":935
 *         cuGetProcAddress('cuKernelSetAttribute', &__cuKernelSetAttribute, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuKernelSetCacheConfig
 *         cuGetProcAddress('cuKernelSetCacheConfig', &__cuKernelSetCacheConfig, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemGetInfo_v2
 *         cuGetProcAddress('cuMemGetInfo', &__cuMemGetInfo_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuKernelSetCacheConfig"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuKernelSetCacheConfig), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 935, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":937
 *         cuGetProcAddress('cuKernelSetCacheConfig', &__cuKernelSetCacheConfig, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemGetInfo_v2
 *         cuGetProcAddress('cuMemGetInfo', &__cuMemGetInfo_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemAlloc_v2
 *         cuGetProcAddress('cuMemAlloc', &__cuMemAlloc_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemGetInfo"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetInfo_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 937, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":939
 *         cuGetProcAddress('cuMemGetInfo', &__cuMemGetInfo_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemAlloc_v2
 *         cuGetProcAddress('cuMemAlloc', &__cuMemAlloc_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemAllocPitch_v2
 *         cuGetProcAddress('cuMemAllocPitch', &__cuMemAllocPitch_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemAlloc"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAlloc_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 939, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":941
 *         cuGetProcAddress('cuMemAlloc', &__cuMemAlloc_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemAllocPitch_v2
 *         cuGetProcAddress('cuMemAllocPitch', &__cuMemAllocPitch_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemFree_v2
 *         cuGetProcAddress('cuMemFree', &__cuMemFree_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemAllocPitch"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocPitch_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 941, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":943
 *         cuGetProcAddress('cuMemAllocPitch', &__cuMemAllocPitch_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemFree_v2
 *         cuGetProcAddress('cuMemFree', &__cuMemFree_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemGetAddressRange_v2
 *         cuGetProcAddress('cuMemGetAddressRange', &__cuMemGetAddressRange_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemFree"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemFree_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 943, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":945
 *         cuGetProcAddress('cuMemFree', &__cuMemFree_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemGetAddressRange_v2
 *         cuGetProcAddress('cuMemGetAddressRange', &__cuMemGetAddressRange_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemAllocHost_v2
 *         cuGetProcAddress('cuMemAllocHost', &__cuMemAllocHost_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemGetAddressRange"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAddressRange_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 945, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":947
 *         cuGetProcAddress('cuMemGetAddressRange', &__cuMemGetAddressRange_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemAllocHost_v2
 *         cuGetProcAddress('cuMemAllocHost', &__cuMemAllocHost_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemFreeHost
 *         cuGetProcAddress('cuMemFreeHost', &__cuMemFreeHost, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemAllocHost"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocHost_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 947, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":949
 *         cuGetProcAddress('cuMemAllocHost', &__cuMemAllocHost_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemFreeHost
 *         cuGetProcAddress('cuMemFreeHost', &__cuMemFreeHost, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemHostAlloc
 *         cuGetProcAddress('cuMemHostAlloc', &__cuMemHostAlloc, 2020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemFreeHost"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemFreeHost), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 949, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":951
 *         cuGetProcAddress('cuMemFreeHost', &__cuMemFreeHost, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemHostAlloc
 *         cuGetProcAddress('cuMemHostAlloc', &__cuMemHostAlloc, 2020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemHostGetDevicePointer_v2
 *         cuGetProcAddress('cuMemHostGetDevicePointer', &__cuMemHostGetDevicePointer_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemHostAlloc"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostAlloc), 0x7E4, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 951, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":953
 *         cuGetProcAddress('cuMemHostAlloc', &__cuMemHostAlloc, 2020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemHostGetDevicePointer_v2
 *         cuGetProcAddress('cuMemHostGetDevicePointer', &__cuMemHostGetDevicePointer_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemHostGetFlags
 *         cuGetProcAddress('cuMemHostGetFlags', &__cuMemHostGetFlags, 2030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemHostGetDevicePointer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostGetDevicePointer_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 953, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":955
 *         cuGetProcAddress('cuMemHostGetDevicePointer', &__cuMemHostGetDevicePointer_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemHostGetFlags
 *         cuGetProcAddress('cuMemHostGetFlags', &__cuMemHostGetFlags, 2030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemAllocManaged
 *         cuGetProcAddress('cuMemAllocManaged', &__cuMemAllocManaged, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemHostGetFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostGetFlags), 0x7EE, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 955, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":957
 *         cuGetProcAddress('cuMemHostGetFlags', &__cuMemHostGetFlags, 2030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemAllocManaged
 *         cuGetProcAddress('cuMemAllocManaged', &__cuMemAllocManaged, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDeviceGetByPCIBusId
 *         cuGetProcAddress('cuDeviceGetByPCIBusId', &__cuDeviceGetByPCIBusId, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemAllocManaged"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocManaged), 0x1770, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 957, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":959
 *         cuGetProcAddress('cuMemAllocManaged', &__cuMemAllocManaged, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDeviceGetByPCIBusId
 *         cuGetProcAddress('cuDeviceGetByPCIBusId', &__cuDeviceGetByPCIBusId, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDeviceGetPCIBusId
 *         cuGetProcAddress('cuDeviceGetPCIBusId', &__cuDeviceGetPCIBusId, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetByPCIBusId"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetByPCIBusId), 0xFAA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 959, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":961
 *         cuGetProcAddress('cuDeviceGetByPCIBusId', &__cuDeviceGetByPCIBusId, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDeviceGetPCIBusId
 *         cuGetProcAddress('cuDeviceGetPCIBusId', &__cuDeviceGetPCIBusId, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuIpcGetEventHandle
 *         cuGetProcAddress('cuIpcGetEventHandle', &__cuIpcGetEventHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetPCIBusId"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetPCIBusId), 0xFAA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 961, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":963
 *         cuGetProcAddress('cuDeviceGetPCIBusId', &__cuDeviceGetPCIBusId, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuIpcGetEventHandle
 *         cuGetProcAddress('cuIpcGetEventHandle', &__cuIpcGetEventHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuIpcOpenEventHandle
 *         cuGetProcAddress('cuIpcOpenEventHandle', &__cuIpcOpenEventHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuIpcGetEventHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuIpcGetEventHandle), 0xFAA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 963, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":965
 *         cuGetProcAddress('cuIpcGetEventHandle', &__cuIpcGetEventHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuIpcOpenEventHandle
 *         cuGetProcAddress('cuIpcOpenEventHandle', &__cuIpcOpenEventHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuIpcGetMemHandle
 *         cuGetProcAddress('cuIpcGetMemHandle', &__cuIpcGetMemHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuIpcOpenEventHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuIpcOpenEventHandle), 0xFAA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 965, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":967
 *         cuGetProcAddress('cuIpcOpenEventHandle', &__cuIpcOpenEventHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuIpcGetMemHandle
 *         cuGetProcAddress('cuIpcGetMemHandle', &__cuIpcGetMemHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuIpcOpenMemHandle_v2
 *         cuGetProcAddress('cuIpcOpenMemHandle', &__cuIpcOpenMemHandle_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuIpcGetMemHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuIpcGetMemHandle), 0xFAA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 967, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":969
 *         cuGetProcAddress('cuIpcGetMemHandle', &__cuIpcGetMemHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuIpcOpenMemHandle_v2
 *         cuGetProcAddress('cuIpcOpenMemHandle', &__cuIpcOpenMemHandle_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuIpcCloseMemHandle
 *         cuGetProcAddress('cuIpcCloseMemHandle', &__cuIpcCloseMemHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuIpcOpenMemHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuIpcOpenMemHandle_v2), 0x2AF8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 969, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":971
 *         cuGetProcAddress('cuIpcOpenMemHandle', &__cuIpcOpenMemHandle_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuIpcCloseMemHandle
 *         cuGetProcAddress('cuIpcCloseMemHandle', &__cuIpcCloseMemHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemHostRegister_v2
 *         cuGetProcAddress('cuMemHostRegister', &__cuMemHostRegister_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuIpcCloseMemHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuIpcCloseMemHandle), 0xFAA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 971, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":973
 *         cuGetProcAddress('cuIpcCloseMemHandle', &__cuIpcCloseMemHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemHostRegister_v2
 *         cuGetProcAddress('cuMemHostRegister', &__cuMemHostRegister_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemHostUnregister
 *         cuGetProcAddress('cuMemHostUnregister', &__cuMemHostUnregister, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemHostRegister"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostRegister_v2), 0x17A2, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 973, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":975
 *         cuGetProcAddress('cuMemHostRegister', &__cuMemHostRegister_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemHostUnregister
 *         cuGetProcAddress('cuMemHostUnregister', &__cuMemHostUnregister, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuArrayCreate_v2
 *         cuGetProcAddress('cuArrayCreate', &__cuArrayCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemHostUnregister"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostUnregister), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 975, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":977
 *         cuGetProcAddress('cuMemHostUnregister', &__cuMemHostUnregister, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuArrayCreate_v2
 *         cuGetProcAddress('cuArrayCreate', &__cuArrayCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuArrayGetDescriptor_v2
 *         cuGetProcAddress('cuArrayGetDescriptor', &__cuArrayGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuArrayCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuArrayCreate_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 977, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":979
 *         cuGetProcAddress('cuArrayCreate', &__cuArrayCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuArrayGetDescriptor_v2
 *         cuGetProcAddress('cuArrayGetDescriptor', &__cuArrayGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuArrayGetSparseProperties
 *         cuGetProcAddress('cuArrayGetSparseProperties', &__cuArrayGetSparseProperties, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuArrayGetDescriptor"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetDescriptor_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 979, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":981
 *         cuGetProcAddress('cuArrayGetDescriptor', &__cuArrayGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuArrayGetSparseProperties
 *         cuGetProcAddress('cuArrayGetSparseProperties', &__cuArrayGetSparseProperties, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMipmappedArrayGetSparseProperties
 *         cuGetProcAddress('cuMipmappedArrayGetSparseProperties', &__cuMipmappedArrayGetSparseProperties, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuArrayGetSparseProperties"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetSparseProperties), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 981, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":983
 *         cuGetProcAddress('cuArrayGetSparseProperties', &__cuArrayGetSparseProperties, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMipmappedArrayGetSparseProperties
 *         cuGetProcAddress('cuMipmappedArrayGetSparseProperties', &__cuMipmappedArrayGetSparseProperties, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuArrayGetMemoryRequirements
 *         cuGetProcAddress('cuArrayGetMemoryRequirements', &__cuArrayGetMemoryRequirements, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMipmappedArrayGetSparseProperties"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetSparseProperties), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 983, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":985
 *         cuGetProcAddress('cuMipmappedArrayGetSparseProperties', &__cuMipmappedArrayGetSparseProperties, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuArrayGetMemoryRequirements
 *         cuGetProcAddress('cuArrayGetMemoryRequirements', &__cuArrayGetMemoryRequirements, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMipmappedArrayGetMemoryRequirements
 *         cuGetProcAddress('cuMipmappedArrayGetMemoryRequirements', &__cuMipmappedArrayGetMemoryRequirements, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuArrayGetMemoryRequirements"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetMemoryRequirements), 0x2B34, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 985, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":987
 *         cuGetProcAddress('cuArrayGetMemoryRequirements', &__cuArrayGetMemoryRequirements, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMipmappedArrayGetMemoryRequirements
 *         cuGetProcAddress('cuMipmappedArrayGetMemoryRequirements', &__cuMipmappedArrayGetMemoryRequirements, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuArrayGetPlane
 *         cuGetProcAddress('cuArrayGetPlane', &__cuArrayGetPlane, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMipmappedArrayGetMemoryRequirements"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetMemoryRequirements), 0x2B34, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 987, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":989
 *         cuGetProcAddress('cuMipmappedArrayGetMemoryRequirements', &__cuMipmappedArrayGetMemoryRequirements, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuArrayGetPlane
 *         cuGetProcAddress('cuArrayGetPlane', &__cuArrayGetPlane, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuArrayDestroy
 *         cuGetProcAddress('cuArrayDestroy', &__cuArrayDestroy, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuArrayGetPlane"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetPlane), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 989, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":991
 *         cuGetProcAddress('cuArrayGetPlane', &__cuArrayGetPlane, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuArrayDestroy
 *         cuGetProcAddress('cuArrayDestroy', &__cuArrayDestroy, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuArray3DCreate_v2
 *         cuGetProcAddress('cuArray3DCreate', &__cuArray3DCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuArrayDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuArrayDestroy), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 991, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":993
 *         cuGetProcAddress('cuArrayDestroy', &__cuArrayDestroy, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuArray3DCreate_v2
 *         cuGetProcAddress('cuArray3DCreate', &__cuArray3DCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuArray3DGetDescriptor_v2
 *         cuGetProcAddress('cuArray3DGetDescriptor', &__cuArray3DGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuArray3DCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuArray3DCreate_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 993, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":995
 *         cuGetProcAddress('cuArray3DCreate', &__cuArray3DCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuArray3DGetDescriptor_v2
 *         cuGetProcAddress('cuArray3DGetDescriptor', &__cuArray3DGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMipmappedArrayCreate
 *         cuGetProcAddress('cuMipmappedArrayCreate', &__cuMipmappedArrayCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuArray3DGetDescriptor"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuArray3DGetDescriptor_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 995, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":997
 *         cuGetProcAddress('cuArray3DGetDescriptor', &__cuArray3DGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMipmappedArrayCreate
 *         cuGetProcAddress('cuMipmappedArrayCreate', &__cuMipmappedArrayCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMipmappedArrayGetLevel
 *         cuGetProcAddress('cuMipmappedArrayGetLevel', &__cuMipmappedArrayGetLevel, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMipmappedArrayCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayCreate), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 997, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":999
 *         cuGetProcAddress('cuMipmappedArrayCreate', &__cuMipmappedArrayCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMipmappedArrayGetLevel
 *         cuGetProcAddress('cuMipmappedArrayGetLevel', &__cuMipmappedArrayGetLevel, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMipmappedArrayDestroy
 *         cuGetProcAddress('cuMipmappedArrayDestroy', &__cuMipmappedArrayDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMipmappedArrayGetLevel"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetLevel), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 999, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1001
 *         cuGetProcAddress('cuMipmappedArrayGetLevel', &__cuMipmappedArrayGetLevel, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMipmappedArrayDestroy
 *         cuGetProcAddress('cuMipmappedArrayDestroy', &__cuMipmappedArrayDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemGetHandleForAddressRange
 *         cuGetProcAddress('cuMemGetHandleForAddressRange', &__cuMemGetHandleForAddressRange, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMipmappedArrayDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayDestroy), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1001, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1003
 *         cuGetProcAddress('cuMipmappedArrayDestroy', &__cuMipmappedArrayDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemGetHandleForAddressRange
 *         cuGetProcAddress('cuMemGetHandleForAddressRange', &__cuMemGetHandleForAddressRange, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemAddressReserve
 *         cuGetProcAddress('cuMemAddressReserve', &__cuMemAddressReserve, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemGetHandleForAddressRange"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetHandleForAddressRange), 0x2B3E, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1003, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1005
 *         cuGetProcAddress('cuMemGetHandleForAddressRange', &__cuMemGetHandleForAddressRange, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemAddressReserve
 *         cuGetProcAddress('cuMemAddressReserve', &__cuMemAddressReserve, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemAddressFree
 *         cuGetProcAddress('cuMemAddressFree', &__cuMemAddressFree, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemAddressReserve"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAddressReserve), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1005, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1007
 *         cuGetProcAddress('cuMemAddressReserve', &__cuMemAddressReserve, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemAddressFree
 *         cuGetProcAddress('cuMemAddressFree', &__cuMemAddressFree, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemCreate
 *         cuGetProcAddress('cuMemCreate', &__cuMemCreate, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemAddressFree"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAddressFree), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1007, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1009
 *         cuGetProcAddress('cuMemAddressFree', &__cuMemAddressFree, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemCreate
 *         cuGetProcAddress('cuMemCreate', &__cuMemCreate, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemRelease
 *         cuGetProcAddress('cuMemRelease', &__cuMemRelease, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemCreate), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1009, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1011
 *         cuGetProcAddress('cuMemCreate', &__cuMemCreate, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemRelease
 *         cuGetProcAddress('cuMemRelease', &__cuMemRelease, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemMap
 *         cuGetProcAddress('cuMemMap', &__cuMemMap, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemRelease"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemRelease), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1011, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1013
 *         cuGetProcAddress('cuMemRelease', &__cuMemRelease, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemMap
 *         cuGetProcAddress('cuMemMap', &__cuMemMap, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemUnmap
 *         cuGetProcAddress('cuMemUnmap', &__cuMemUnmap, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemMap"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemMap), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1013, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1015
 *         cuGetProcAddress('cuMemMap', &__cuMemMap, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemUnmap
 *         cuGetProcAddress('cuMemUnmap', &__cuMemUnmap, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemSetAccess
 *         cuGetProcAddress('cuMemSetAccess', &__cuMemSetAccess, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemUnmap"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemUnmap), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1015, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1017
 *         cuGetProcAddress('cuMemUnmap', &__cuMemUnmap, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemSetAccess
 *         cuGetProcAddress('cuMemSetAccess', &__cuMemSetAccess, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemGetAccess
 *         cuGetProcAddress('cuMemGetAccess', &__cuMemGetAccess, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemSetAccess"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemSetAccess), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1017, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1019
 *         cuGetProcAddress('cuMemSetAccess', &__cuMemSetAccess, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemGetAccess
 *         cuGetProcAddress('cuMemGetAccess', &__cuMemGetAccess, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemExportToShareableHandle
 *         cuGetProcAddress('cuMemExportToShareableHandle', &__cuMemExportToShareableHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemGetAccess"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAccess), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1019, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1021
 *         cuGetProcAddress('cuMemGetAccess', &__cuMemGetAccess, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemExportToShareableHandle
 *         cuGetProcAddress('cuMemExportToShareableHandle', &__cuMemExportToShareableHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemImportFromShareableHandle
 *         cuGetProcAddress('cuMemImportFromShareableHandle', &__cuMemImportFromShareableHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemExportToShareableHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemExportToShareableHandle), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1021, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1023
 *         cuGetProcAddress('cuMemExportToShareableHandle', &__cuMemExportToShareableHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemImportFromShareableHandle
 *         cuGetProcAddress('cuMemImportFromShareableHandle', &__cuMemImportFromShareableHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemGetAllocationGranularity
 *         cuGetProcAddress('cuMemGetAllocationGranularity', &__cuMemGetAllocationGranularity, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemImportFromShareableHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemImportFromShareableHandle), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1023, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1025
 *         cuGetProcAddress('cuMemImportFromShareableHandle', &__cuMemImportFromShareableHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemGetAllocationGranularity
 *         cuGetProcAddress('cuMemGetAllocationGranularity', &__cuMemGetAllocationGranularity, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemGetAllocationPropertiesFromHandle
 *         cuGetProcAddress('cuMemGetAllocationPropertiesFromHandle', &__cuMemGetAllocationPropertiesFromHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemGetAllocationGranularity"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAllocationGranularity), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1025, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1027
 *         cuGetProcAddress('cuMemGetAllocationGranularity', &__cuMemGetAllocationGranularity, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemGetAllocationPropertiesFromHandle
 *         cuGetProcAddress('cuMemGetAllocationPropertiesFromHandle', &__cuMemGetAllocationPropertiesFromHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemRetainAllocationHandle
 *         cuGetProcAddress('cuMemRetainAllocationHandle', &__cuMemRetainAllocationHandle, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemGetAllocationPropertiesFromHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAllocationPropertiesFromHandle), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1027, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1029
 *         cuGetProcAddress('cuMemGetAllocationPropertiesFromHandle', &__cuMemGetAllocationPropertiesFromHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemRetainAllocationHandle
 *         cuGetProcAddress('cuMemRetainAllocationHandle', &__cuMemRetainAllocationHandle, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemPoolTrimTo
 *         cuGetProcAddress('cuMemPoolTrimTo', &__cuMemPoolTrimTo, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemRetainAllocationHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemRetainAllocationHandle), 0x2AF8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1029, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1031
 *         cuGetProcAddress('cuMemRetainAllocationHandle', &__cuMemRetainAllocationHandle, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemPoolTrimTo
 *         cuGetProcAddress('cuMemPoolTrimTo', &__cuMemPoolTrimTo, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemPoolSetAttribute
 *         cuGetProcAddress('cuMemPoolSetAttribute', &__cuMemPoolSetAttribute, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemPoolTrimTo"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolTrimTo), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1031, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1033
 *         cuGetProcAddress('cuMemPoolTrimTo', &__cuMemPoolTrimTo, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemPoolSetAttribute
 *         cuGetProcAddress('cuMemPoolSetAttribute', &__cuMemPoolSetAttribute, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemPoolGetAttribute
 *         cuGetProcAddress('cuMemPoolGetAttribute', &__cuMemPoolGetAttribute, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemPoolSetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolSetAttribute), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1033, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1035
 *         cuGetProcAddress('cuMemPoolSetAttribute', &__cuMemPoolSetAttribute, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemPoolGetAttribute
 *         cuGetProcAddress('cuMemPoolGetAttribute', &__cuMemPoolGetAttribute, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemPoolSetAccess
 *         cuGetProcAddress('cuMemPoolSetAccess', &__cuMemPoolSetAccess, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemPoolGetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolGetAttribute), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1035, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1037
 *         cuGetProcAddress('cuMemPoolGetAttribute', &__cuMemPoolGetAttribute, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemPoolSetAccess
 *         cuGetProcAddress('cuMemPoolSetAccess', &__cuMemPoolSetAccess, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemPoolGetAccess
 *         cuGetProcAddress('cuMemPoolGetAccess', &__cuMemPoolGetAccess, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemPoolSetAccess"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolSetAccess), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1037, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1039
 *         cuGetProcAddress('cuMemPoolSetAccess', &__cuMemPoolSetAccess, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemPoolGetAccess
 *         cuGetProcAddress('cuMemPoolGetAccess', &__cuMemPoolGetAccess, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemPoolCreate
 *         cuGetProcAddress('cuMemPoolCreate', &__cuMemPoolCreate, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemPoolGetAccess"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolGetAccess), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1039, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1041
 *         cuGetProcAddress('cuMemPoolGetAccess', &__cuMemPoolGetAccess, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemPoolCreate
 *         cuGetProcAddress('cuMemPoolCreate', &__cuMemPoolCreate, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemPoolDestroy
 *         cuGetProcAddress('cuMemPoolDestroy', &__cuMemPoolDestroy, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemPoolCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolCreate), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1041, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1043
 *         cuGetProcAddress('cuMemPoolCreate', &__cuMemPoolCreate, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemPoolDestroy
 *         cuGetProcAddress('cuMemPoolDestroy', &__cuMemPoolDestroy, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemPoolExportToShareableHandle
 *         cuGetProcAddress('cuMemPoolExportToShareableHandle', &__cuMemPoolExportToShareableHandle, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemPoolDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolDestroy), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1043, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1045
 *         cuGetProcAddress('cuMemPoolDestroy', &__cuMemPoolDestroy, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemPoolExportToShareableHandle
 *         cuGetProcAddress('cuMemPoolExportToShareableHandle', &__cuMemPoolExportToShareableHandle, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemPoolImportFromShareableHandle
 *         cuGetProcAddress('cuMemPoolImportFromShareableHandle', &__cuMemPoolImportFromShareableHandle, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemPoolExportToShareableHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolExportToShareableHandle), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1045, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1047
 *         cuGetProcAddress('cuMemPoolExportToShareableHandle', &__cuMemPoolExportToShareableHandle, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemPoolImportFromShareableHandle
 *         cuGetProcAddress('cuMemPoolImportFromShareableHandle', &__cuMemPoolImportFromShareableHandle, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemPoolExportPointer
 *         cuGetProcAddress('cuMemPoolExportPointer', &__cuMemPoolExportPointer, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemPoolImportFromShareableHandle"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolImportFromShareableHandle), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1047, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1049
 *         cuGetProcAddress('cuMemPoolImportFromShareableHandle', &__cuMemPoolImportFromShareableHandle, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemPoolExportPointer
 *         cuGetProcAddress('cuMemPoolExportPointer', &__cuMemPoolExportPointer, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemPoolImportPointer
 *         cuGetProcAddress('cuMemPoolImportPointer', &__cuMemPoolImportPointer, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemPoolExportPointer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolExportPointer), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1049, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1051
 *         cuGetProcAddress('cuMemPoolExportPointer', &__cuMemPoolExportPointer, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemPoolImportPointer
 *         cuGetProcAddress('cuMemPoolImportPointer', &__cuMemPoolImportPointer, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMulticastCreate
 *         cuGetProcAddress('cuMulticastCreate', &__cuMulticastCreate, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemPoolImportPointer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolImportPointer), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1051, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1053
 *         cuGetProcAddress('cuMemPoolImportPointer', &__cuMemPoolImportPointer, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMulticastCreate
 *         cuGetProcAddress('cuMulticastCreate', &__cuMulticastCreate, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMulticastAddDevice
 *         cuGetProcAddress('cuMulticastAddDevice', &__cuMulticastAddDevice, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMulticastCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMulticastCreate), 0x2EEA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1053, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1055
 *         cuGetProcAddress('cuMulticastCreate', &__cuMulticastCreate, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMulticastAddDevice
 *         cuGetProcAddress('cuMulticastAddDevice', &__cuMulticastAddDevice, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMulticastBindMem
 *         cuGetProcAddress('cuMulticastBindMem', &__cuMulticastBindMem, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMulticastAddDevice"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMulticastAddDevice), 0x2EEA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1055, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1057
 *         cuGetProcAddress('cuMulticastAddDevice', &__cuMulticastAddDevice, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMulticastBindMem
 *         cuGetProcAddress('cuMulticastBindMem', &__cuMulticastBindMem, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMulticastBindAddr
 *         cuGetProcAddress('cuMulticastBindAddr', &__cuMulticastBindAddr, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMulticastBindMem"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMulticastBindMem), 0x2EEA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1057, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1059
 *         cuGetProcAddress('cuMulticastBindMem', &__cuMulticastBindMem, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMulticastBindAddr
 *         cuGetProcAddress('cuMulticastBindAddr', &__cuMulticastBindAddr, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMulticastUnbind
 *         cuGetProcAddress('cuMulticastUnbind', &__cuMulticastUnbind, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMulticastBindAddr"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMulticastBindAddr), 0x2EEA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1059, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1061
 *         cuGetProcAddress('cuMulticastBindAddr', &__cuMulticastBindAddr, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMulticastUnbind
 *         cuGetProcAddress('cuMulticastUnbind', &__cuMulticastUnbind, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMulticastGetGranularity
 *         cuGetProcAddress('cuMulticastGetGranularity', &__cuMulticastGetGranularity, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMulticastUnbind"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMulticastUnbind), 0x2EEA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1061, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1063
 *         cuGetProcAddress('cuMulticastUnbind', &__cuMulticastUnbind, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMulticastGetGranularity
 *         cuGetProcAddress('cuMulticastGetGranularity', &__cuMulticastGetGranularity, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuPointerGetAttribute
 *         cuGetProcAddress('cuPointerGetAttribute', &__cuPointerGetAttribute, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMulticastGetGranularity"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMulticastGetGranularity), 0x2EEA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1063, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1065
 *         cuGetProcAddress('cuMulticastGetGranularity', &__cuMulticastGetGranularity, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuPointerGetAttribute
 *         cuGetProcAddress('cuPointerGetAttribute', &__cuPointerGetAttribute, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemAdvise
 *         cuGetProcAddress('cuMemAdvise', &__cuMemAdvise, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuPointerGetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuPointerGetAttribute), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1065, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1067
 *         cuGetProcAddress('cuPointerGetAttribute', &__cuPointerGetAttribute, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemAdvise
 *         cuGetProcAddress('cuMemAdvise', &__cuMemAdvise, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemAdvise_v2
 *         cuGetProcAddress('cuMemAdvise', &__cuMemAdvise_v2, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemAdvise"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAdvise), 0x1F40, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1067, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1069
 *         cuGetProcAddress('cuMemAdvise', &__cuMemAdvise, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemAdvise_v2
 *         cuGetProcAddress('cuMemAdvise', &__cuMemAdvise_v2, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemRangeGetAttribute
 *         cuGetProcAddress('cuMemRangeGetAttribute', &__cuMemRangeGetAttribute, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemAdvise"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemAdvise_v2), 0x2EF4, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1069, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1071
 *         cuGetProcAddress('cuMemAdvise', &__cuMemAdvise_v2, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemRangeGetAttribute
 *         cuGetProcAddress('cuMemRangeGetAttribute', &__cuMemRangeGetAttribute, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuMemRangeGetAttributes
 *         cuGetProcAddress('cuMemRangeGetAttributes', &__cuMemRangeGetAttributes, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemRangeGetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemRangeGetAttribute), 0x1F40, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1071, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1073
 *         cuGetProcAddress('cuMemRangeGetAttribute', &__cuMemRangeGetAttribute, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuMemRangeGetAttributes
 *         cuGetProcAddress('cuMemRangeGetAttributes', &__cuMemRangeGetAttributes, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuPointerSetAttribute
 *         cuGetProcAddress('cuPointerSetAttribute', &__cuPointerSetAttribute, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemRangeGetAttributes"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemRangeGetAttributes), 0x1F40, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1073, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1075
 *         cuGetProcAddress('cuMemRangeGetAttributes', &__cuMemRangeGetAttributes, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuPointerSetAttribute
 *         cuGetProcAddress('cuPointerSetAttribute', &__cuPointerSetAttribute, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuPointerGetAttributes
 *         cuGetProcAddress('cuPointerGetAttributes', &__cuPointerGetAttributes, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuPointerSetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuPointerSetAttribute), 0x1770, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1075, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1077
 *         cuGetProcAddress('cuPointerSetAttribute', &__cuPointerSetAttribute, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuPointerGetAttributes
 *         cuGetProcAddress('cuPointerGetAttributes', &__cuPointerGetAttributes, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuStreamCreate
 *         cuGetProcAddress('cuStreamCreate', &__cuStreamCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuPointerGetAttributes"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuPointerGetAttributes), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1077, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1079
 *         cuGetProcAddress('cuPointerGetAttributes', &__cuPointerGetAttributes, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuStreamCreate
 *         cuGetProcAddress('cuStreamCreate', &__cuStreamCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuStreamCreateWithPriority
 *         cuGetProcAddress('cuStreamCreateWithPriority', &__cuStreamCreateWithPriority, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamCreate), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1079, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1081
 *         cuGetProcAddress('cuStreamCreate', &__cuStreamCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuStreamCreateWithPriority
 *         cuGetProcAddress('cuStreamCreateWithPriority', &__cuStreamCreateWithPriority, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuThreadExchangeStreamCaptureMode
 *         cuGetProcAddress('cuThreadExchangeStreamCaptureMode', &__cuThreadExchangeStreamCaptureMode, 10010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamCreateWithPriority"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamCreateWithPriority), 0x13BA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1081, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1083
 *         cuGetProcAddress('cuStreamCreateWithPriority', &__cuStreamCreateWithPriority, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuThreadExchangeStreamCaptureMode
 *         cuGetProcAddress('cuThreadExchangeStreamCaptureMode', &__cuThreadExchangeStreamCaptureMode, 10010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuStreamDestroy_v2
 *         cuGetProcAddress('cuStreamDestroy', &__cuStreamDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuThreadExchangeStreamCaptureMode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuThreadExchangeStreamCaptureMode), 0x271A, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1083, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1085
 *         cuGetProcAddress('cuThreadExchangeStreamCaptureMode', &__cuThreadExchangeStreamCaptureMode, 10010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuStreamDestroy_v2
 *         cuGetProcAddress('cuStreamDestroy', &__cuStreamDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuEventCreate
 *         cuGetProcAddress('cuEventCreate', &__cuEventCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamDestroy_v2), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1085, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1087
 *         cuGetProcAddress('cuStreamDestroy', &__cuStreamDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuEventCreate
 *         cuGetProcAddress('cuEventCreate', &__cuEventCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuEventQuery
 *         cuGetProcAddress('cuEventQuery', &__cuEventQuery, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEventCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEventCreate), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1087, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1089
 *         cuGetProcAddress('cuEventCreate', &__cuEventCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuEventQuery
 *         cuGetProcAddress('cuEventQuery', &__cuEventQuery, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuEventSynchronize
 *         cuGetProcAddress('cuEventSynchronize', &__cuEventSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEventQuery"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEventQuery), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1089, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1091
 *         cuGetProcAddress('cuEventQuery', &__cuEventQuery, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuEventSynchronize
 *         cuGetProcAddress('cuEventSynchronize', &__cuEventSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuEventDestroy_v2
 *         cuGetProcAddress('cuEventDestroy', &__cuEventDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEventSynchronize"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEventSynchronize), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1091, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1093
 *         cuGetProcAddress('cuEventSynchronize', &__cuEventSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuEventDestroy_v2
 *         cuGetProcAddress('cuEventDestroy', &__cuEventDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuEventElapsedTime
 *         cuGetProcAddress('cuEventElapsedTime', &__cuEventElapsedTime, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEventDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEventDestroy_v2), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1093, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1095
 *         cuGetProcAddress('cuEventDestroy', &__cuEventDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuEventElapsedTime
 *         cuGetProcAddress('cuEventElapsedTime', &__cuEventElapsedTime, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuImportExternalMemory
 *         cuGetProcAddress('cuImportExternalMemory', &__cuImportExternalMemory, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEventElapsedTime"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEventElapsedTime), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1095, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1097
 *         cuGetProcAddress('cuEventElapsedTime', &__cuEventElapsedTime, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuImportExternalMemory
 *         cuGetProcAddress('cuImportExternalMemory', &__cuImportExternalMemory, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuExternalMemoryGetMappedBuffer
 *         cuGetProcAddress('cuExternalMemoryGetMappedBuffer', &__cuExternalMemoryGetMappedBuffer, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuImportExternalMemory"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuImportExternalMemory), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1097, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1099
 *         cuGetProcAddress('cuImportExternalMemory', &__cuImportExternalMemory, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuExternalMemoryGetMappedBuffer
 *         cuGetProcAddress('cuExternalMemoryGetMappedBuffer', &__cuExternalMemoryGetMappedBuffer, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuExternalMemoryGetMappedMipmappedArray
 *         cuGetProcAddress('cuExternalMemoryGetMappedMipmappedArray', &__cuExternalMemoryGetMappedMipmappedArray, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuExternalMemoryGetMappedBuffer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuExternalMemoryGetMappedBuffer), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1099, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1101
 *         cuGetProcAddress('cuExternalMemoryGetMappedBuffer', &__cuExternalMemoryGetMappedBuffer, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuExternalMemoryGetMappedMipmappedArray
 *         cuGetProcAddress('cuExternalMemoryGetMappedMipmappedArray', &__cuExternalMemoryGetMappedMipmappedArray, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDestroyExternalMemory
 *         cuGetProcAddress('cuDestroyExternalMemory', &__cuDestroyExternalMemory, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuExternalMemoryGetMappedMipmappedArray"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuExternalMemoryGetMappedMipmappedArray), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1101, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1103
 *         cuGetProcAddress('cuExternalMemoryGetMappedMipmappedArray', &__cuExternalMemoryGetMappedMipmappedArray, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDestroyExternalMemory
 *         cuGetProcAddress('cuDestroyExternalMemory', &__cuDestroyExternalMemory, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuImportExternalSemaphore
 *         cuGetProcAddress('cuImportExternalSemaphore', &__cuImportExternalSemaphore, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDestroyExternalMemory"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDestroyExternalMemory), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1103, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1105
 *         cuGetProcAddress('cuDestroyExternalMemory', &__cuDestroyExternalMemory, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuImportExternalSemaphore
 *         cuGetProcAddress('cuImportExternalSemaphore', &__cuImportExternalSemaphore, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDestroyExternalSemaphore
 *         cuGetProcAddress('cuDestroyExternalSemaphore', &__cuDestroyExternalSemaphore, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuImportExternalSemaphore"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuImportExternalSemaphore), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1105, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1107
 *         cuGetProcAddress('cuImportExternalSemaphore', &__cuImportExternalSemaphore, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDestroyExternalSemaphore
 *         cuGetProcAddress('cuDestroyExternalSemaphore', &__cuDestroyExternalSemaphore, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuFuncGetAttribute
 *         cuGetProcAddress('cuFuncGetAttribute', &__cuFuncGetAttribute, 2020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDestroyExternalSemaphore"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDestroyExternalSemaphore), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1107, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1109
 *         cuGetProcAddress('cuDestroyExternalSemaphore', &__cuDestroyExternalSemaphore, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuFuncGetAttribute
 *         cuGetProcAddress('cuFuncGetAttribute', &__cuFuncGetAttribute, 2020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuFuncSetAttribute
 *         cuGetProcAddress('cuFuncSetAttribute', &__cuFuncSetAttribute, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuFuncGetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuFuncGetAttribute), 0x7E4, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1109, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1111
 *         cuGetProcAddress('cuFuncGetAttribute', &__cuFuncGetAttribute, 2020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuFuncSetAttribute
 *         cuGetProcAddress('cuFuncSetAttribute', &__cuFuncSetAttribute, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuFuncSetCacheConfig
 *         cuGetProcAddress('cuFuncSetCacheConfig', &__cuFuncSetCacheConfig, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuFuncSetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetAttribute), 0x2328, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1111, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1113
 *         cuGetProcAddress('cuFuncSetAttribute', &__cuFuncSetAttribute, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuFuncSetCacheConfig
 *         cuGetProcAddress('cuFuncSetCacheConfig', &__cuFuncSetCacheConfig, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuFuncSetSharedMemConfig
 *         cuGetProcAddress('cuFuncSetSharedMemConfig', &__cuFuncSetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuFuncSetCacheConfig"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetCacheConfig), 0xBB8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1113, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1115
 *         cuGetProcAddress('cuFuncSetCacheConfig', &__cuFuncSetCacheConfig, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuFuncSetSharedMemConfig
 *         cuGetProcAddress('cuFuncSetSharedMemConfig', &__cuFuncSetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuFuncGetModule
 *         cuGetProcAddress('cuFuncGetModule', &__cuFuncGetModule, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuFuncSetSharedMemConfig"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetSharedMemConfig), 0xFB4, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1115, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1117
 *         cuGetProcAddress('cuFuncSetSharedMemConfig', &__cuFuncSetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuFuncGetModule
 *         cuGetProcAddress('cuFuncGetModule', &__cuFuncGetModule, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuLaunchCooperativeKernelMultiDevice
 *         cuGetProcAddress('cuLaunchCooperativeKernelMultiDevice', &__cuLaunchCooperativeKernelMultiDevice, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuFuncGetModule"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuFuncGetModule), 0x2AF8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1117, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1119
 *         cuGetProcAddress('cuFuncGetModule', &__cuFuncGetModule, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuLaunchCooperativeKernelMultiDevice
 *         cuGetProcAddress('cuLaunchCooperativeKernelMultiDevice', &__cuLaunchCooperativeKernelMultiDevice, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuFuncSetBlockShape
 *         cuGetProcAddress('cuFuncSetBlockShape', &__cuFuncSetBlockShape, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLaunchCooperativeKernelMultiDevice"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchCooperativeKernelMultiDevice), 0x2328, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1119, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1121
 *         cuGetProcAddress('cuLaunchCooperativeKernelMultiDevice', &__cuLaunchCooperativeKernelMultiDevice, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuFuncSetBlockShape
 *         cuGetProcAddress('cuFuncSetBlockShape', &__cuFuncSetBlockShape, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuFuncSetSharedSize
 *         cuGetProcAddress('cuFuncSetSharedSize', &__cuFuncSetSharedSize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuFuncSetBlockShape"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetBlockShape), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1121, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1123
 *         cuGetProcAddress('cuFuncSetBlockShape', &__cuFuncSetBlockShape, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuFuncSetSharedSize
 *         cuGetProcAddress('cuFuncSetSharedSize', &__cuFuncSetSharedSize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuParamSetSize
 *         cuGetProcAddress('cuParamSetSize', &__cuParamSetSize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuFuncSetSharedSize"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetSharedSize), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1123, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1125
 *         cuGetProcAddress('cuFuncSetSharedSize', &__cuFuncSetSharedSize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuParamSetSize
 *         cuGetProcAddress('cuParamSetSize', &__cuParamSetSize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuParamSeti
 *         cuGetProcAddress('cuParamSeti', &__cuParamSeti, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuParamSetSize"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuParamSetSize), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1125, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1127
 *         cuGetProcAddress('cuParamSetSize', &__cuParamSetSize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuParamSeti
 *         cuGetProcAddress('cuParamSeti', &__cuParamSeti, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuParamSetf
 *         cuGetProcAddress('cuParamSetf', &__cuParamSetf, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuParamSeti"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuParamSeti), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1127, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1129
 *         cuGetProcAddress('cuParamSeti', &__cuParamSeti, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuParamSetf
 *         cuGetProcAddress('cuParamSetf', &__cuParamSetf, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuParamSetv
 *         cuGetProcAddress('cuParamSetv', &__cuParamSetv, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuParamSetf"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuParamSetf), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1129, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1131
 *         cuGetProcAddress('cuParamSetf', &__cuParamSetf, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuParamSetv
 *         cuGetProcAddress('cuParamSetv', &__cuParamSetv, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuLaunch
 *         cuGetProcAddress('cuLaunch', &__cuLaunch, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuParamSetv"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuParamSetv), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1131, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1133
 *         cuGetProcAddress('cuParamSetv', &__cuParamSetv, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuLaunch
 *         cuGetProcAddress('cuLaunch', &__cuLaunch, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuLaunchGrid
 *         cuGetProcAddress('cuLaunchGrid', &__cuLaunchGrid, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLaunch"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLaunch), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1133, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1135
 *         cuGetProcAddress('cuLaunch', &__cuLaunch, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuLaunchGrid
 *         cuGetProcAddress('cuLaunchGrid', &__cuLaunchGrid, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuLaunchGridAsync
 *         cuGetProcAddress('cuLaunchGridAsync', &__cuLaunchGridAsync, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLaunchGrid"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchGrid), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1135, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1137
 *         cuGetProcAddress('cuLaunchGrid', &__cuLaunchGrid, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuLaunchGridAsync
 *         cuGetProcAddress('cuLaunchGridAsync', &__cuLaunchGridAsync, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuParamSetTexRef
 *         cuGetProcAddress('cuParamSetTexRef', &__cuParamSetTexRef, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuLaunchGridAsync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchGridAsync), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1137, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1139
 *         cuGetProcAddress('cuLaunchGridAsync', &__cuLaunchGridAsync, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuParamSetTexRef
 *         cuGetProcAddress('cuParamSetTexRef', &__cuParamSetTexRef, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphCreate
 *         cuGetProcAddress('cuGraphCreate', &__cuGraphCreate, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuParamSetTexRef"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuParamSetTexRef), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1139, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1141
 *         cuGetProcAddress('cuParamSetTexRef', &__cuParamSetTexRef, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphCreate
 *         cuGetProcAddress('cuGraphCreate', &__cuGraphCreate, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphAddKernelNode_v2
 *         cuGetProcAddress('cuGraphAddKernelNode', &__cuGraphAddKernelNode_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphCreate), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1141, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1143
 *         cuGetProcAddress('cuGraphCreate', &__cuGraphCreate, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphAddKernelNode_v2
 *         cuGetProcAddress('cuGraphAddKernelNode', &__cuGraphAddKernelNode_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphKernelNodeGetParams_v2
 *         cuGetProcAddress('cuGraphKernelNodeGetParams', &__cuGraphKernelNodeGetParams_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphAddKernelNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddKernelNode_v2), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1143, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1145
 *         cuGetProcAddress('cuGraphAddKernelNode', &__cuGraphAddKernelNode_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphKernelNodeGetParams_v2
 *         cuGetProcAddress('cuGraphKernelNodeGetParams', &__cuGraphKernelNodeGetParams_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphKernelNodeSetParams_v2
 *         cuGetProcAddress('cuGraphKernelNodeSetParams', &__cuGraphKernelNodeSetParams_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphKernelNodeGetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeGetParams_v2), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1145, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1147
 *         cuGetProcAddress('cuGraphKernelNodeGetParams', &__cuGraphKernelNodeGetParams_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphKernelNodeSetParams_v2
 *         cuGetProcAddress('cuGraphKernelNodeSetParams', &__cuGraphKernelNodeSetParams_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphAddMemcpyNode
 *         cuGetProcAddress('cuGraphAddMemcpyNode', &__cuGraphAddMemcpyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphKernelNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeSetParams_v2), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1147, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1149
 *         cuGetProcAddress('cuGraphKernelNodeSetParams', &__cuGraphKernelNodeSetParams_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphAddMemcpyNode
 *         cuGetProcAddress('cuGraphAddMemcpyNode', &__cuGraphAddMemcpyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphMemcpyNodeGetParams
 *         cuGetProcAddress('cuGraphMemcpyNodeGetParams', &__cuGraphMemcpyNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphAddMemcpyNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemcpyNode), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1149, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1151
 *         cuGetProcAddress('cuGraphAddMemcpyNode', &__cuGraphAddMemcpyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphMemcpyNodeGetParams
 *         cuGetProcAddress('cuGraphMemcpyNodeGetParams', &__cuGraphMemcpyNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphMemcpyNodeSetParams
 *         cuGetProcAddress('cuGraphMemcpyNodeSetParams', &__cuGraphMemcpyNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphMemcpyNodeGetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemcpyNodeGetParams), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1151, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1153
 *         cuGetProcAddress('cuGraphMemcpyNodeGetParams', &__cuGraphMemcpyNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphMemcpyNodeSetParams
 *         cuGetProcAddress('cuGraphMemcpyNodeSetParams', &__cuGraphMemcpyNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphAddMemsetNode
 *         cuGetProcAddress('cuGraphAddMemsetNode', &__cuGraphAddMemsetNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphMemcpyNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemcpyNodeSetParams), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1153, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1155
 *         cuGetProcAddress('cuGraphMemcpyNodeSetParams', &__cuGraphMemcpyNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphAddMemsetNode
 *         cuGetProcAddress('cuGraphAddMemsetNode', &__cuGraphAddMemsetNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphMemsetNodeGetParams
 *         cuGetProcAddress('cuGraphMemsetNodeGetParams', &__cuGraphMemsetNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphAddMemsetNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemsetNode), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1155, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1157
 *         cuGetProcAddress('cuGraphAddMemsetNode', &__cuGraphAddMemsetNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphMemsetNodeGetParams
 *         cuGetProcAddress('cuGraphMemsetNodeGetParams', &__cuGraphMemsetNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphMemsetNodeSetParams
 *         cuGetProcAddress('cuGraphMemsetNodeSetParams', &__cuGraphMemsetNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphMemsetNodeGetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemsetNodeGetParams), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1157, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1159
 *         cuGetProcAddress('cuGraphMemsetNodeGetParams', &__cuGraphMemsetNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphMemsetNodeSetParams
 *         cuGetProcAddress('cuGraphMemsetNodeSetParams', &__cuGraphMemsetNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphAddHostNode
 *         cuGetProcAddress('cuGraphAddHostNode', &__cuGraphAddHostNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphMemsetNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemsetNodeSetParams), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1159, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1161
 *         cuGetProcAddress('cuGraphMemsetNodeSetParams', &__cuGraphMemsetNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphAddHostNode
 *         cuGetProcAddress('cuGraphAddHostNode', &__cuGraphAddHostNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphHostNodeGetParams
 *         cuGetProcAddress('cuGraphHostNodeGetParams', &__cuGraphHostNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphAddHostNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddHostNode), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1161, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1163
 *         cuGetProcAddress('cuGraphAddHostNode', &__cuGraphAddHostNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphHostNodeGetParams
 *         cuGetProcAddress('cuGraphHostNodeGetParams', &__cuGraphHostNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphHostNodeSetParams
 *         cuGetProcAddress('cuGraphHostNodeSetParams', &__cuGraphHostNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphHostNodeGetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphHostNodeGetParams), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1163, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1165
 *         cuGetProcAddress('cuGraphHostNodeGetParams', &__cuGraphHostNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphHostNodeSetParams
 *         cuGetProcAddress('cuGraphHostNodeSetParams', &__cuGraphHostNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphAddChildGraphNode
 *         cuGetProcAddress('cuGraphAddChildGraphNode', &__cuGraphAddChildGraphNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphHostNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphHostNodeSetParams), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1165, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1167
 *         cuGetProcAddress('cuGraphHostNodeSetParams', &__cuGraphHostNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphAddChildGraphNode
 *         cuGetProcAddress('cuGraphAddChildGraphNode', &__cuGraphAddChildGraphNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphChildGraphNodeGetGraph
 *         cuGetProcAddress('cuGraphChildGraphNodeGetGraph', &__cuGraphChildGraphNodeGetGraph, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphAddChildGraphNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddChildGraphNode), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1167, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1169
 *         cuGetProcAddress('cuGraphAddChildGraphNode', &__cuGraphAddChildGraphNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphChildGraphNodeGetGraph
 *         cuGetProcAddress('cuGraphChildGraphNodeGetGraph', &__cuGraphChildGraphNodeGetGraph, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphAddEmptyNode
 *         cuGetProcAddress('cuGraphAddEmptyNode', &__cuGraphAddEmptyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphChildGraphNodeGetGraph"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphChildGraphNodeGetGraph), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1169, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1171
 *         cuGetProcAddress('cuGraphChildGraphNodeGetGraph', &__cuGraphChildGraphNodeGetGraph, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphAddEmptyNode
 *         cuGetProcAddress('cuGraphAddEmptyNode', &__cuGraphAddEmptyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphAddEventRecordNode
 *         cuGetProcAddress('cuGraphAddEventRecordNode', &__cuGraphAddEventRecordNode, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphAddEmptyNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddEmptyNode), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1171, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1173
 *         cuGetProcAddress('cuGraphAddEmptyNode', &__cuGraphAddEmptyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphAddEventRecordNode
 *         cuGetProcAddress('cuGraphAddEventRecordNode', &__cuGraphAddEventRecordNode, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphEventRecordNodeGetEvent
 *         cuGetProcAddress('cuGraphEventRecordNodeGetEvent', &__cuGraphEventRecordNodeGetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphAddEventRecordNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddEventRecordNode), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1173, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1175
 *         cuGetProcAddress('cuGraphAddEventRecordNode', &__cuGraphAddEventRecordNode, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphEventRecordNodeGetEvent
 *         cuGetProcAddress('cuGraphEventRecordNodeGetEvent', &__cuGraphEventRecordNodeGetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphEventRecordNodeSetEvent
 *         cuGetProcAddress('cuGraphEventRecordNodeSetEvent', &__cuGraphEventRecordNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphEventRecordNodeGetEvent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventRecordNodeGetEvent), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1175, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1177
 *         cuGetProcAddress('cuGraphEventRecordNodeGetEvent', &__cuGraphEventRecordNodeGetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphEventRecordNodeSetEvent
 *         cuGetProcAddress('cuGraphEventRecordNodeSetEvent', &__cuGraphEventRecordNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphAddEventWaitNode
 *         cuGetProcAddress('cuGraphAddEventWaitNode', &__cuGraphAddEventWaitNode, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphEventRecordNodeSetEvent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventRecordNodeSetEvent), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1177, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1179
 *         cuGetProcAddress('cuGraphEventRecordNodeSetEvent', &__cuGraphEventRecordNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphAddEventWaitNode
 *         cuGetProcAddress('cuGraphAddEventWaitNode', &__cuGraphAddEventWaitNode, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphEventWaitNodeGetEvent
 *         cuGetProcAddress('cuGraphEventWaitNodeGetEvent', &__cuGraphEventWaitNodeGetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphAddEventWaitNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddEventWaitNode), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1179, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1181
 *         cuGetProcAddress('cuGraphAddEventWaitNode', &__cuGraphAddEventWaitNode, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphEventWaitNodeGetEvent
 *         cuGetProcAddress('cuGraphEventWaitNodeGetEvent', &__cuGraphEventWaitNodeGetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphEventWaitNodeSetEvent
 *         cuGetProcAddress('cuGraphEventWaitNodeSetEvent', &__cuGraphEventWaitNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphEventWaitNodeGetEvent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventWaitNodeGetEvent), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1181, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1183
 *         cuGetProcAddress('cuGraphEventWaitNodeGetEvent', &__cuGraphEventWaitNodeGetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphEventWaitNodeSetEvent
 *         cuGetProcAddress('cuGraphEventWaitNodeSetEvent', &__cuGraphEventWaitNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphAddExternalSemaphoresSignalNode
 *         cuGetProcAddress('cuGraphAddExternalSemaphoresSignalNode', &__cuGraphAddExternalSemaphoresSignalNode, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphEventWaitNodeSetEvent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventWaitNodeSetEvent), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1183, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1185
 *         cuGetProcAddress('cuGraphEventWaitNodeSetEvent', &__cuGraphEventWaitNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphAddExternalSemaphoresSignalNode
 *         cuGetProcAddress('cuGraphAddExternalSemaphoresSignalNode', &__cuGraphAddExternalSemaphoresSignalNode, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphExternalSemaphoresSignalNodeGetParams
 *         cuGetProcAddress('cuGraphExternalSemaphoresSignalNodeGetParams', &__cuGraphExternalSemaphoresSignalNodeGetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphAddExternalSemaphoresSignalNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddExternalSemaphoresSignalNode), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1185, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1187
 *         cuGetProcAddress('cuGraphAddExternalSemaphoresSignalNode', &__cuGraphAddExternalSemaphoresSignalNode, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphExternalSemaphoresSignalNodeGetParams
 *         cuGetProcAddress('cuGraphExternalSemaphoresSignalNodeGetParams', &__cuGraphExternalSemaphoresSignalNodeGetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphExternalSemaphoresSignalNodeSetParams
 *         cuGetProcAddress('cuGraphExternalSemaphoresSignalNodeSetParams', &__cuGraphExternalSemaphoresSignalNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExternalSemaphoresSignalNodeGetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresSignalNodeGetParams), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1187, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1189
 *         cuGetProcAddress('cuGraphExternalSemaphoresSignalNodeGetParams', &__cuGraphExternalSemaphoresSignalNodeGetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphExternalSemaphoresSignalNodeSetParams
 *         cuGetProcAddress('cuGraphExternalSemaphoresSignalNodeSetParams', &__cuGraphExternalSemaphoresSignalNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphAddExternalSemaphoresWaitNode
 *         cuGetProcAddress('cuGraphAddExternalSemaphoresWaitNode', &__cuGraphAddExternalSemaphoresWaitNode, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExternalSemaphoresSignalNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresSignalNodeSetParams), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1189, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1191
 *         cuGetProcAddress('cuGraphExternalSemaphoresSignalNodeSetParams', &__cuGraphExternalSemaphoresSignalNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphAddExternalSemaphoresWaitNode
 *         cuGetProcAddress('cuGraphAddExternalSemaphoresWaitNode', &__cuGraphAddExternalSemaphoresWaitNode, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphExternalSemaphoresWaitNodeGetParams
 *         cuGetProcAddress('cuGraphExternalSemaphoresWaitNodeGetParams', &__cuGraphExternalSemaphoresWaitNodeGetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphAddExternalSemaphoresWaitNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddExternalSemaphoresWaitNode), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1191, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1193
 *         cuGetProcAddress('cuGraphAddExternalSemaphoresWaitNode', &__cuGraphAddExternalSemaphoresWaitNode, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphExternalSemaphoresWaitNodeGetParams
 *         cuGetProcAddress('cuGraphExternalSemaphoresWaitNodeGetParams', &__cuGraphExternalSemaphoresWaitNodeGetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphExternalSemaphoresWaitNodeSetParams
 *         cuGetProcAddress('cuGraphExternalSemaphoresWaitNodeSetParams', &__cuGraphExternalSemaphoresWaitNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExternalSemaphoresWaitNodeGetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresWaitNodeGetParams), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1193, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1195
 *         cuGetProcAddress('cuGraphExternalSemaphoresWaitNodeGetParams', &__cuGraphExternalSemaphoresWaitNodeGetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphExternalSemaphoresWaitNodeSetParams
 *         cuGetProcAddress('cuGraphExternalSemaphoresWaitNodeSetParams', &__cuGraphExternalSemaphoresWaitNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphAddBatchMemOpNode
 *         cuGetProcAddress('cuGraphAddBatchMemOpNode', &__cuGraphAddBatchMemOpNode, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExternalSemaphoresWaitNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresWaitNodeSetParams), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1195, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1197
 *         cuGetProcAddress('cuGraphExternalSemaphoresWaitNodeSetParams', &__cuGraphExternalSemaphoresWaitNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphAddBatchMemOpNode
 *         cuGetProcAddress('cuGraphAddBatchMemOpNode', &__cuGraphAddBatchMemOpNode, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphBatchMemOpNodeGetParams
 *         cuGetProcAddress('cuGraphBatchMemOpNodeGetParams', &__cuGraphBatchMemOpNodeGetParams, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphAddBatchMemOpNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddBatchMemOpNode), 0x2B3E, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1197, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1199
 *         cuGetProcAddress('cuGraphAddBatchMemOpNode', &__cuGraphAddBatchMemOpNode, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphBatchMemOpNodeGetParams
 *         cuGetProcAddress('cuGraphBatchMemOpNodeGetParams', &__cuGraphBatchMemOpNodeGetParams, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphBatchMemOpNodeSetParams
 *         cuGetProcAddress('cuGraphBatchMemOpNodeSetParams', &__cuGraphBatchMemOpNodeSetParams, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphBatchMemOpNodeGetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphBatchMemOpNodeGetParams), 0x2B3E, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1199, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1201
 *         cuGetProcAddress('cuGraphBatchMemOpNodeGetParams', &__cuGraphBatchMemOpNodeGetParams, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphBatchMemOpNodeSetParams
 *         cuGetProcAddress('cuGraphBatchMemOpNodeSetParams', &__cuGraphBatchMemOpNodeSetParams, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphExecBatchMemOpNodeSetParams
 *         cuGetProcAddress('cuGraphExecBatchMemOpNodeSetParams', &__cuGraphExecBatchMemOpNodeSetParams, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphBatchMemOpNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphBatchMemOpNodeSetParams), 0x2B3E, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1201, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1203
 *         cuGetProcAddress('cuGraphBatchMemOpNodeSetParams', &__cuGraphBatchMemOpNodeSetParams, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphExecBatchMemOpNodeSetParams
 *         cuGetProcAddress('cuGraphExecBatchMemOpNodeSetParams', &__cuGraphExecBatchMemOpNodeSetParams, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphAddMemAllocNode
 *         cuGetProcAddress('cuGraphAddMemAllocNode', &__cuGraphAddMemAllocNode, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExecBatchMemOpNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecBatchMemOpNodeSetParams), 0x2B3E, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1203, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1205
 *         cuGetProcAddress('cuGraphExecBatchMemOpNodeSetParams', &__cuGraphExecBatchMemOpNodeSetParams, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphAddMemAllocNode
 *         cuGetProcAddress('cuGraphAddMemAllocNode', &__cuGraphAddMemAllocNode, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphMemAllocNodeGetParams
 *         cuGetProcAddress('cuGraphMemAllocNodeGetParams', &__cuGraphMemAllocNodeGetParams, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphAddMemAllocNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemAllocNode), 0x2B20, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1205, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1207
 *         cuGetProcAddress('cuGraphAddMemAllocNode', &__cuGraphAddMemAllocNode, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphMemAllocNodeGetParams
 *         cuGetProcAddress('cuGraphMemAllocNodeGetParams', &__cuGraphMemAllocNodeGetParams, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphAddMemFreeNode
 *         cuGetProcAddress('cuGraphAddMemFreeNode', &__cuGraphAddMemFreeNode, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphMemAllocNodeGetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemAllocNodeGetParams), 0x2B20, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1207, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1209
 *         cuGetProcAddress('cuGraphMemAllocNodeGetParams', &__cuGraphMemAllocNodeGetParams, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphAddMemFreeNode
 *         cuGetProcAddress('cuGraphAddMemFreeNode', &__cuGraphAddMemFreeNode, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphMemFreeNodeGetParams
 *         cuGetProcAddress('cuGraphMemFreeNodeGetParams', &__cuGraphMemFreeNodeGetParams, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphAddMemFreeNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemFreeNode), 0x2B20, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1209, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1211
 *         cuGetProcAddress('cuGraphAddMemFreeNode', &__cuGraphAddMemFreeNode, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphMemFreeNodeGetParams
 *         cuGetProcAddress('cuGraphMemFreeNodeGetParams', &__cuGraphMemFreeNodeGetParams, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDeviceGraphMemTrim
 *         cuGetProcAddress('cuDeviceGraphMemTrim', &__cuDeviceGraphMemTrim, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphMemFreeNodeGetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemFreeNodeGetParams), 0x2B20, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1211, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1213
 *         cuGetProcAddress('cuGraphMemFreeNodeGetParams', &__cuGraphMemFreeNodeGetParams, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDeviceGraphMemTrim
 *         cuGetProcAddress('cuDeviceGraphMemTrim', &__cuDeviceGraphMemTrim, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDeviceGetGraphMemAttribute
 *         cuGetProcAddress('cuDeviceGetGraphMemAttribute', &__cuDeviceGetGraphMemAttribute, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGraphMemTrim"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGraphMemTrim), 0x2B20, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1213, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1215
 *         cuGetProcAddress('cuDeviceGraphMemTrim', &__cuDeviceGraphMemTrim, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDeviceGetGraphMemAttribute
 *         cuGetProcAddress('cuDeviceGetGraphMemAttribute', &__cuDeviceGetGraphMemAttribute, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDeviceSetGraphMemAttribute
 *         cuGetProcAddress('cuDeviceSetGraphMemAttribute', &__cuDeviceSetGraphMemAttribute, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetGraphMemAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetGraphMemAttribute), 0x2B20, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1215, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1217
 *         cuGetProcAddress('cuDeviceGetGraphMemAttribute', &__cuDeviceGetGraphMemAttribute, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDeviceSetGraphMemAttribute
 *         cuGetProcAddress('cuDeviceSetGraphMemAttribute', &__cuDeviceSetGraphMemAttribute, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphClone
 *         cuGetProcAddress('cuGraphClone', &__cuGraphClone, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceSetGraphMemAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceSetGraphMemAttribute), 0x2B20, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1217, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1219
 *         cuGetProcAddress('cuDeviceSetGraphMemAttribute', &__cuDeviceSetGraphMemAttribute, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphClone
 *         cuGetProcAddress('cuGraphClone', &__cuGraphClone, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphNodeFindInClone
 *         cuGetProcAddress('cuGraphNodeFindInClone', &__cuGraphNodeFindInClone, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphClone"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphClone), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1219, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1221
 *         cuGetProcAddress('cuGraphClone', &__cuGraphClone, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphNodeFindInClone
 *         cuGetProcAddress('cuGraphNodeFindInClone', &__cuGraphNodeFindInClone, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphNodeGetType
 *         cuGetProcAddress('cuGraphNodeGetType', &__cuGraphNodeGetType, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphNodeFindInClone"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeFindInClone), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1221, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1223
 *         cuGetProcAddress('cuGraphNodeFindInClone', &__cuGraphNodeFindInClone, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphNodeGetType
 *         cuGetProcAddress('cuGraphNodeGetType', &__cuGraphNodeGetType, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphGetNodes
 *         cuGetProcAddress('cuGraphGetNodes', &__cuGraphGetNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphNodeGetType"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetType), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1223, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1225
 *         cuGetProcAddress('cuGraphNodeGetType', &__cuGraphNodeGetType, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphGetNodes
 *         cuGetProcAddress('cuGraphGetNodes', &__cuGraphGetNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphGetRootNodes
 *         cuGetProcAddress('cuGraphGetRootNodes', &__cuGraphGetRootNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphGetNodes"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphGetNodes), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1225, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1227
 *         cuGetProcAddress('cuGraphGetNodes', &__cuGraphGetNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphGetRootNodes
 *         cuGetProcAddress('cuGraphGetRootNodes', &__cuGraphGetRootNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphGetEdges
 *         cuGetProcAddress('cuGraphGetEdges', &__cuGraphGetEdges, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphGetRootNodes"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphGetRootNodes), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1227, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1229
 *         cuGetProcAddress('cuGraphGetRootNodes', &__cuGraphGetRootNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphGetEdges
 *         cuGetProcAddress('cuGraphGetEdges', &__cuGraphGetEdges, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphNodeGetDependencies
 *         cuGetProcAddress('cuGraphNodeGetDependencies', &__cuGraphNodeGetDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphGetEdges"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphGetEdges), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1229, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1231
 *         cuGetProcAddress('cuGraphGetEdges', &__cuGraphGetEdges, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphNodeGetDependencies
 *         cuGetProcAddress('cuGraphNodeGetDependencies', &__cuGraphNodeGetDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphNodeGetDependentNodes
 *         cuGetProcAddress('cuGraphNodeGetDependentNodes', &__cuGraphNodeGetDependentNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphNodeGetDependencies"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetDependencies), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1231, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1233
 *         cuGetProcAddress('cuGraphNodeGetDependencies', &__cuGraphNodeGetDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphNodeGetDependentNodes
 *         cuGetProcAddress('cuGraphNodeGetDependentNodes', &__cuGraphNodeGetDependentNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphAddDependencies
 *         cuGetProcAddress('cuGraphAddDependencies', &__cuGraphAddDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphNodeGetDependentNodes"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetDependentNodes), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1233, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1235
 *         cuGetProcAddress('cuGraphNodeGetDependentNodes', &__cuGraphNodeGetDependentNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphAddDependencies
 *         cuGetProcAddress('cuGraphAddDependencies', &__cuGraphAddDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphRemoveDependencies
 *         cuGetProcAddress('cuGraphRemoveDependencies', &__cuGraphRemoveDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphAddDependencies"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddDependencies), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1235, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1237
 *         cuGetProcAddress('cuGraphAddDependencies', &__cuGraphAddDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphRemoveDependencies
 *         cuGetProcAddress('cuGraphRemoveDependencies', &__cuGraphRemoveDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphDestroyNode
 *         cuGetProcAddress('cuGraphDestroyNode', &__cuGraphDestroyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphRemoveDependencies"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphRemoveDependencies), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1237, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1239
 *         cuGetProcAddress('cuGraphRemoveDependencies', &__cuGraphRemoveDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphDestroyNode
 *         cuGetProcAddress('cuGraphDestroyNode', &__cuGraphDestroyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphInstantiateWithFlags
 *         cuGetProcAddress('cuGraphInstantiateWithFlags', &__cuGraphInstantiateWithFlags, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphDestroyNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphDestroyNode), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1239, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1241
 *         cuGetProcAddress('cuGraphDestroyNode', &__cuGraphDestroyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphInstantiateWithFlags
 *         cuGetProcAddress('cuGraphInstantiateWithFlags', &__cuGraphInstantiateWithFlags, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphExecGetFlags
 *         cuGetProcAddress('cuGraphExecGetFlags', &__cuGraphExecGetFlags, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphInstantiateWithFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphInstantiateWithFlags), 0x2B20, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1241, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1243
 *         cuGetProcAddress('cuGraphInstantiateWithFlags', &__cuGraphInstantiateWithFlags, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphExecGetFlags
 *         cuGetProcAddress('cuGraphExecGetFlags', &__cuGraphExecGetFlags, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphExecKernelNodeSetParams_v2
 *         cuGetProcAddress('cuGraphExecKernelNodeSetParams', &__cuGraphExecKernelNodeSetParams_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExecGetFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecGetFlags), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1243, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1245
 *         cuGetProcAddress('cuGraphExecGetFlags', &__cuGraphExecGetFlags, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphExecKernelNodeSetParams_v2
 *         cuGetProcAddress('cuGraphExecKernelNodeSetParams', &__cuGraphExecKernelNodeSetParams_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphExecMemcpyNodeSetParams
 *         cuGetProcAddress('cuGraphExecMemcpyNodeSetParams', &__cuGraphExecMemcpyNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExecKernelNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecKernelNodeSetParams_v2), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1245, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1247
 *         cuGetProcAddress('cuGraphExecKernelNodeSetParams', &__cuGraphExecKernelNodeSetParams_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphExecMemcpyNodeSetParams
 *         cuGetProcAddress('cuGraphExecMemcpyNodeSetParams', &__cuGraphExecMemcpyNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphExecMemsetNodeSetParams
 *         cuGetProcAddress('cuGraphExecMemsetNodeSetParams', &__cuGraphExecMemsetNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExecMemcpyNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecMemcpyNodeSetParams), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1247, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1249
 *         cuGetProcAddress('cuGraphExecMemcpyNodeSetParams', &__cuGraphExecMemcpyNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphExecMemsetNodeSetParams
 *         cuGetProcAddress('cuGraphExecMemsetNodeSetParams', &__cuGraphExecMemsetNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphExecHostNodeSetParams
 *         cuGetProcAddress('cuGraphExecHostNodeSetParams', &__cuGraphExecHostNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExecMemsetNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecMemsetNodeSetParams), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1249, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1251
 *         cuGetProcAddress('cuGraphExecMemsetNodeSetParams', &__cuGraphExecMemsetNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphExecHostNodeSetParams
 *         cuGetProcAddress('cuGraphExecHostNodeSetParams', &__cuGraphExecHostNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphExecChildGraphNodeSetParams
 *         cuGetProcAddress('cuGraphExecChildGraphNodeSetParams', &__cuGraphExecChildGraphNodeSetParams, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExecHostNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecHostNodeSetParams), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1251, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1253
 *         cuGetProcAddress('cuGraphExecHostNodeSetParams', &__cuGraphExecHostNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphExecChildGraphNodeSetParams
 *         cuGetProcAddress('cuGraphExecChildGraphNodeSetParams', &__cuGraphExecChildGraphNodeSetParams, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphExecEventRecordNodeSetEvent
 *         cuGetProcAddress('cuGraphExecEventRecordNodeSetEvent', &__cuGraphExecEventRecordNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExecChildGraphNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecChildGraphNodeSetParams), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1253, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1255
 *         cuGetProcAddress('cuGraphExecChildGraphNodeSetParams', &__cuGraphExecChildGraphNodeSetParams, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphExecEventRecordNodeSetEvent
 *         cuGetProcAddress('cuGraphExecEventRecordNodeSetEvent', &__cuGraphExecEventRecordNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphExecEventWaitNodeSetEvent
 *         cuGetProcAddress('cuGraphExecEventWaitNodeSetEvent', &__cuGraphExecEventWaitNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExecEventRecordNodeSetEvent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecEventRecordNodeSetEvent), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1255, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1257
 *         cuGetProcAddress('cuGraphExecEventRecordNodeSetEvent', &__cuGraphExecEventRecordNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphExecEventWaitNodeSetEvent
 *         cuGetProcAddress('cuGraphExecEventWaitNodeSetEvent', &__cuGraphExecEventWaitNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphExecExternalSemaphoresSignalNodeSetParams
 *         cuGetProcAddress('cuGraphExecExternalSemaphoresSignalNodeSetParams', &__cuGraphExecExternalSemaphoresSignalNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExecEventWaitNodeSetEvent"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecEventWaitNodeSetEvent), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1257, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1259
 *         cuGetProcAddress('cuGraphExecEventWaitNodeSetEvent', &__cuGraphExecEventWaitNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphExecExternalSemaphoresSignalNodeSetParams
 *         cuGetProcAddress('cuGraphExecExternalSemaphoresSignalNodeSetParams', &__cuGraphExecExternalSemaphoresSignalNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphExecExternalSemaphoresWaitNodeSetParams
 *         cuGetProcAddress('cuGraphExecExternalSemaphoresWaitNodeSetParams', &__cuGraphExecExternalSemaphoresWaitNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExecExternalSemaphoresSignalNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecExternalSemaphoresSignalNodeSetParams), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1259, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1261
 *         cuGetProcAddress('cuGraphExecExternalSemaphoresSignalNodeSetParams', &__cuGraphExecExternalSemaphoresSignalNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphExecExternalSemaphoresWaitNodeSetParams
 *         cuGetProcAddress('cuGraphExecExternalSemaphoresWaitNodeSetParams', &__cuGraphExecExternalSemaphoresWaitNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphNodeSetEnabled
 *         cuGetProcAddress('cuGraphNodeSetEnabled', &__cuGraphNodeSetEnabled, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExecExternalSemaphoresWaitNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecExternalSemaphoresWaitNodeSetParams), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1261, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1263
 *         cuGetProcAddress('cuGraphExecExternalSemaphoresWaitNodeSetParams', &__cuGraphExecExternalSemaphoresWaitNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphNodeSetEnabled
 *         cuGetProcAddress('cuGraphNodeSetEnabled', &__cuGraphNodeSetEnabled, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphNodeGetEnabled
 *         cuGetProcAddress('cuGraphNodeGetEnabled', &__cuGraphNodeGetEnabled, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphNodeSetEnabled"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeSetEnabled), 0x2B34, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1263, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1265
 *         cuGetProcAddress('cuGraphNodeSetEnabled', &__cuGraphNodeSetEnabled, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphNodeGetEnabled
 *         cuGetProcAddress('cuGraphNodeGetEnabled', &__cuGraphNodeGetEnabled, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphExecDestroy
 *         cuGetProcAddress('cuGraphExecDestroy', &__cuGraphExecDestroy, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphNodeGetEnabled"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetEnabled), 0x2B34, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1265, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1267
 *         cuGetProcAddress('cuGraphNodeGetEnabled', &__cuGraphNodeGetEnabled, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphExecDestroy
 *         cuGetProcAddress('cuGraphExecDestroy', &__cuGraphExecDestroy, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphDestroy
 *         cuGetProcAddress('cuGraphDestroy', &__cuGraphDestroy, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExecDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecDestroy), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1267, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1269
 *         cuGetProcAddress('cuGraphExecDestroy', &__cuGraphExecDestroy, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphDestroy
 *         cuGetProcAddress('cuGraphDestroy', &__cuGraphDestroy, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphExecUpdate_v2
 *         cuGetProcAddress('cuGraphExecUpdate', &__cuGraphExecUpdate_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphDestroy), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1269, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1271
 *         cuGetProcAddress('cuGraphDestroy', &__cuGraphDestroy, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphExecUpdate_v2
 *         cuGetProcAddress('cuGraphExecUpdate', &__cuGraphExecUpdate_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphKernelNodeCopyAttributes
 *         cuGetProcAddress('cuGraphKernelNodeCopyAttributes', &__cuGraphKernelNodeCopyAttributes, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExecUpdate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecUpdate_v2), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1271, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1273
 *         cuGetProcAddress('cuGraphExecUpdate', &__cuGraphExecUpdate_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphKernelNodeCopyAttributes
 *         cuGetProcAddress('cuGraphKernelNodeCopyAttributes', &__cuGraphKernelNodeCopyAttributes, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphKernelNodeGetAttribute
 *         cuGetProcAddress('cuGraphKernelNodeGetAttribute', &__cuGraphKernelNodeGetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphKernelNodeCopyAttributes"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeCopyAttributes), 0x2AF8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1273, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1275
 *         cuGetProcAddress('cuGraphKernelNodeCopyAttributes', &__cuGraphKernelNodeCopyAttributes, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphKernelNodeGetAttribute
 *         cuGetProcAddress('cuGraphKernelNodeGetAttribute', &__cuGraphKernelNodeGetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphKernelNodeSetAttribute
 *         cuGetProcAddress('cuGraphKernelNodeSetAttribute', &__cuGraphKernelNodeSetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphKernelNodeGetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeGetAttribute), 0x2AF8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1275, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1277
 *         cuGetProcAddress('cuGraphKernelNodeGetAttribute', &__cuGraphKernelNodeGetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphKernelNodeSetAttribute
 *         cuGetProcAddress('cuGraphKernelNodeSetAttribute', &__cuGraphKernelNodeSetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphDebugDotPrint
 *         cuGetProcAddress('cuGraphDebugDotPrint', &__cuGraphDebugDotPrint, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphKernelNodeSetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeSetAttribute), 0x2AF8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1277, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1279
 *         cuGetProcAddress('cuGraphKernelNodeSetAttribute', &__cuGraphKernelNodeSetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphDebugDotPrint
 *         cuGetProcAddress('cuGraphDebugDotPrint', &__cuGraphDebugDotPrint, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuUserObjectCreate
 *         cuGetProcAddress('cuUserObjectCreate', &__cuUserObjectCreate, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphDebugDotPrint"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphDebugDotPrint), 0x2B16, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1279, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1281
 *         cuGetProcAddress('cuGraphDebugDotPrint', &__cuGraphDebugDotPrint, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuUserObjectCreate
 *         cuGetProcAddress('cuUserObjectCreate', &__cuUserObjectCreate, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuUserObjectRetain
 *         cuGetProcAddress('cuUserObjectRetain', &__cuUserObjectRetain, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuUserObjectCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuUserObjectCreate), 0x2B16, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1281, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1283
 *         cuGetProcAddress('cuUserObjectCreate', &__cuUserObjectCreate, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuUserObjectRetain
 *         cuGetProcAddress('cuUserObjectRetain', &__cuUserObjectRetain, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuUserObjectRelease
 *         cuGetProcAddress('cuUserObjectRelease', &__cuUserObjectRelease, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuUserObjectRetain"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuUserObjectRetain), 0x2B16, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1283, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1285
 *         cuGetProcAddress('cuUserObjectRetain', &__cuUserObjectRetain, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuUserObjectRelease
 *         cuGetProcAddress('cuUserObjectRelease', &__cuUserObjectRelease, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphRetainUserObject
 *         cuGetProcAddress('cuGraphRetainUserObject', &__cuGraphRetainUserObject, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuUserObjectRelease"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuUserObjectRelease), 0x2B16, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1285, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1287
 *         cuGetProcAddress('cuUserObjectRelease', &__cuUserObjectRelease, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphRetainUserObject
 *         cuGetProcAddress('cuGraphRetainUserObject', &__cuGraphRetainUserObject, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphReleaseUserObject
 *         cuGetProcAddress('cuGraphReleaseUserObject', &__cuGraphReleaseUserObject, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphRetainUserObject"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphRetainUserObject), 0x2B16, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1287, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1289
 *         cuGetProcAddress('cuGraphRetainUserObject', &__cuGraphRetainUserObject, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphReleaseUserObject
 *         cuGetProcAddress('cuGraphReleaseUserObject', &__cuGraphReleaseUserObject, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphAddNode
 *         cuGetProcAddress('cuGraphAddNode', &__cuGraphAddNode, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphReleaseUserObject"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphReleaseUserObject), 0x2B16, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1289, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1291
 *         cuGetProcAddress('cuGraphReleaseUserObject', &__cuGraphReleaseUserObject, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphAddNode
 *         cuGetProcAddress('cuGraphAddNode', &__cuGraphAddNode, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphNodeSetParams
 *         cuGetProcAddress('cuGraphNodeSetParams', &__cuGraphNodeSetParams, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphAddNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddNode), 0x2EF4, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1291, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1293
 *         cuGetProcAddress('cuGraphAddNode', &__cuGraphAddNode, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphNodeSetParams
 *         cuGetProcAddress('cuGraphNodeSetParams', &__cuGraphNodeSetParams, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphExecNodeSetParams
 *         cuGetProcAddress('cuGraphExecNodeSetParams', &__cuGraphExecNodeSetParams, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeSetParams), 0x2EF4, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1293, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1295
 *         cuGetProcAddress('cuGraphNodeSetParams', &__cuGraphNodeSetParams, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphExecNodeSetParams
 *         cuGetProcAddress('cuGraphExecNodeSetParams', &__cuGraphExecNodeSetParams, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuOccupancyMaxActiveBlocksPerMultiprocessor
 *         cuGetProcAddress('cuOccupancyMaxActiveBlocksPerMultiprocessor', &__cuOccupancyMaxActiveBlocksPerMultiprocessor, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExecNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecNodeSetParams), 0x2EF4, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1295, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1297
 *         cuGetProcAddress('cuGraphExecNodeSetParams', &__cuGraphExecNodeSetParams, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuOccupancyMaxActiveBlocksPerMultiprocessor
 *         cuGetProcAddress('cuOccupancyMaxActiveBlocksPerMultiprocessor', &__cuOccupancyMaxActiveBlocksPerMultiprocessor, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags
 *         cuGetProcAddress('cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags', &__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuOccupancyMaxActiveBlocksPerMultiprocessor"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxActiveBlocksPerMultiprocessor), 0x17A2, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1297, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1299
 *         cuGetProcAddress('cuOccupancyMaxActiveBlocksPerMultiprocessor', &__cuOccupancyMaxActiveBlocksPerMultiprocessor, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags
 *         cuGetProcAddress('cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags', &__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuOccupancyMaxPotentialBlockSize
 *         cuGetProcAddress('cuOccupancyMaxPotentialBlockSize', &__cuOccupancyMaxPotentialBlockSize, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1299, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1301
 *         cuGetProcAddress('cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags', &__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuOccupancyMaxPotentialBlockSize
 *         cuGetProcAddress('cuOccupancyMaxPotentialBlockSize', &__cuOccupancyMaxPotentialBlockSize, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuOccupancyMaxPotentialBlockSizeWithFlags
 *         cuGetProcAddress('cuOccupancyMaxPotentialBlockSizeWithFlags', &__cuOccupancyMaxPotentialBlockSizeWithFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuOccupancyMaxPotentialBlockSize"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxPotentialBlockSize), 0x17A2, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1301, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1303
 *         cuGetProcAddress('cuOccupancyMaxPotentialBlockSize', &__cuOccupancyMaxPotentialBlockSize, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuOccupancyMaxPotentialBlockSizeWithFlags
 *         cuGetProcAddress('cuOccupancyMaxPotentialBlockSizeWithFlags', &__cuOccupancyMaxPotentialBlockSizeWithFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuOccupancyAvailableDynamicSMemPerBlock
 *         cuGetProcAddress('cuOccupancyAvailableDynamicSMemPerBlock', &__cuOccupancyAvailableDynamicSMemPerBlock, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuOccupancyMaxPotentialBlockSizeWithFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxPotentialBlockSizeWithFlags), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1303, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1305
 *         cuGetProcAddress('cuOccupancyMaxPotentialBlockSizeWithFlags', &__cuOccupancyMaxPotentialBlockSizeWithFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuOccupancyAvailableDynamicSMemPerBlock
 *         cuGetProcAddress('cuOccupancyAvailableDynamicSMemPerBlock', &__cuOccupancyAvailableDynamicSMemPerBlock, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuOccupancyMaxPotentialClusterSize
 *         cuGetProcAddress('cuOccupancyMaxPotentialClusterSize', &__cuOccupancyMaxPotentialClusterSize, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuOccupancyAvailableDynamicSMemPerBlock"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyAvailableDynamicSMemPerBlock), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1305, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1307
 *         cuGetProcAddress('cuOccupancyAvailableDynamicSMemPerBlock', &__cuOccupancyAvailableDynamicSMemPerBlock, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuOccupancyMaxPotentialClusterSize
 *         cuGetProcAddress('cuOccupancyMaxPotentialClusterSize', &__cuOccupancyMaxPotentialClusterSize, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuOccupancyMaxActiveClusters
 *         cuGetProcAddress('cuOccupancyMaxActiveClusters', &__cuOccupancyMaxActiveClusters, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuOccupancyMaxPotentialClusterSize"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxPotentialClusterSize), 0x2B3E, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1307, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1309
 *         cuGetProcAddress('cuOccupancyMaxPotentialClusterSize', &__cuOccupancyMaxPotentialClusterSize, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuOccupancyMaxActiveClusters
 *         cuGetProcAddress('cuOccupancyMaxActiveClusters', &__cuOccupancyMaxActiveClusters, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexRefSetArray
 *         cuGetProcAddress('cuTexRefSetArray', &__cuTexRefSetArray, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuOccupancyMaxActiveClusters"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxActiveClusters), 0x2B3E, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1309, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1311
 *         cuGetProcAddress('cuOccupancyMaxActiveClusters', &__cuOccupancyMaxActiveClusters, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexRefSetArray
 *         cuGetProcAddress('cuTexRefSetArray', &__cuTexRefSetArray, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexRefSetMipmappedArray
 *         cuGetProcAddress('cuTexRefSetMipmappedArray', &__cuTexRefSetMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefSetArray"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetArray), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1311, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1313
 *         cuGetProcAddress('cuTexRefSetArray', &__cuTexRefSetArray, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexRefSetMipmappedArray
 *         cuGetProcAddress('cuTexRefSetMipmappedArray', &__cuTexRefSetMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexRefSetAddress_v2
 *         cuGetProcAddress('cuTexRefSetAddress', &__cuTexRefSetAddress_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefSetMipmappedArray"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmappedArray), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1313, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1315
 *         cuGetProcAddress('cuTexRefSetMipmappedArray', &__cuTexRefSetMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexRefSetAddress_v2
 *         cuGetProcAddress('cuTexRefSetAddress', &__cuTexRefSetAddress_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexRefSetAddress2D_v3
 *         cuGetProcAddress('cuTexRefSetAddress2D', &__cuTexRefSetAddress2D_v3, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefSetAddress"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetAddress_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1315, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1317
 *         cuGetProcAddress('cuTexRefSetAddress', &__cuTexRefSetAddress_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexRefSetAddress2D_v3
 *         cuGetProcAddress('cuTexRefSetAddress2D', &__cuTexRefSetAddress2D_v3, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexRefSetFormat
 *         cuGetProcAddress('cuTexRefSetFormat', &__cuTexRefSetFormat, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefSetAddress2D"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetAddress2D_v3), 0xFAA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1317, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1319
 *         cuGetProcAddress('cuTexRefSetAddress2D', &__cuTexRefSetAddress2D_v3, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexRefSetFormat
 *         cuGetProcAddress('cuTexRefSetFormat', &__cuTexRefSetFormat, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexRefSetAddressMode
 *         cuGetProcAddress('cuTexRefSetAddressMode', &__cuTexRefSetAddressMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefSetFormat"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFormat), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1319, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1321
 *         cuGetProcAddress('cuTexRefSetFormat', &__cuTexRefSetFormat, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexRefSetAddressMode
 *         cuGetProcAddress('cuTexRefSetAddressMode', &__cuTexRefSetAddressMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexRefSetFilterMode
 *         cuGetProcAddress('cuTexRefSetFilterMode', &__cuTexRefSetFilterMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefSetAddressMode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetAddressMode), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1321, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1323
 *         cuGetProcAddress('cuTexRefSetAddressMode', &__cuTexRefSetAddressMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexRefSetFilterMode
 *         cuGetProcAddress('cuTexRefSetFilterMode', &__cuTexRefSetFilterMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexRefSetMipmapFilterMode
 *         cuGetProcAddress('cuTexRefSetMipmapFilterMode', &__cuTexRefSetMipmapFilterMode, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefSetFilterMode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFilterMode), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1323, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1325
 *         cuGetProcAddress('cuTexRefSetFilterMode', &__cuTexRefSetFilterMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexRefSetMipmapFilterMode
 *         cuGetProcAddress('cuTexRefSetMipmapFilterMode', &__cuTexRefSetMipmapFilterMode, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexRefSetMipmapLevelBias
 *         cuGetProcAddress('cuTexRefSetMipmapLevelBias', &__cuTexRefSetMipmapLevelBias, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefSetMipmapFilterMode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapFilterMode), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1325, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1327
 *         cuGetProcAddress('cuTexRefSetMipmapFilterMode', &__cuTexRefSetMipmapFilterMode, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexRefSetMipmapLevelBias
 *         cuGetProcAddress('cuTexRefSetMipmapLevelBias', &__cuTexRefSetMipmapLevelBias, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexRefSetMipmapLevelClamp
 *         cuGetProcAddress('cuTexRefSetMipmapLevelClamp', &__cuTexRefSetMipmapLevelClamp, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefSetMipmapLevelBias"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapLevelBias), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1327, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1329
 *         cuGetProcAddress('cuTexRefSetMipmapLevelBias', &__cuTexRefSetMipmapLevelBias, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexRefSetMipmapLevelClamp
 *         cuGetProcAddress('cuTexRefSetMipmapLevelClamp', &__cuTexRefSetMipmapLevelClamp, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexRefSetMaxAnisotropy
 *         cuGetProcAddress('cuTexRefSetMaxAnisotropy', &__cuTexRefSetMaxAnisotropy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefSetMipmapLevelClamp"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapLevelClamp), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1329, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1331
 *         cuGetProcAddress('cuTexRefSetMipmapLevelClamp', &__cuTexRefSetMipmapLevelClamp, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexRefSetMaxAnisotropy
 *         cuGetProcAddress('cuTexRefSetMaxAnisotropy', &__cuTexRefSetMaxAnisotropy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexRefSetBorderColor
 *         cuGetProcAddress('cuTexRefSetBorderColor', &__cuTexRefSetBorderColor, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefSetMaxAnisotropy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMaxAnisotropy), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1331, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1333
 *         cuGetProcAddress('cuTexRefSetMaxAnisotropy', &__cuTexRefSetMaxAnisotropy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexRefSetBorderColor
 *         cuGetProcAddress('cuTexRefSetBorderColor', &__cuTexRefSetBorderColor, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexRefSetFlags
 *         cuGetProcAddress('cuTexRefSetFlags', &__cuTexRefSetFlags, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefSetBorderColor"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetBorderColor), 0x1F40, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1333, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1335
 *         cuGetProcAddress('cuTexRefSetBorderColor', &__cuTexRefSetBorderColor, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexRefSetFlags
 *         cuGetProcAddress('cuTexRefSetFlags', &__cuTexRefSetFlags, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexRefGetAddress_v2
 *         cuGetProcAddress('cuTexRefGetAddress', &__cuTexRefGetAddress_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefSetFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFlags), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1335, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1337
 *         cuGetProcAddress('cuTexRefSetFlags', &__cuTexRefSetFlags, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexRefGetAddress_v2
 *         cuGetProcAddress('cuTexRefGetAddress', &__cuTexRefGetAddress_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexRefGetArray
 *         cuGetProcAddress('cuTexRefGetArray', &__cuTexRefGetArray, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefGetAddress"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetAddress_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1337, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1339
 *         cuGetProcAddress('cuTexRefGetAddress', &__cuTexRefGetAddress_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexRefGetArray
 *         cuGetProcAddress('cuTexRefGetArray', &__cuTexRefGetArray, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexRefGetMipmappedArray
 *         cuGetProcAddress('cuTexRefGetMipmappedArray', &__cuTexRefGetMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefGetArray"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetArray), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1339, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1341
 *         cuGetProcAddress('cuTexRefGetArray', &__cuTexRefGetArray, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexRefGetMipmappedArray
 *         cuGetProcAddress('cuTexRefGetMipmappedArray', &__cuTexRefGetMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexRefGetAddressMode
 *         cuGetProcAddress('cuTexRefGetAddressMode', &__cuTexRefGetAddressMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefGetMipmappedArray"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmappedArray), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1341, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1343
 *         cuGetProcAddress('cuTexRefGetMipmappedArray', &__cuTexRefGetMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexRefGetAddressMode
 *         cuGetProcAddress('cuTexRefGetAddressMode', &__cuTexRefGetAddressMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexRefGetFilterMode
 *         cuGetProcAddress('cuTexRefGetFilterMode', &__cuTexRefGetFilterMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefGetAddressMode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetAddressMode), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1343, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1345
 *         cuGetProcAddress('cuTexRefGetAddressMode', &__cuTexRefGetAddressMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexRefGetFilterMode
 *         cuGetProcAddress('cuTexRefGetFilterMode', &__cuTexRefGetFilterMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexRefGetFormat
 *         cuGetProcAddress('cuTexRefGetFormat', &__cuTexRefGetFormat, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefGetFilterMode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFilterMode), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1345, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1347
 *         cuGetProcAddress('cuTexRefGetFilterMode', &__cuTexRefGetFilterMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexRefGetFormat
 *         cuGetProcAddress('cuTexRefGetFormat', &__cuTexRefGetFormat, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexRefGetMipmapFilterMode
 *         cuGetProcAddress('cuTexRefGetMipmapFilterMode', &__cuTexRefGetMipmapFilterMode, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefGetFormat"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFormat), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1347, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1349
 *         cuGetProcAddress('cuTexRefGetFormat', &__cuTexRefGetFormat, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexRefGetMipmapFilterMode
 *         cuGetProcAddress('cuTexRefGetMipmapFilterMode', &__cuTexRefGetMipmapFilterMode, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexRefGetMipmapLevelBias
 *         cuGetProcAddress('cuTexRefGetMipmapLevelBias', &__cuTexRefGetMipmapLevelBias, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefGetMipmapFilterMode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapFilterMode), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1349, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1351
 *         cuGetProcAddress('cuTexRefGetMipmapFilterMode', &__cuTexRefGetMipmapFilterMode, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexRefGetMipmapLevelBias
 *         cuGetProcAddress('cuTexRefGetMipmapLevelBias', &__cuTexRefGetMipmapLevelBias, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexRefGetMipmapLevelClamp
 *         cuGetProcAddress('cuTexRefGetMipmapLevelClamp', &__cuTexRefGetMipmapLevelClamp, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefGetMipmapLevelBias"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapLevelBias), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1351, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1353
 *         cuGetProcAddress('cuTexRefGetMipmapLevelBias', &__cuTexRefGetMipmapLevelBias, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexRefGetMipmapLevelClamp
 *         cuGetProcAddress('cuTexRefGetMipmapLevelClamp', &__cuTexRefGetMipmapLevelClamp, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexRefGetMaxAnisotropy
 *         cuGetProcAddress('cuTexRefGetMaxAnisotropy', &__cuTexRefGetMaxAnisotropy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefGetMipmapLevelClamp"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapLevelClamp), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1353, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1355
 *         cuGetProcAddress('cuTexRefGetMipmapLevelClamp', &__cuTexRefGetMipmapLevelClamp, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexRefGetMaxAnisotropy
 *         cuGetProcAddress('cuTexRefGetMaxAnisotropy', &__cuTexRefGetMaxAnisotropy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexRefGetBorderColor
 *         cuGetProcAddress('cuTexRefGetBorderColor', &__cuTexRefGetBorderColor, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefGetMaxAnisotropy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMaxAnisotropy), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1355, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1357
 *         cuGetProcAddress('cuTexRefGetMaxAnisotropy', &__cuTexRefGetMaxAnisotropy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexRefGetBorderColor
 *         cuGetProcAddress('cuTexRefGetBorderColor', &__cuTexRefGetBorderColor, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexRefGetFlags
 *         cuGetProcAddress('cuTexRefGetFlags', &__cuTexRefGetFlags, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefGetBorderColor"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetBorderColor), 0x1F40, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1357, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1359
 *         cuGetProcAddress('cuTexRefGetBorderColor', &__cuTexRefGetBorderColor, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexRefGetFlags
 *         cuGetProcAddress('cuTexRefGetFlags', &__cuTexRefGetFlags, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexRefCreate
 *         cuGetProcAddress('cuTexRefCreate', &__cuTexRefCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefGetFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFlags), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1359, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1361
 *         cuGetProcAddress('cuTexRefGetFlags', &__cuTexRefGetFlags, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexRefCreate
 *         cuGetProcAddress('cuTexRefCreate', &__cuTexRefCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexRefDestroy
 *         cuGetProcAddress('cuTexRefDestroy', &__cuTexRefDestroy, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefCreate), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1361, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1363
 *         cuGetProcAddress('cuTexRefCreate', &__cuTexRefCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexRefDestroy
 *         cuGetProcAddress('cuTexRefDestroy', &__cuTexRefDestroy, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuSurfRefSetArray
 *         cuGetProcAddress('cuSurfRefSetArray', &__cuSurfRefSetArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexRefDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefDestroy), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1363, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1365
 *         cuGetProcAddress('cuTexRefDestroy', &__cuTexRefDestroy, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuSurfRefSetArray
 *         cuGetProcAddress('cuSurfRefSetArray', &__cuSurfRefSetArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuSurfRefGetArray
 *         cuGetProcAddress('cuSurfRefGetArray', &__cuSurfRefGetArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuSurfRefSetArray"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuSurfRefSetArray), 0xBB8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1365, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1367
 *         cuGetProcAddress('cuSurfRefSetArray', &__cuSurfRefSetArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuSurfRefGetArray
 *         cuGetProcAddress('cuSurfRefGetArray', &__cuSurfRefGetArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexObjectCreate
 *         cuGetProcAddress('cuTexObjectCreate', &__cuTexObjectCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuSurfRefGetArray"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuSurfRefGetArray), 0xBB8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1367, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1369
 *         cuGetProcAddress('cuSurfRefGetArray', &__cuSurfRefGetArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexObjectCreate
 *         cuGetProcAddress('cuTexObjectCreate', &__cuTexObjectCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexObjectDestroy
 *         cuGetProcAddress('cuTexObjectDestroy', &__cuTexObjectDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexObjectCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectCreate), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1369, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1371
 *         cuGetProcAddress('cuTexObjectCreate', &__cuTexObjectCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexObjectDestroy
 *         cuGetProcAddress('cuTexObjectDestroy', &__cuTexObjectDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexObjectGetResourceDesc
 *         cuGetProcAddress('cuTexObjectGetResourceDesc', &__cuTexObjectGetResourceDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexObjectDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectDestroy), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1371, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1373
 *         cuGetProcAddress('cuTexObjectDestroy', &__cuTexObjectDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexObjectGetResourceDesc
 *         cuGetProcAddress('cuTexObjectGetResourceDesc', &__cuTexObjectGetResourceDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexObjectGetTextureDesc
 *         cuGetProcAddress('cuTexObjectGetTextureDesc', &__cuTexObjectGetTextureDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexObjectGetResourceDesc"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetResourceDesc), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1373, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1375
 *         cuGetProcAddress('cuTexObjectGetResourceDesc', &__cuTexObjectGetResourceDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexObjectGetTextureDesc
 *         cuGetProcAddress('cuTexObjectGetTextureDesc', &__cuTexObjectGetTextureDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTexObjectGetResourceViewDesc
 *         cuGetProcAddress('cuTexObjectGetResourceViewDesc', &__cuTexObjectGetResourceViewDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexObjectGetTextureDesc"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetTextureDesc), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1375, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1377
 *         cuGetProcAddress('cuTexObjectGetTextureDesc', &__cuTexObjectGetTextureDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTexObjectGetResourceViewDesc
 *         cuGetProcAddress('cuTexObjectGetResourceViewDesc', &__cuTexObjectGetResourceViewDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuSurfObjectCreate
 *         cuGetProcAddress('cuSurfObjectCreate', &__cuSurfObjectCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTexObjectGetResourceViewDesc"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetResourceViewDesc), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1377, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1379
 *         cuGetProcAddress('cuTexObjectGetResourceViewDesc', &__cuTexObjectGetResourceViewDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuSurfObjectCreate
 *         cuGetProcAddress('cuSurfObjectCreate', &__cuSurfObjectCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuSurfObjectDestroy
 *         cuGetProcAddress('cuSurfObjectDestroy', &__cuSurfObjectDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuSurfObjectCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectCreate), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1379, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1381
 *         cuGetProcAddress('cuSurfObjectCreate', &__cuSurfObjectCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuSurfObjectDestroy
 *         cuGetProcAddress('cuSurfObjectDestroy', &__cuSurfObjectDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuSurfObjectGetResourceDesc
 *         cuGetProcAddress('cuSurfObjectGetResourceDesc', &__cuSurfObjectGetResourceDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuSurfObjectDestroy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectDestroy), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1381, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1383
 *         cuGetProcAddress('cuSurfObjectDestroy', &__cuSurfObjectDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuSurfObjectGetResourceDesc
 *         cuGetProcAddress('cuSurfObjectGetResourceDesc', &__cuSurfObjectGetResourceDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTensorMapEncodeTiled
 *         cuGetProcAddress('cuTensorMapEncodeTiled', &__cuTensorMapEncodeTiled, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuSurfObjectGetResourceDesc"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectGetResourceDesc), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1383, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1385
 *         cuGetProcAddress('cuSurfObjectGetResourceDesc', &__cuSurfObjectGetResourceDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTensorMapEncodeTiled
 *         cuGetProcAddress('cuTensorMapEncodeTiled', &__cuTensorMapEncodeTiled, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTensorMapEncodeIm2col
 *         cuGetProcAddress('cuTensorMapEncodeIm2col', &__cuTensorMapEncodeIm2col, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTensorMapEncodeTiled"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTensorMapEncodeTiled), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1385, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1387
 *         cuGetProcAddress('cuTensorMapEncodeTiled', &__cuTensorMapEncodeTiled, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTensorMapEncodeIm2col
 *         cuGetProcAddress('cuTensorMapEncodeIm2col', &__cuTensorMapEncodeIm2col, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuTensorMapReplaceAddress
 *         cuGetProcAddress('cuTensorMapReplaceAddress', &__cuTensorMapReplaceAddress, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTensorMapEncodeIm2col"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTensorMapEncodeIm2col), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1387, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1389
 *         cuGetProcAddress('cuTensorMapEncodeIm2col', &__cuTensorMapEncodeIm2col, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuTensorMapReplaceAddress
 *         cuGetProcAddress('cuTensorMapReplaceAddress', &__cuTensorMapReplaceAddress, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDeviceCanAccessPeer
 *         cuGetProcAddress('cuDeviceCanAccessPeer', &__cuDeviceCanAccessPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuTensorMapReplaceAddress"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuTensorMapReplaceAddress), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1389, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1391
 *         cuGetProcAddress('cuTensorMapReplaceAddress', &__cuTensorMapReplaceAddress, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDeviceCanAccessPeer
 *         cuGetProcAddress('cuDeviceCanAccessPeer', &__cuDeviceCanAccessPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCtxEnablePeerAccess
 *         cuGetProcAddress('cuCtxEnablePeerAccess', &__cuCtxEnablePeerAccess, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceCanAccessPeer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceCanAccessPeer), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1391, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1393
 *         cuGetProcAddress('cuDeviceCanAccessPeer', &__cuDeviceCanAccessPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCtxEnablePeerAccess
 *         cuGetProcAddress('cuCtxEnablePeerAccess', &__cuCtxEnablePeerAccess, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCtxDisablePeerAccess
 *         cuGetProcAddress('cuCtxDisablePeerAccess', &__cuCtxDisablePeerAccess, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxEnablePeerAccess"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxEnablePeerAccess), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1393, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1395
 *         cuGetProcAddress('cuCtxEnablePeerAccess', &__cuCtxEnablePeerAccess, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCtxDisablePeerAccess
 *         cuGetProcAddress('cuCtxDisablePeerAccess', &__cuCtxDisablePeerAccess, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuDeviceGetP2PAttribute
 *         cuGetProcAddress('cuDeviceGetP2PAttribute', &__cuDeviceGetP2PAttribute, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCtxDisablePeerAccess"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCtxDisablePeerAccess), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1395, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1397
 *         cuGetProcAddress('cuCtxDisablePeerAccess', &__cuCtxDisablePeerAccess, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuDeviceGetP2PAttribute
 *         cuGetProcAddress('cuDeviceGetP2PAttribute', &__cuDeviceGetP2PAttribute, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphicsUnregisterResource
 *         cuGetProcAddress('cuGraphicsUnregisterResource', &__cuGraphicsUnregisterResource, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetP2PAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetP2PAttribute), 0x1F40, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1397, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1399
 *         cuGetProcAddress('cuDeviceGetP2PAttribute', &__cuDeviceGetP2PAttribute, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphicsUnregisterResource
 *         cuGetProcAddress('cuGraphicsUnregisterResource', &__cuGraphicsUnregisterResource, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphicsSubResourceGetMappedArray
 *         cuGetProcAddress('cuGraphicsSubResourceGetMappedArray', &__cuGraphicsSubResourceGetMappedArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsUnregisterResource"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsUnregisterResource), 0xBB8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1399, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1401
 *         cuGetProcAddress('cuGraphicsUnregisterResource', &__cuGraphicsUnregisterResource, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphicsSubResourceGetMappedArray
 *         cuGetProcAddress('cuGraphicsSubResourceGetMappedArray', &__cuGraphicsSubResourceGetMappedArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphicsResourceGetMappedMipmappedArray
 *         cuGetProcAddress('cuGraphicsResourceGetMappedMipmappedArray', &__cuGraphicsResourceGetMappedMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsSubResourceGetMappedArray"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsSubResourceGetMappedArray), 0xBB8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1401, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1403
 *         cuGetProcAddress('cuGraphicsSubResourceGetMappedArray', &__cuGraphicsSubResourceGetMappedArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphicsResourceGetMappedMipmappedArray
 *         cuGetProcAddress('cuGraphicsResourceGetMappedMipmappedArray', &__cuGraphicsResourceGetMappedMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphicsResourceGetMappedPointer_v2
 *         cuGetProcAddress('cuGraphicsResourceGetMappedPointer', &__cuGraphicsResourceGetMappedPointer_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsResourceGetMappedMipmappedArray"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceGetMappedMipmappedArray), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1403, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1405
 *         cuGetProcAddress('cuGraphicsResourceGetMappedMipmappedArray', &__cuGraphicsResourceGetMappedMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphicsResourceGetMappedPointer_v2
 *         cuGetProcAddress('cuGraphicsResourceGetMappedPointer', &__cuGraphicsResourceGetMappedPointer_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphicsResourceSetMapFlags_v2
 *         cuGetProcAddress('cuGraphicsResourceSetMapFlags', &__cuGraphicsResourceSetMapFlags_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsResourceGetMappedPointer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceGetMappedPointer_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1405, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1407
 *         cuGetProcAddress('cuGraphicsResourceGetMappedPointer', &__cuGraphicsResourceGetMappedPointer_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphicsResourceSetMapFlags_v2
 *         cuGetProcAddress('cuGraphicsResourceSetMapFlags', &__cuGraphicsResourceSetMapFlags_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGetProcAddress_v2
 *         cuGetProcAddress('cuGetProcAddress', &__cuGetProcAddress_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsResourceSetMapFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceSetMapFlags_v2), 0x17A2, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1407, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1409
 *         cuGetProcAddress('cuGraphicsResourceSetMapFlags', &__cuGraphicsResourceSetMapFlags_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGetProcAddress_v2
 *         cuGetProcAddress('cuGetProcAddress', &__cuGetProcAddress_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCoredumpGetAttribute
 *         cuGetProcAddress('cuCoredumpGetAttribute', &__cuCoredumpGetAttribute, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGetProcAddress"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGetProcAddress_v2), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1409, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1411
 *         cuGetProcAddress('cuGetProcAddress', &__cuGetProcAddress_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCoredumpGetAttribute
 *         cuGetProcAddress('cuCoredumpGetAttribute', &__cuCoredumpGetAttribute, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCoredumpGetAttributeGlobal
 *         cuGetProcAddress('cuCoredumpGetAttributeGlobal', &__cuCoredumpGetAttributeGlobal, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCoredumpGetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCoredumpGetAttribute), 0x2EEA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1411, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1413
 *         cuGetProcAddress('cuCoredumpGetAttribute', &__cuCoredumpGetAttribute, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCoredumpGetAttributeGlobal
 *         cuGetProcAddress('cuCoredumpGetAttributeGlobal', &__cuCoredumpGetAttributeGlobal, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCoredumpSetAttribute
 *         cuGetProcAddress('cuCoredumpSetAttribute', &__cuCoredumpSetAttribute, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCoredumpGetAttributeGlobal"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCoredumpGetAttributeGlobal), 0x2EEA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1413, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1415
 *         cuGetProcAddress('cuCoredumpGetAttributeGlobal', &__cuCoredumpGetAttributeGlobal, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCoredumpSetAttribute
 *         cuGetProcAddress('cuCoredumpSetAttribute', &__cuCoredumpSetAttribute, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuCoredumpSetAttributeGlobal
 *         cuGetProcAddress('cuCoredumpSetAttributeGlobal', &__cuCoredumpSetAttributeGlobal, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCoredumpSetAttribute"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCoredumpSetAttribute), 0x2EEA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1415, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1417
 *         cuGetProcAddress('cuCoredumpSetAttribute', &__cuCoredumpSetAttribute, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuCoredumpSetAttributeGlobal
 *         cuGetProcAddress('cuCoredumpSetAttributeGlobal', &__cuCoredumpSetAttributeGlobal, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGetExportTable
 *         cuGetProcAddress('cuGetExportTable', &__cuGetExportTable, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuCoredumpSetAttributeGlobal"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuCoredumpSetAttributeGlobal), 0x2EEA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1417, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1419
 *         cuGetProcAddress('cuCoredumpSetAttributeGlobal', &__cuCoredumpSetAttributeGlobal, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGetExportTable
 *         cuGetProcAddress('cuGetExportTable', &__cuGetExportTable, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuProfilerStart
 *         cuGetProcAddress('cuProfilerStart', &__cuProfilerStart, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGetExportTable"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGetExportTable), 0xBB8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1419, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1421
 *         cuGetProcAddress('cuGetExportTable', &__cuGetExportTable, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuProfilerStart
 *         cuGetProcAddress('cuProfilerStart', &__cuProfilerStart, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuProfilerStop
 *         cuGetProcAddress('cuProfilerStop', &__cuProfilerStop, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuProfilerStart"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuProfilerStart), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1421, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1423
 *         cuGetProcAddress('cuProfilerStart', &__cuProfilerStart, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuProfilerStop
 *         cuGetProcAddress('cuProfilerStop', &__cuProfilerStop, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphicsEGLRegisterImage
 *         cuGetProcAddress('cuGraphicsEGLRegisterImage', &__cuGraphicsEGLRegisterImage, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuProfilerStop"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuProfilerStop), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1423, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1425
 *         cuGetProcAddress('cuProfilerStop', &__cuProfilerStop, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphicsEGLRegisterImage
 *         cuGetProcAddress('cuGraphicsEGLRegisterImage', &__cuGraphicsEGLRegisterImage, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuEGLStreamConsumerConnect
 *         cuGetProcAddress('cuEGLStreamConsumerConnect', &__cuEGLStreamConsumerConnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsEGLRegisterImage"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsEGLRegisterImage), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1425, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1427
 *         cuGetProcAddress('cuGraphicsEGLRegisterImage', &__cuGraphicsEGLRegisterImage, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuEGLStreamConsumerConnect
 *         cuGetProcAddress('cuEGLStreamConsumerConnect', &__cuEGLStreamConsumerConnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuEGLStreamConsumerConnectWithFlags
 *         cuGetProcAddress('cuEGLStreamConsumerConnectWithFlags', &__cuEGLStreamConsumerConnectWithFlags, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEGLStreamConsumerConnect"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerConnect), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1427, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1429
 *         cuGetProcAddress('cuEGLStreamConsumerConnect', &__cuEGLStreamConsumerConnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuEGLStreamConsumerConnectWithFlags
 *         cuGetProcAddress('cuEGLStreamConsumerConnectWithFlags', &__cuEGLStreamConsumerConnectWithFlags, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuEGLStreamConsumerDisconnect
 *         cuGetProcAddress('cuEGLStreamConsumerDisconnect', &__cuEGLStreamConsumerDisconnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEGLStreamConsumerConnectWithFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerConnectWithFlags), 0x1F40, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1429, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1431
 *         cuGetProcAddress('cuEGLStreamConsumerConnectWithFlags', &__cuEGLStreamConsumerConnectWithFlags, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuEGLStreamConsumerDisconnect
 *         cuGetProcAddress('cuEGLStreamConsumerDisconnect', &__cuEGLStreamConsumerDisconnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuEGLStreamConsumerAcquireFrame
 *         cuGetProcAddress('cuEGLStreamConsumerAcquireFrame', &__cuEGLStreamConsumerAcquireFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEGLStreamConsumerDisconnect"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerDisconnect), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1431, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1433
 *         cuGetProcAddress('cuEGLStreamConsumerDisconnect', &__cuEGLStreamConsumerDisconnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuEGLStreamConsumerAcquireFrame
 *         cuGetProcAddress('cuEGLStreamConsumerAcquireFrame', &__cuEGLStreamConsumerAcquireFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuEGLStreamConsumerReleaseFrame
 *         cuGetProcAddress('cuEGLStreamConsumerReleaseFrame', &__cuEGLStreamConsumerReleaseFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEGLStreamConsumerAcquireFrame"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerAcquireFrame), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1433, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1435
 *         cuGetProcAddress('cuEGLStreamConsumerAcquireFrame', &__cuEGLStreamConsumerAcquireFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuEGLStreamConsumerReleaseFrame
 *         cuGetProcAddress('cuEGLStreamConsumerReleaseFrame', &__cuEGLStreamConsumerReleaseFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuEGLStreamProducerConnect
 *         cuGetProcAddress('cuEGLStreamProducerConnect', &__cuEGLStreamProducerConnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEGLStreamConsumerReleaseFrame"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerReleaseFrame), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1435, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1437
 *         cuGetProcAddress('cuEGLStreamConsumerReleaseFrame', &__cuEGLStreamConsumerReleaseFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuEGLStreamProducerConnect
 *         cuGetProcAddress('cuEGLStreamProducerConnect', &__cuEGLStreamProducerConnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuEGLStreamProducerDisconnect
 *         cuGetProcAddress('cuEGLStreamProducerDisconnect', &__cuEGLStreamProducerDisconnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEGLStreamProducerConnect"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerConnect), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1437, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1439
 *         cuGetProcAddress('cuEGLStreamProducerConnect', &__cuEGLStreamProducerConnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuEGLStreamProducerDisconnect
 *         cuGetProcAddress('cuEGLStreamProducerDisconnect', &__cuEGLStreamProducerDisconnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuEGLStreamProducerPresentFrame
 *         cuGetProcAddress('cuEGLStreamProducerPresentFrame', &__cuEGLStreamProducerPresentFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEGLStreamProducerDisconnect"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerDisconnect), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1439, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1441
 *         cuGetProcAddress('cuEGLStreamProducerDisconnect', &__cuEGLStreamProducerDisconnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuEGLStreamProducerPresentFrame
 *         cuGetProcAddress('cuEGLStreamProducerPresentFrame', &__cuEGLStreamProducerPresentFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuEGLStreamProducerReturnFrame
 *         cuGetProcAddress('cuEGLStreamProducerReturnFrame', &__cuEGLStreamProducerReturnFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEGLStreamProducerPresentFrame"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerPresentFrame), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1441, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1443
 *         cuGetProcAddress('cuEGLStreamProducerPresentFrame', &__cuEGLStreamProducerPresentFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuEGLStreamProducerReturnFrame
 *         cuGetProcAddress('cuEGLStreamProducerReturnFrame', &__cuEGLStreamProducerReturnFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphicsResourceGetMappedEglFrame
 *         cuGetProcAddress('cuGraphicsResourceGetMappedEglFrame', &__cuGraphicsResourceGetMappedEglFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEGLStreamProducerReturnFrame"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerReturnFrame), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1443, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1445
 *         cuGetProcAddress('cuEGLStreamProducerReturnFrame', &__cuEGLStreamProducerReturnFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphicsResourceGetMappedEglFrame
 *         cuGetProcAddress('cuGraphicsResourceGetMappedEglFrame', &__cuGraphicsResourceGetMappedEglFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuEventCreateFromEGLSync
 *         cuGetProcAddress('cuEventCreateFromEGLSync', &__cuEventCreateFromEGLSync, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsResourceGetMappedEglFrame"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceGetMappedEglFrame), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1445, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1447
 *         cuGetProcAddress('cuGraphicsResourceGetMappedEglFrame', &__cuGraphicsResourceGetMappedEglFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuEventCreateFromEGLSync
 *         cuGetProcAddress('cuEventCreateFromEGLSync', &__cuEventCreateFromEGLSync, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphicsGLRegisterBuffer
 *         cuGetProcAddress('cuGraphicsGLRegisterBuffer', &__cuGraphicsGLRegisterBuffer, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuEventCreateFromEGLSync"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuEventCreateFromEGLSync), 0x2328, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1447, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1449
 *         cuGetProcAddress('cuEventCreateFromEGLSync', &__cuEventCreateFromEGLSync, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphicsGLRegisterBuffer
 *         cuGetProcAddress('cuGraphicsGLRegisterBuffer', &__cuGraphicsGLRegisterBuffer, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphicsGLRegisterImage
 *         cuGetProcAddress('cuGraphicsGLRegisterImage', &__cuGraphicsGLRegisterImage, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsGLRegisterBuffer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsGLRegisterBuffer), 0xBB8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1449, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1451
 *         cuGetProcAddress('cuGraphicsGLRegisterBuffer', &__cuGraphicsGLRegisterBuffer, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphicsGLRegisterImage
 *         cuGetProcAddress('cuGraphicsGLRegisterImage', &__cuGraphicsGLRegisterImage, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGLGetDevices_v2
 *         cuGetProcAddress('cuGLGetDevices', &__cuGLGetDevices_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsGLRegisterImage"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsGLRegisterImage), 0xBB8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1451, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1453
 *         cuGetProcAddress('cuGraphicsGLRegisterImage', &__cuGraphicsGLRegisterImage, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGLGetDevices_v2
 *         cuGetProcAddress('cuGLGetDevices', &__cuGLGetDevices_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuVDPAUGetDevice
 *         cuGetProcAddress('cuVDPAUGetDevice', &__cuVDPAUGetDevice, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGLGetDevices"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGLGetDevices_v2), 0x17A2, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1453, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1455
 *         cuGetProcAddress('cuGLGetDevices', &__cuGLGetDevices_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuVDPAUGetDevice
 *         cuGetProcAddress('cuVDPAUGetDevice', &__cuVDPAUGetDevice, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuVDPAUCtxCreate_v2
 *         cuGetProcAddress('cuVDPAUCtxCreate', &__cuVDPAUCtxCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuVDPAUGetDevice"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuVDPAUGetDevice), 0xBC2, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1455, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1457
 *         cuGetProcAddress('cuVDPAUGetDevice', &__cuVDPAUGetDevice, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuVDPAUCtxCreate_v2
 *         cuGetProcAddress('cuVDPAUCtxCreate', &__cuVDPAUCtxCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphicsVDPAURegisterVideoSurface
 *         cuGetProcAddress('cuGraphicsVDPAURegisterVideoSurface', &__cuGraphicsVDPAURegisterVideoSurface, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuVDPAUCtxCreate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuVDPAUCtxCreate_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1457, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1459
 *         cuGetProcAddress('cuVDPAUCtxCreate', &__cuVDPAUCtxCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphicsVDPAURegisterVideoSurface
 *         cuGetProcAddress('cuGraphicsVDPAURegisterVideoSurface', &__cuGraphicsVDPAURegisterVideoSurface, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         global __cuGraphicsVDPAURegisterOutputSurface
 *         cuGetProcAddress('cuGraphicsVDPAURegisterOutputSurface', &__cuGraphicsVDPAURegisterOutputSurface, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsVDPAURegisterVideoSurface"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsVDPAURegisterVideoSurface), 0xBC2, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1459, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1461
 *         cuGetProcAddress('cuGraphicsVDPAURegisterVideoSurface', &__cuGraphicsVDPAURegisterVideoSurface, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         global __cuGraphicsVDPAURegisterOutputSurface
 *         cuGetProcAddress('cuGraphicsVDPAURegisterOutputSurface', &__cuGraphicsVDPAURegisterOutputSurface, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)             # <<<<<<<<<<<<<<
 *         return 0
 * 
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphicsVDPAURegisterOutputSurface"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsVDPAURegisterOutputSurface), 0xBC2, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1461, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1462
 *         global __cuGraphicsVDPAURegisterOutputSurface
 *         cuGetProcAddress('cuGraphicsVDPAURegisterOutputSurface', &__cuGraphicsVDPAURegisterOutputSurface, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL)
 *         return 0             # <<<<<<<<<<<<<<
 * 
 *     # Load using win32GetAddr
 */
      __pyx_r = 0;
      goto __pyx_L3_return;

      /* "cuda/_cuda/ccuda.pyx":466
 * 
 *     # Load using cuGetProcAddress if available
 *     if __cuGetProcAddress_v2 != NULL:             # <<<<<<<<<<<<<<
 *         if usePTDS:
 *             # Get all PTDS version of functions
 */
    }

    /* "cuda/_cuda/ccuda.pyx":1465
 * 
 *     # Load using win32GetAddr
 *     with gil:             # <<<<<<<<<<<<<<
 *         if usePTDS:
 *             # Get all PTDS version of functions
 */
    {
        #ifdef WITH_THREAD
        PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
        #endif
        /*try:*/ {

          /* "cuda/_cuda/ccuda.pyx":1466
 *     # Load using win32GetAddr
 *     with gil:
 *         if usePTDS:             # <<<<<<<<<<<<<<
 *             # Get all PTDS version of functions
 *             pass
 */
          __pyx_t_1 = (__pyx_v_usePTDS != 0);
          if (__pyx_t_1) {

            /* "cuda/_cuda/ccuda.pyx":1469
 *             # Get all PTDS version of functions
 *             pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy
 *                 __cuMemcpy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy_ptds')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1471
 *             try:
 *                 global __cuMemcpy
 *                 __cuMemcpy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy_ptds')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1471, __pyx_L48_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1471, __pyx_L48_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpy_ptds};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1471, __pyx_L48_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpy_ptds};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1471, __pyx_L48_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1471, __pyx_L48_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpy_ptds);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpy_ptds);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemcpy_ptds);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1471, __pyx_L48_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1471, __pyx_L48_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1469
 *             # Get all PTDS version of functions
 *             pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy
 *                 __cuMemcpy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy_ptds')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L53_try_end;
              __pyx_L48_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1472
 *                 global __cuMemcpy
 *                 __cuMemcpy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy_ptds')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L49_exception_handled;
              }
              __pyx_L49_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L53_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1474
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyPeer
 *                 __cuMemcpyPeer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyPeer_ptds')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1476
 *             try:
 *                 global __cuMemcpyPeer
 *                 __cuMemcpyPeer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyPeer_ptds')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1476, __pyx_L54_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1476, __pyx_L54_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpyPeer_ptds};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1476, __pyx_L54_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpyPeer_ptds};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1476, __pyx_L54_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1476, __pyx_L54_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyPeer_ptds);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyPeer_ptds);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemcpyPeer_ptds);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1476, __pyx_L54_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1476, __pyx_L54_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyPeer = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1474
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyPeer
 *                 __cuMemcpyPeer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyPeer_ptds')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L59_try_end;
              __pyx_L54_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1477
 *                 global __cuMemcpyPeer
 *                 __cuMemcpyPeer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyPeer_ptds')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L55_exception_handled;
              }
              __pyx_L55_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L59_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1479
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyHtoD_v2
 *                 __cuMemcpyHtoD_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoD_v2_ptds')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1481
 *             try:
 *                 global __cuMemcpyHtoD_v2
 *                 __cuMemcpyHtoD_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoD_v2_ptds')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1481, __pyx_L60_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1481, __pyx_L60_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpyHtoD_v2_ptds};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1481, __pyx_L60_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpyHtoD_v2_ptds};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1481, __pyx_L60_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1481, __pyx_L60_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyHtoD_v2_ptds);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyHtoD_v2_ptds);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemcpyHtoD_v2_ptds);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1481, __pyx_L60_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1481, __pyx_L60_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoD_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1479
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyHtoD_v2
 *                 __cuMemcpyHtoD_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoD_v2_ptds')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L65_try_end;
              __pyx_L60_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1482
 *                 global __cuMemcpyHtoD_v2
 *                 __cuMemcpyHtoD_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoD_v2_ptds')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L61_exception_handled;
              }
              __pyx_L61_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L65_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1484
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyDtoH_v2
 *                 __cuMemcpyDtoH_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoH_v2_ptds')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1486
 *             try:
 *                 global __cuMemcpyDtoH_v2
 *                 __cuMemcpyDtoH_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoH_v2_ptds')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1486, __pyx_L66_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1486, __pyx_L66_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpyDtoH_v2_ptds};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1486, __pyx_L66_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpyDtoH_v2_ptds};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1486, __pyx_L66_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1486, __pyx_L66_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyDtoH_v2_ptds);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyDtoH_v2_ptds);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemcpyDtoH_v2_ptds);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1486, __pyx_L66_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1486, __pyx_L66_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoH_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1484
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyDtoH_v2
 *                 __cuMemcpyDtoH_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoH_v2_ptds')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L71_try_end;
              __pyx_L66_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1487
 *                 global __cuMemcpyDtoH_v2
 *                 __cuMemcpyDtoH_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoH_v2_ptds')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L67_exception_handled;
              }
              __pyx_L67_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L71_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1489
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyDtoD_v2
 *                 __cuMemcpyDtoD_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoD_v2_ptds')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1491
 *             try:
 *                 global __cuMemcpyDtoD_v2
 *                 __cuMemcpyDtoD_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoD_v2_ptds')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1491, __pyx_L72_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1491, __pyx_L72_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpyDtoD_v2_ptds};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1491, __pyx_L72_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpyDtoD_v2_ptds};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1491, __pyx_L72_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1491, __pyx_L72_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyDtoD_v2_ptds);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyDtoD_v2_ptds);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemcpyDtoD_v2_ptds);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1491, __pyx_L72_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1491, __pyx_L72_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoD_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1489
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyDtoD_v2
 *                 __cuMemcpyDtoD_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoD_v2_ptds')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L77_try_end;
              __pyx_L72_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1492
 *                 global __cuMemcpyDtoD_v2
 *                 __cuMemcpyDtoD_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoD_v2_ptds')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L73_exception_handled;
              }
              __pyx_L73_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L77_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1494
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyDtoA_v2
 *                 __cuMemcpyDtoA_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoA_v2_ptds')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1496
 *             try:
 *                 global __cuMemcpyDtoA_v2
 *                 __cuMemcpyDtoA_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoA_v2_ptds')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1496, __pyx_L78_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1496, __pyx_L78_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpyDtoA_v2_ptds};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1496, __pyx_L78_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpyDtoA_v2_ptds};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1496, __pyx_L78_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1496, __pyx_L78_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyDtoA_v2_ptds);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyDtoA_v2_ptds);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemcpyDtoA_v2_ptds);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1496, __pyx_L78_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1496, __pyx_L78_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoA_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1494
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyDtoA_v2
 *                 __cuMemcpyDtoA_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoA_v2_ptds')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L83_try_end;
              __pyx_L78_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1497
 *                 global __cuMemcpyDtoA_v2
 *                 __cuMemcpyDtoA_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoA_v2_ptds')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L79_exception_handled;
              }
              __pyx_L79_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L83_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1499
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyAtoD_v2
 *                 __cuMemcpyAtoD_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoD_v2_ptds')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1501
 *             try:
 *                 global __cuMemcpyAtoD_v2
 *                 __cuMemcpyAtoD_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoD_v2_ptds')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1501, __pyx_L84_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1501, __pyx_L84_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpyAtoD_v2_ptds};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1501, __pyx_L84_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpyAtoD_v2_ptds};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1501, __pyx_L84_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1501, __pyx_L84_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyAtoD_v2_ptds);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyAtoD_v2_ptds);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemcpyAtoD_v2_ptds);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1501, __pyx_L84_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1501, __pyx_L84_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoD_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1499
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyAtoD_v2
 *                 __cuMemcpyAtoD_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoD_v2_ptds')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L89_try_end;
              __pyx_L84_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1502
 *                 global __cuMemcpyAtoD_v2
 *                 __cuMemcpyAtoD_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoD_v2_ptds')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L85_exception_handled;
              }
              __pyx_L85_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L89_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1504
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyHtoA_v2
 *                 __cuMemcpyHtoA_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoA_v2_ptds')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1506
 *             try:
 *                 global __cuMemcpyHtoA_v2
 *                 __cuMemcpyHtoA_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoA_v2_ptds')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1506, __pyx_L90_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1506, __pyx_L90_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpyHtoA_v2_ptds};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1506, __pyx_L90_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpyHtoA_v2_ptds};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1506, __pyx_L90_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1506, __pyx_L90_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyHtoA_v2_ptds);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyHtoA_v2_ptds);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemcpyHtoA_v2_ptds);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1506, __pyx_L90_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1506, __pyx_L90_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoA_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1504
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyHtoA_v2
 *                 __cuMemcpyHtoA_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoA_v2_ptds')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L95_try_end;
              __pyx_L90_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1507
 *                 global __cuMemcpyHtoA_v2
 *                 __cuMemcpyHtoA_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoA_v2_ptds')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L91_exception_handled;
              }
              __pyx_L91_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L95_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1509
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyAtoH_v2
 *                 __cuMemcpyAtoH_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoH_v2_ptds')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1511
 *             try:
 *                 global __cuMemcpyAtoH_v2
 *                 __cuMemcpyAtoH_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoH_v2_ptds')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1511, __pyx_L96_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1511, __pyx_L96_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpyAtoH_v2_ptds};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1511, __pyx_L96_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpyAtoH_v2_ptds};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1511, __pyx_L96_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1511, __pyx_L96_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyAtoH_v2_ptds);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyAtoH_v2_ptds);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemcpyAtoH_v2_ptds);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1511, __pyx_L96_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1511, __pyx_L96_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoH_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1509
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyAtoH_v2
 *                 __cuMemcpyAtoH_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoH_v2_ptds')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L101_try_end;
              __pyx_L96_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1512
 *                 global __cuMemcpyAtoH_v2
 *                 __cuMemcpyAtoH_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoH_v2_ptds')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L97_exception_handled;
              }
              __pyx_L97_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L101_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1514
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyAtoA_v2
 *                 __cuMemcpyAtoA_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoA_v2_ptds')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1516
 *             try:
 *                 global __cuMemcpyAtoA_v2
 *                 __cuMemcpyAtoA_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoA_v2_ptds')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1516, __pyx_L102_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1516, __pyx_L102_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpyAtoA_v2_ptds};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1516, __pyx_L102_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpyAtoA_v2_ptds};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1516, __pyx_L102_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1516, __pyx_L102_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyAtoA_v2_ptds);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyAtoA_v2_ptds);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemcpyAtoA_v2_ptds);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1516, __pyx_L102_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1516, __pyx_L102_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoA_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1514
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyAtoA_v2
 *                 __cuMemcpyAtoA_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoA_v2_ptds')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L107_try_end;
              __pyx_L102_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1517
 *                 global __cuMemcpyAtoA_v2
 *                 __cuMemcpyAtoA_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoA_v2_ptds')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L103_exception_handled;
              }
              __pyx_L103_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L107_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1519
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy2D_v2
 *                 __cuMemcpy2D_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy2D_v2_ptds')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1521
 *             try:
 *                 global __cuMemcpy2D_v2
 *                 __cuMemcpy2D_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy2D_v2_ptds')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1521, __pyx_L108_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1521, __pyx_L108_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpy2D_v2_ptds};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1521, __pyx_L108_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpy2D_v2_ptds};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1521, __pyx_L108_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1521, __pyx_L108_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpy2D_v2_ptds);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpy2D_v2_ptds);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemcpy2D_v2_ptds);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1521, __pyx_L108_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1521, __pyx_L108_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2D_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1519
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy2D_v2
 *                 __cuMemcpy2D_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy2D_v2_ptds')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L113_try_end;
              __pyx_L108_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1522
 *                 global __cuMemcpy2D_v2
 *                 __cuMemcpy2D_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy2D_v2_ptds')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L109_exception_handled;
              }
              __pyx_L109_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L113_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1524
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy2DUnaligned_v2
 *                 __cuMemcpy2DUnaligned_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy2DUnaligned_v2_ptds')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1526
 *             try:
 *                 global __cuMemcpy2DUnaligned_v2
 *                 __cuMemcpy2DUnaligned_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy2DUnaligned_v2_ptds')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1526, __pyx_L114_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1526, __pyx_L114_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpy2DUnaligned_v2_ptds};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1526, __pyx_L114_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpy2DUnaligned_v2_ptds};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1526, __pyx_L114_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1526, __pyx_L114_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpy2DUnaligned_v2_ptds);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpy2DUnaligned_v2_ptds);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemcpy2DUnaligned_v2_ptds);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1526, __pyx_L114_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1526, __pyx_L114_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2DUnaligned_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1524
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy2DUnaligned_v2
 *                 __cuMemcpy2DUnaligned_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy2DUnaligned_v2_ptds')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L119_try_end;
              __pyx_L114_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1527
 *                 global __cuMemcpy2DUnaligned_v2
 *                 __cuMemcpy2DUnaligned_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy2DUnaligned_v2_ptds')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L115_exception_handled;
              }
              __pyx_L115_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L119_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1529
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy3D_v2
 *                 __cuMemcpy3D_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3D_v2_ptds')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1531
 *             try:
 *                 global __cuMemcpy3D_v2
 *                 __cuMemcpy3D_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3D_v2_ptds')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1531, __pyx_L120_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1531, __pyx_L120_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpy3D_v2_ptds};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1531, __pyx_L120_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpy3D_v2_ptds};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1531, __pyx_L120_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1531, __pyx_L120_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpy3D_v2_ptds);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpy3D_v2_ptds);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemcpy3D_v2_ptds);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1531, __pyx_L120_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1531, __pyx_L120_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3D_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1529
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy3D_v2
 *                 __cuMemcpy3D_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3D_v2_ptds')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L125_try_end;
              __pyx_L120_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1532
 *                 global __cuMemcpy3D_v2
 *                 __cuMemcpy3D_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3D_v2_ptds')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L121_exception_handled;
              }
              __pyx_L121_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L125_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1534
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy3DPeer
 *                 __cuMemcpy3DPeer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DPeer_ptds')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1536
 *             try:
 *                 global __cuMemcpy3DPeer
 *                 __cuMemcpy3DPeer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DPeer_ptds')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1536, __pyx_L126_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1536, __pyx_L126_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpy3DPeer_ptds};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1536, __pyx_L126_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpy3DPeer_ptds};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1536, __pyx_L126_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1536, __pyx_L126_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpy3DPeer_ptds);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpy3DPeer_ptds);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemcpy3DPeer_ptds);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1536, __pyx_L126_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1536, __pyx_L126_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DPeer = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1534
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy3DPeer
 *                 __cuMemcpy3DPeer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DPeer_ptds')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L131_try_end;
              __pyx_L126_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1537
 *                 global __cuMemcpy3DPeer
 *                 __cuMemcpy3DPeer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DPeer_ptds')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L127_exception_handled;
              }
              __pyx_L127_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L131_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1539
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyAsync
 *                 __cuMemcpyAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAsync_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1541
 *             try:
 *                 global __cuMemcpyAsync
 *                 __cuMemcpyAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAsync_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1541, __pyx_L132_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1541, __pyx_L132_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpyAsync_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1541, __pyx_L132_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpyAsync_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1541, __pyx_L132_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1541, __pyx_L132_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyAsync_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyAsync_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemcpyAsync_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1541, __pyx_L132_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1541, __pyx_L132_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAsync = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1539
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyAsync
 *                 __cuMemcpyAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAsync_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L137_try_end;
              __pyx_L132_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1542
 *                 global __cuMemcpyAsync
 *                 __cuMemcpyAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAsync_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L133_exception_handled;
              }
              __pyx_L133_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L137_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1544
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyPeerAsync
 *                 __cuMemcpyPeerAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyPeerAsync_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1546
 *             try:
 *                 global __cuMemcpyPeerAsync
 *                 __cuMemcpyPeerAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyPeerAsync_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1546, __pyx_L138_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1546, __pyx_L138_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpyPeerAsync_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1546, __pyx_L138_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpyPeerAsync_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1546, __pyx_L138_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1546, __pyx_L138_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyPeerAsync_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyPeerAsync_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemcpyPeerAsync_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1546, __pyx_L138_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1546, __pyx_L138_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyPeerAsync = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1544
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyPeerAsync
 *                 __cuMemcpyPeerAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyPeerAsync_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L143_try_end;
              __pyx_L138_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1547
 *                 global __cuMemcpyPeerAsync
 *                 __cuMemcpyPeerAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyPeerAsync_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L139_exception_handled;
              }
              __pyx_L139_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L143_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1549
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyHtoDAsync_v2
 *                 __cuMemcpyHtoDAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoDAsync_v2_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1551
 *             try:
 *                 global __cuMemcpyHtoDAsync_v2
 *                 __cuMemcpyHtoDAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoDAsync_v2_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1551, __pyx_L144_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1551, __pyx_L144_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpyHtoDAsync_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1551, __pyx_L144_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpyHtoDAsync_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1551, __pyx_L144_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1551, __pyx_L144_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyHtoDAsync_v2_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyHtoDAsync_v2_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemcpyHtoDAsync_v2_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1551, __pyx_L144_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1551, __pyx_L144_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoDAsync_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1549
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyHtoDAsync_v2
 *                 __cuMemcpyHtoDAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoDAsync_v2_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L149_try_end;
              __pyx_L144_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1552
 *                 global __cuMemcpyHtoDAsync_v2
 *                 __cuMemcpyHtoDAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoDAsync_v2_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L145_exception_handled;
              }
              __pyx_L145_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L149_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1554
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyDtoHAsync_v2
 *                 __cuMemcpyDtoHAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoHAsync_v2_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1556
 *             try:
 *                 global __cuMemcpyDtoHAsync_v2
 *                 __cuMemcpyDtoHAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoHAsync_v2_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1556, __pyx_L150_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1556, __pyx_L150_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpyDtoHAsync_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1556, __pyx_L150_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpyDtoHAsync_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1556, __pyx_L150_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1556, __pyx_L150_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyDtoHAsync_v2_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyDtoHAsync_v2_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemcpyDtoHAsync_v2_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1556, __pyx_L150_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1556, __pyx_L150_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoHAsync_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1554
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyDtoHAsync_v2
 *                 __cuMemcpyDtoHAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoHAsync_v2_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L155_try_end;
              __pyx_L150_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1557
 *                 global __cuMemcpyDtoHAsync_v2
 *                 __cuMemcpyDtoHAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoHAsync_v2_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L151_exception_handled;
              }
              __pyx_L151_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L155_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1559
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyDtoDAsync_v2
 *                 __cuMemcpyDtoDAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoDAsync_v2_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1561
 *             try:
 *                 global __cuMemcpyDtoDAsync_v2
 *                 __cuMemcpyDtoDAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoDAsync_v2_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1561, __pyx_L156_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1561, __pyx_L156_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpyDtoDAsync_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1561, __pyx_L156_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpyDtoDAsync_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1561, __pyx_L156_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1561, __pyx_L156_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyDtoDAsync_v2_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyDtoDAsync_v2_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemcpyDtoDAsync_v2_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1561, __pyx_L156_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1561, __pyx_L156_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoDAsync_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1559
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyDtoDAsync_v2
 *                 __cuMemcpyDtoDAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoDAsync_v2_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L161_try_end;
              __pyx_L156_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1562
 *                 global __cuMemcpyDtoDAsync_v2
 *                 __cuMemcpyDtoDAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoDAsync_v2_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L157_exception_handled;
              }
              __pyx_L157_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L161_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1564
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyHtoAAsync_v2
 *                 __cuMemcpyHtoAAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoAAsync_v2_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1566
 *             try:
 *                 global __cuMemcpyHtoAAsync_v2
 *                 __cuMemcpyHtoAAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoAAsync_v2_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1566, __pyx_L162_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1566, __pyx_L162_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpyHtoAAsync_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1566, __pyx_L162_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpyHtoAAsync_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1566, __pyx_L162_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1566, __pyx_L162_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyHtoAAsync_v2_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyHtoAAsync_v2_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemcpyHtoAAsync_v2_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1566, __pyx_L162_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1566, __pyx_L162_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoAAsync_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1564
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyHtoAAsync_v2
 *                 __cuMemcpyHtoAAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoAAsync_v2_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L167_try_end;
              __pyx_L162_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1567
 *                 global __cuMemcpyHtoAAsync_v2
 *                 __cuMemcpyHtoAAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoAAsync_v2_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L163_exception_handled;
              }
              __pyx_L163_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L167_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1569
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyAtoHAsync_v2
 *                 __cuMemcpyAtoHAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoHAsync_v2_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1571
 *             try:
 *                 global __cuMemcpyAtoHAsync_v2
 *                 __cuMemcpyAtoHAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoHAsync_v2_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1571, __pyx_L168_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1571, __pyx_L168_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpyAtoHAsync_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1571, __pyx_L168_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpyAtoHAsync_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1571, __pyx_L168_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1571, __pyx_L168_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyAtoHAsync_v2_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyAtoHAsync_v2_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemcpyAtoHAsync_v2_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1571, __pyx_L168_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1571, __pyx_L168_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoHAsync_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1569
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyAtoHAsync_v2
 *                 __cuMemcpyAtoHAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoHAsync_v2_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L173_try_end;
              __pyx_L168_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1572
 *                 global __cuMemcpyAtoHAsync_v2
 *                 __cuMemcpyAtoHAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoHAsync_v2_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L169_exception_handled;
              }
              __pyx_L169_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L173_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1574
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy2DAsync_v2
 *                 __cuMemcpy2DAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy2DAsync_v2_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1576
 *             try:
 *                 global __cuMemcpy2DAsync_v2
 *                 __cuMemcpy2DAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy2DAsync_v2_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1576, __pyx_L174_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1576, __pyx_L174_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpy2DAsync_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1576, __pyx_L174_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpy2DAsync_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1576, __pyx_L174_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1576, __pyx_L174_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpy2DAsync_v2_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpy2DAsync_v2_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemcpy2DAsync_v2_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1576, __pyx_L174_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1576, __pyx_L174_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2DAsync_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1574
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy2DAsync_v2
 *                 __cuMemcpy2DAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy2DAsync_v2_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L179_try_end;
              __pyx_L174_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1577
 *                 global __cuMemcpy2DAsync_v2
 *                 __cuMemcpy2DAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy2DAsync_v2_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L175_exception_handled;
              }
              __pyx_L175_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L179_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1579
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy3DAsync_v2
 *                 __cuMemcpy3DAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DAsync_v2_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1581
 *             try:
 *                 global __cuMemcpy3DAsync_v2
 *                 __cuMemcpy3DAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DAsync_v2_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1581, __pyx_L180_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1581, __pyx_L180_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpy3DAsync_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1581, __pyx_L180_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpy3DAsync_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1581, __pyx_L180_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1581, __pyx_L180_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpy3DAsync_v2_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpy3DAsync_v2_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemcpy3DAsync_v2_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1581, __pyx_L180_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1581, __pyx_L180_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DAsync_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1579
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy3DAsync_v2
 *                 __cuMemcpy3DAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DAsync_v2_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L185_try_end;
              __pyx_L180_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1582
 *                 global __cuMemcpy3DAsync_v2
 *                 __cuMemcpy3DAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DAsync_v2_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L181_exception_handled;
              }
              __pyx_L181_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L185_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1584
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy3DPeerAsync
 *                 __cuMemcpy3DPeerAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DPeerAsync_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1586
 *             try:
 *                 global __cuMemcpy3DPeerAsync
 *                 __cuMemcpy3DPeerAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DPeerAsync_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1586, __pyx_L186_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1586, __pyx_L186_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpy3DPeerAsync_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1586, __pyx_L186_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpy3DPeerAsync_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1586, __pyx_L186_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1586, __pyx_L186_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpy3DPeerAsync_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpy3DPeerAsync_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemcpy3DPeerAsync_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1586, __pyx_L186_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1586, __pyx_L186_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DPeerAsync = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1584
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy3DPeerAsync
 *                 __cuMemcpy3DPeerAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DPeerAsync_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L191_try_end;
              __pyx_L186_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1587
 *                 global __cuMemcpy3DPeerAsync
 *                 __cuMemcpy3DPeerAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DPeerAsync_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L187_exception_handled;
              }
              __pyx_L187_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L191_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1589
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD8_v2
 *                 __cuMemsetD8_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD8_v2_ptds')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1591
 *             try:
 *                 global __cuMemsetD8_v2
 *                 __cuMemsetD8_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD8_v2_ptds')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1591, __pyx_L192_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1591, __pyx_L192_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemsetD8_v2_ptds};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1591, __pyx_L192_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemsetD8_v2_ptds};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1591, __pyx_L192_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1591, __pyx_L192_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemsetD8_v2_ptds);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemsetD8_v2_ptds);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemsetD8_v2_ptds);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1591, __pyx_L192_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1591, __pyx_L192_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD8_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1589
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD8_v2
 *                 __cuMemsetD8_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD8_v2_ptds')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L197_try_end;
              __pyx_L192_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1592
 *                 global __cuMemsetD8_v2
 *                 __cuMemsetD8_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD8_v2_ptds')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L193_exception_handled;
              }
              __pyx_L193_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L197_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1594
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD16_v2
 *                 __cuMemsetD16_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD16_v2_ptds')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1596
 *             try:
 *                 global __cuMemsetD16_v2
 *                 __cuMemsetD16_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD16_v2_ptds')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1596, __pyx_L198_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1596, __pyx_L198_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemsetD16_v2_ptds};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1596, __pyx_L198_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemsetD16_v2_ptds};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1596, __pyx_L198_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1596, __pyx_L198_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemsetD16_v2_ptds);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemsetD16_v2_ptds);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemsetD16_v2_ptds);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1596, __pyx_L198_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1596, __pyx_L198_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD16_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1594
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD16_v2
 *                 __cuMemsetD16_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD16_v2_ptds')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L203_try_end;
              __pyx_L198_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1597
 *                 global __cuMemsetD16_v2
 *                 __cuMemsetD16_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD16_v2_ptds')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L199_exception_handled;
              }
              __pyx_L199_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L203_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1599
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD32_v2
 *                 __cuMemsetD32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD32_v2_ptds')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1601
 *             try:
 *                 global __cuMemsetD32_v2
 *                 __cuMemsetD32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD32_v2_ptds')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1601, __pyx_L204_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1601, __pyx_L204_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemsetD32_v2_ptds};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1601, __pyx_L204_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemsetD32_v2_ptds};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1601, __pyx_L204_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1601, __pyx_L204_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemsetD32_v2_ptds);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemsetD32_v2_ptds);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemsetD32_v2_ptds);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1601, __pyx_L204_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1601, __pyx_L204_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD32_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1599
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD32_v2
 *                 __cuMemsetD32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD32_v2_ptds')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L209_try_end;
              __pyx_L204_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1602
 *                 global __cuMemsetD32_v2
 *                 __cuMemsetD32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD32_v2_ptds')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L205_exception_handled;
              }
              __pyx_L205_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L209_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1604
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D8_v2
 *                 __cuMemsetD2D8_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D8_v2_ptds')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1606
 *             try:
 *                 global __cuMemsetD2D8_v2
 *                 __cuMemsetD2D8_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D8_v2_ptds')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1606, __pyx_L210_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1606, __pyx_L210_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemsetD2D8_v2_ptds};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1606, __pyx_L210_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemsetD2D8_v2_ptds};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1606, __pyx_L210_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1606, __pyx_L210_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemsetD2D8_v2_ptds);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemsetD2D8_v2_ptds);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemsetD2D8_v2_ptds);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1606, __pyx_L210_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1606, __pyx_L210_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D8_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1604
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D8_v2
 *                 __cuMemsetD2D8_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D8_v2_ptds')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L215_try_end;
              __pyx_L210_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1607
 *                 global __cuMemsetD2D8_v2
 *                 __cuMemsetD2D8_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D8_v2_ptds')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L211_exception_handled;
              }
              __pyx_L211_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L215_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1609
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D16_v2
 *                 __cuMemsetD2D16_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D16_v2_ptds')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1611
 *             try:
 *                 global __cuMemsetD2D16_v2
 *                 __cuMemsetD2D16_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D16_v2_ptds')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1611, __pyx_L216_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1611, __pyx_L216_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemsetD2D16_v2_ptds};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1611, __pyx_L216_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemsetD2D16_v2_ptds};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1611, __pyx_L216_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1611, __pyx_L216_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemsetD2D16_v2_ptds);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemsetD2D16_v2_ptds);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemsetD2D16_v2_ptds);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1611, __pyx_L216_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1611, __pyx_L216_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D16_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1609
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D16_v2
 *                 __cuMemsetD2D16_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D16_v2_ptds')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L221_try_end;
              __pyx_L216_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1612
 *                 global __cuMemsetD2D16_v2
 *                 __cuMemsetD2D16_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D16_v2_ptds')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L217_exception_handled;
              }
              __pyx_L217_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L221_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1614
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D32_v2
 *                 __cuMemsetD2D32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D32_v2_ptds')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1616
 *             try:
 *                 global __cuMemsetD2D32_v2
 *                 __cuMemsetD2D32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D32_v2_ptds')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1616, __pyx_L222_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1616, __pyx_L222_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemsetD2D32_v2_ptds};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1616, __pyx_L222_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemsetD2D32_v2_ptds};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1616, __pyx_L222_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1616, __pyx_L222_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemsetD2D32_v2_ptds);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemsetD2D32_v2_ptds);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemsetD2D32_v2_ptds);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1616, __pyx_L222_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1616, __pyx_L222_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D32_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1614
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D32_v2
 *                 __cuMemsetD2D32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D32_v2_ptds')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L227_try_end;
              __pyx_L222_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1617
 *                 global __cuMemsetD2D32_v2
 *                 __cuMemsetD2D32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D32_v2_ptds')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L223_exception_handled;
              }
              __pyx_L223_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L227_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1619
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD8Async
 *                 __cuMemsetD8Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD8Async_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1621
 *             try:
 *                 global __cuMemsetD8Async
 *                 __cuMemsetD8Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD8Async_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1621, __pyx_L228_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1621, __pyx_L228_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemsetD8Async_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1621, __pyx_L228_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemsetD8Async_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1621, __pyx_L228_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1621, __pyx_L228_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemsetD8Async_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemsetD8Async_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemsetD8Async_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1621, __pyx_L228_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1621, __pyx_L228_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD8Async = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1619
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD8Async
 *                 __cuMemsetD8Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD8Async_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L233_try_end;
              __pyx_L228_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1622
 *                 global __cuMemsetD8Async
 *                 __cuMemsetD8Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD8Async_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L229_exception_handled;
              }
              __pyx_L229_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L233_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1624
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD16Async
 *                 __cuMemsetD16Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD16Async_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1626
 *             try:
 *                 global __cuMemsetD16Async
 *                 __cuMemsetD16Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD16Async_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1626, __pyx_L234_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1626, __pyx_L234_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemsetD16Async_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1626, __pyx_L234_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemsetD16Async_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1626, __pyx_L234_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1626, __pyx_L234_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemsetD16Async_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemsetD16Async_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemsetD16Async_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1626, __pyx_L234_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1626, __pyx_L234_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD16Async = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1624
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD16Async
 *                 __cuMemsetD16Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD16Async_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L239_try_end;
              __pyx_L234_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1627
 *                 global __cuMemsetD16Async
 *                 __cuMemsetD16Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD16Async_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L235_exception_handled;
              }
              __pyx_L235_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L239_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1629
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD32Async
 *                 __cuMemsetD32Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD32Async_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1631
 *             try:
 *                 global __cuMemsetD32Async
 *                 __cuMemsetD32Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD32Async_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1631, __pyx_L240_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1631, __pyx_L240_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemsetD32Async_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1631, __pyx_L240_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemsetD32Async_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1631, __pyx_L240_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1631, __pyx_L240_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemsetD32Async_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemsetD32Async_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemsetD32Async_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1631, __pyx_L240_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1631, __pyx_L240_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD32Async = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1629
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD32Async
 *                 __cuMemsetD32Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD32Async_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L245_try_end;
              __pyx_L240_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1632
 *                 global __cuMemsetD32Async
 *                 __cuMemsetD32Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD32Async_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L241_exception_handled;
              }
              __pyx_L241_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L245_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1634
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D8Async
 *                 __cuMemsetD2D8Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D8Async_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1636
 *             try:
 *                 global __cuMemsetD2D8Async
 *                 __cuMemsetD2D8Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D8Async_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1636, __pyx_L246_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1636, __pyx_L246_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemsetD2D8Async_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1636, __pyx_L246_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemsetD2D8Async_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1636, __pyx_L246_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1636, __pyx_L246_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemsetD2D8Async_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemsetD2D8Async_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemsetD2D8Async_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1636, __pyx_L246_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1636, __pyx_L246_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D8Async = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1634
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D8Async
 *                 __cuMemsetD2D8Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D8Async_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L251_try_end;
              __pyx_L246_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1637
 *                 global __cuMemsetD2D8Async
 *                 __cuMemsetD2D8Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D8Async_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L247_exception_handled;
              }
              __pyx_L247_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L251_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1639
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D16Async
 *                 __cuMemsetD2D16Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D16Async_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1641
 *             try:
 *                 global __cuMemsetD2D16Async
 *                 __cuMemsetD2D16Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D16Async_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1641, __pyx_L252_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1641, __pyx_L252_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemsetD2D16Async_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1641, __pyx_L252_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemsetD2D16Async_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1641, __pyx_L252_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1641, __pyx_L252_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemsetD2D16Async_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemsetD2D16Async_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemsetD2D16Async_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1641, __pyx_L252_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1641, __pyx_L252_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D16Async = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1639
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D16Async
 *                 __cuMemsetD2D16Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D16Async_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L257_try_end;
              __pyx_L252_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1642
 *                 global __cuMemsetD2D16Async
 *                 __cuMemsetD2D16Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D16Async_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L253_exception_handled;
              }
              __pyx_L253_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L257_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1644
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D32Async
 *                 __cuMemsetD2D32Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D32Async_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1646
 *             try:
 *                 global __cuMemsetD2D32Async
 *                 __cuMemsetD2D32Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D32Async_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1646, __pyx_L258_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1646, __pyx_L258_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemsetD2D32Async_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1646, __pyx_L258_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemsetD2D32Async_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1646, __pyx_L258_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1646, __pyx_L258_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemsetD2D32Async_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemsetD2D32Async_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemsetD2D32Async_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1646, __pyx_L258_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1646, __pyx_L258_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D32Async = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1644
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D32Async
 *                 __cuMemsetD2D32Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D32Async_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L263_try_end;
              __pyx_L258_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1647
 *                 global __cuMemsetD2D32Async
 *                 __cuMemsetD2D32Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D32Async_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L259_exception_handled;
              }
              __pyx_L259_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L263_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1649
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemMapArrayAsync
 *                 __cuMemMapArrayAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemMapArrayAsync_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1651
 *             try:
 *                 global __cuMemMapArrayAsync
 *                 __cuMemMapArrayAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemMapArrayAsync_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1651, __pyx_L264_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1651, __pyx_L264_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemMapArrayAsync_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1651, __pyx_L264_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemMapArrayAsync_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1651, __pyx_L264_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1651, __pyx_L264_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemMapArrayAsync_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemMapArrayAsync_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemMapArrayAsync_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1651, __pyx_L264_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1651, __pyx_L264_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemMapArrayAsync = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1649
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemMapArrayAsync
 *                 __cuMemMapArrayAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemMapArrayAsync_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L269_try_end;
              __pyx_L264_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1652
 *                 global __cuMemMapArrayAsync
 *                 __cuMemMapArrayAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemMapArrayAsync_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L265_exception_handled;
              }
              __pyx_L265_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L269_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1654
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemFreeAsync
 *                 __cuMemFreeAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemFreeAsync_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1656
 *             try:
 *                 global __cuMemFreeAsync
 *                 __cuMemFreeAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemFreeAsync_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1656, __pyx_L270_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1656, __pyx_L270_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemFreeAsync_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1656, __pyx_L270_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemFreeAsync_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1656, __pyx_L270_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1656, __pyx_L270_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemFreeAsync_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemFreeAsync_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemFreeAsync_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1656, __pyx_L270_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1656, __pyx_L270_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemFreeAsync = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1654
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemFreeAsync
 *                 __cuMemFreeAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemFreeAsync_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L275_try_end;
              __pyx_L270_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1657
 *                 global __cuMemFreeAsync
 *                 __cuMemFreeAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemFreeAsync_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L271_exception_handled;
              }
              __pyx_L271_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L275_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1659
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemAllocAsync
 *                 __cuMemAllocAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocAsync_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1661
 *             try:
 *                 global __cuMemAllocAsync
 *                 __cuMemAllocAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocAsync_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1661, __pyx_L276_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1661, __pyx_L276_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemAllocAsync_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1661, __pyx_L276_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemAllocAsync_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1661, __pyx_L276_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1661, __pyx_L276_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemAllocAsync_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemAllocAsync_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemAllocAsync_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1661, __pyx_L276_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1661, __pyx_L276_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocAsync = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1659
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemAllocAsync
 *                 __cuMemAllocAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocAsync_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L281_try_end;
              __pyx_L276_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1662
 *                 global __cuMemAllocAsync
 *                 __cuMemAllocAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocAsync_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L277_exception_handled;
              }
              __pyx_L277_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L281_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1664
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemAllocFromPoolAsync
 *                 __cuMemAllocFromPoolAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocFromPoolAsync_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1666
 *             try:
 *                 global __cuMemAllocFromPoolAsync
 *                 __cuMemAllocFromPoolAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocFromPoolAsync_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1666, __pyx_L282_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1666, __pyx_L282_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemAllocFromPoolAsync_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1666, __pyx_L282_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemAllocFromPoolAsync_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1666, __pyx_L282_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1666, __pyx_L282_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemAllocFromPoolAsync_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemAllocFromPoolAsync_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemAllocFromPoolAsync_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1666, __pyx_L282_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1666, __pyx_L282_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocFromPoolAsync = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1664
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemAllocFromPoolAsync
 *                 __cuMemAllocFromPoolAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocFromPoolAsync_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L287_try_end;
              __pyx_L282_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1667
 *                 global __cuMemAllocFromPoolAsync
 *                 __cuMemAllocFromPoolAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocFromPoolAsync_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L283_exception_handled;
              }
              __pyx_L283_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L287_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1669
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemPrefetchAsync
 *                 __cuMemPrefetchAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPrefetchAsync_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1671
 *             try:
 *                 global __cuMemPrefetchAsync
 *                 __cuMemPrefetchAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPrefetchAsync_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1671, __pyx_L288_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1671, __pyx_L288_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemPrefetchAsync_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1671, __pyx_L288_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemPrefetchAsync_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1671, __pyx_L288_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1671, __pyx_L288_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemPrefetchAsync_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemPrefetchAsync_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemPrefetchAsync_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1671, __pyx_L288_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1671, __pyx_L288_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemPrefetchAsync = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1669
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemPrefetchAsync
 *                 __cuMemPrefetchAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPrefetchAsync_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L293_try_end;
              __pyx_L288_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1672
 *                 global __cuMemPrefetchAsync
 *                 __cuMemPrefetchAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPrefetchAsync_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L289_exception_handled;
              }
              __pyx_L289_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L293_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1674
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemPrefetchAsync_v2
 *                 __cuMemPrefetchAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPrefetchAsync_v2_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1676
 *             try:
 *                 global __cuMemPrefetchAsync_v2
 *                 __cuMemPrefetchAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPrefetchAsync_v2_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1676, __pyx_L294_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1676, __pyx_L294_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemPrefetchAsync_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1676, __pyx_L294_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemPrefetchAsync_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1676, __pyx_L294_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1676, __pyx_L294_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemPrefetchAsync_v2_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemPrefetchAsync_v2_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemPrefetchAsync_v2_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1676, __pyx_L294_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1676, __pyx_L294_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemPrefetchAsync_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1674
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemPrefetchAsync_v2
 *                 __cuMemPrefetchAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPrefetchAsync_v2_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L299_try_end;
              __pyx_L294_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1677
 *                 global __cuMemPrefetchAsync_v2
 *                 __cuMemPrefetchAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPrefetchAsync_v2_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L295_exception_handled;
              }
              __pyx_L295_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L299_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1679
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetPriority
 *                 __cuStreamGetPriority = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetPriority_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1681
 *             try:
 *                 global __cuStreamGetPriority
 *                 __cuStreamGetPriority = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetPriority_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1681, __pyx_L300_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1681, __pyx_L300_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamGetPriority_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1681, __pyx_L300_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamGetPriority_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1681, __pyx_L300_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1681, __pyx_L300_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamGetPriority_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamGetPriority_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamGetPriority_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1681, __pyx_L300_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1681, __pyx_L300_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetPriority = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1679
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetPriority
 *                 __cuStreamGetPriority = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetPriority_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L305_try_end;
              __pyx_L300_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1682
 *                 global __cuStreamGetPriority
 *                 __cuStreamGetPriority = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetPriority_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L301_exception_handled;
              }
              __pyx_L301_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L305_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1684
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetFlags
 *                 __cuStreamGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetFlags_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1686
 *             try:
 *                 global __cuStreamGetFlags
 *                 __cuStreamGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetFlags_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1686, __pyx_L306_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1686, __pyx_L306_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuStreamGetFlags_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1686, __pyx_L306_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuStreamGetFlags_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1686, __pyx_L306_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1686, __pyx_L306_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamGetFlags_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamGetFlags_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamGetFlags_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1686, __pyx_L306_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1686, __pyx_L306_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetFlags = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1684
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetFlags
 *                 __cuStreamGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetFlags_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L311_try_end;
              __pyx_L306_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1687
 *                 global __cuStreamGetFlags
 *                 __cuStreamGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetFlags_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L307_exception_handled;
              }
              __pyx_L307_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L311_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1689
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetId
 *                 __cuStreamGetId = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetId_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1691
 *             try:
 *                 global __cuStreamGetId
 *                 __cuStreamGetId = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetId_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1691, __pyx_L312_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1691, __pyx_L312_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamGetId_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1691, __pyx_L312_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamGetId_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1691, __pyx_L312_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1691, __pyx_L312_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamGetId_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamGetId_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamGetId_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1691, __pyx_L312_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1691, __pyx_L312_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetId = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1689
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetId
 *                 __cuStreamGetId = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetId_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L317_try_end;
              __pyx_L312_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1692
 *                 global __cuStreamGetId
 *                 __cuStreamGetId = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetId_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L313_exception_handled;
              }
              __pyx_L313_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L317_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1694
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetCtx
 *                 __cuStreamGetCtx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCtx_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1696
 *             try:
 *                 global __cuStreamGetCtx
 *                 __cuStreamGetCtx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCtx_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1696, __pyx_L318_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1696, __pyx_L318_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamGetCtx_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1696, __pyx_L318_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamGetCtx_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1696, __pyx_L318_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1696, __pyx_L318_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamGetCtx_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamGetCtx_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamGetCtx_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1696, __pyx_L318_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1696, __pyx_L318_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCtx = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1694
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetCtx
 *                 __cuStreamGetCtx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCtx_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L323_try_end;
              __pyx_L318_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1697
 *                 global __cuStreamGetCtx
 *                 __cuStreamGetCtx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCtx_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L319_exception_handled;
              }
              __pyx_L319_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L323_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1699
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWaitEvent
 *                 __cuStreamWaitEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitEvent_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1701
 *             try:
 *                 global __cuStreamWaitEvent
 *                 __cuStreamWaitEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitEvent_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1701, __pyx_L324_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1701, __pyx_L324_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuStreamWaitEvent_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1701, __pyx_L324_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuStreamWaitEvent_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1701, __pyx_L324_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1701, __pyx_L324_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamWaitEvent_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamWaitEvent_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamWaitEvent_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1701, __pyx_L324_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1701, __pyx_L324_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitEvent = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1699
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWaitEvent
 *                 __cuStreamWaitEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitEvent_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L329_try_end;
              __pyx_L324_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1702
 *                 global __cuStreamWaitEvent
 *                 __cuStreamWaitEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitEvent_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L325_exception_handled;
              }
              __pyx_L325_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L329_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1704
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamAddCallback
 *                 __cuStreamAddCallback = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamAddCallback_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1706
 *             try:
 *                 global __cuStreamAddCallback
 *                 __cuStreamAddCallback = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamAddCallback_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1706, __pyx_L330_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1706, __pyx_L330_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamAddCallback_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1706, __pyx_L330_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamAddCallback_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1706, __pyx_L330_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1706, __pyx_L330_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamAddCallback_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamAddCallback_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamAddCallback_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1706, __pyx_L330_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1706, __pyx_L330_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamAddCallback = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1704
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamAddCallback
 *                 __cuStreamAddCallback = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamAddCallback_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L335_try_end;
              __pyx_L330_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1707
 *                 global __cuStreamAddCallback
 *                 __cuStreamAddCallback = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamAddCallback_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L331_exception_handled;
              }
              __pyx_L331_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L335_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1709
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamBeginCapture_v2
 *                 __cuStreamBeginCapture_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBeginCapture_v2_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1711
 *             try:
 *                 global __cuStreamBeginCapture_v2
 *                 __cuStreamBeginCapture_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBeginCapture_v2_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1711, __pyx_L336_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1711, __pyx_L336_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamBeginCapture_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1711, __pyx_L336_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamBeginCapture_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1711, __pyx_L336_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1711, __pyx_L336_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamBeginCapture_v2_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamBeginCapture_v2_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamBeginCapture_v2_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1711, __pyx_L336_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1711, __pyx_L336_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamBeginCapture_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1709
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamBeginCapture_v2
 *                 __cuStreamBeginCapture_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBeginCapture_v2_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L341_try_end;
              __pyx_L336_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1712
 *                 global __cuStreamBeginCapture_v2
 *                 __cuStreamBeginCapture_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBeginCapture_v2_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L337_exception_handled;
              }
              __pyx_L337_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L341_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1714
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamEndCapture
 *                 __cuStreamEndCapture = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamEndCapture_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1716
 *             try:
 *                 global __cuStreamEndCapture
 *                 __cuStreamEndCapture = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamEndCapture_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1716, __pyx_L342_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1716, __pyx_L342_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuStreamEndCapture_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1716, __pyx_L342_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuStreamEndCapture_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1716, __pyx_L342_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1716, __pyx_L342_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamEndCapture_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamEndCapture_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamEndCapture_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1716, __pyx_L342_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1716, __pyx_L342_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamEndCapture = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1714
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamEndCapture
 *                 __cuStreamEndCapture = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamEndCapture_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L347_try_end;
              __pyx_L342_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1717
 *                 global __cuStreamEndCapture
 *                 __cuStreamEndCapture = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamEndCapture_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L343_exception_handled;
              }
              __pyx_L343_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L347_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1719
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamIsCapturing
 *                 __cuStreamIsCapturing = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamIsCapturing_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1721
 *             try:
 *                 global __cuStreamIsCapturing
 *                 __cuStreamIsCapturing = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamIsCapturing_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1721, __pyx_L348_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1721, __pyx_L348_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamIsCapturing_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1721, __pyx_L348_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamIsCapturing_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1721, __pyx_L348_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1721, __pyx_L348_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamIsCapturing_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamIsCapturing_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamIsCapturing_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1721, __pyx_L348_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1721, __pyx_L348_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamIsCapturing = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1719
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamIsCapturing
 *                 __cuStreamIsCapturing = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamIsCapturing_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L353_try_end;
              __pyx_L348_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1722
 *                 global __cuStreamIsCapturing
 *                 __cuStreamIsCapturing = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamIsCapturing_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L349_exception_handled;
              }
              __pyx_L349_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L353_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1724
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetCaptureInfo_v2
 *                 __cuStreamGetCaptureInfo_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCaptureInfo_v2_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1726
 *             try:
 *                 global __cuStreamGetCaptureInfo_v2
 *                 __cuStreamGetCaptureInfo_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCaptureInfo_v2_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1726, __pyx_L354_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1726, __pyx_L354_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamGetCaptureInfo_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1726, __pyx_L354_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamGetCaptureInfo_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1726, __pyx_L354_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1726, __pyx_L354_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamGetCaptureInfo_v2_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamGetCaptureInfo_v2_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamGetCaptureInfo_v2_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1726, __pyx_L354_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1726, __pyx_L354_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCaptureInfo_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1724
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetCaptureInfo_v2
 *                 __cuStreamGetCaptureInfo_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCaptureInfo_v2_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L359_try_end;
              __pyx_L354_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1727
 *                 global __cuStreamGetCaptureInfo_v2
 *                 __cuStreamGetCaptureInfo_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCaptureInfo_v2_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L355_exception_handled;
              }
              __pyx_L355_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L359_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1729
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamUpdateCaptureDependencies
 *                 __cuStreamUpdateCaptureDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamUpdateCaptureDependencies_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1731
 *             try:
 *                 global __cuStreamUpdateCaptureDependencies
 *                 __cuStreamUpdateCaptureDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamUpdateCaptureDependencies_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1731, __pyx_L360_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1731, __pyx_L360_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuStreamUpdateCaptureDependencie};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1731, __pyx_L360_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuStreamUpdateCaptureDependencie};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1731, __pyx_L360_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1731, __pyx_L360_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamUpdateCaptureDependencie);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamUpdateCaptureDependencie);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamUpdateCaptureDependencie);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1731, __pyx_L360_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1731, __pyx_L360_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamUpdateCaptureDependencies = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1729
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamUpdateCaptureDependencies
 *                 __cuStreamUpdateCaptureDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamUpdateCaptureDependencies_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L365_try_end;
              __pyx_L360_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1732
 *                 global __cuStreamUpdateCaptureDependencies
 *                 __cuStreamUpdateCaptureDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamUpdateCaptureDependencies_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L361_exception_handled;
              }
              __pyx_L361_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L365_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1734
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamAttachMemAsync
 *                 __cuStreamAttachMemAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamAttachMemAsync_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1736
 *             try:
 *                 global __cuStreamAttachMemAsync
 *                 __cuStreamAttachMemAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamAttachMemAsync_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1736, __pyx_L366_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1736, __pyx_L366_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamAttachMemAsync_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1736, __pyx_L366_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamAttachMemAsync_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1736, __pyx_L366_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1736, __pyx_L366_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamAttachMemAsync_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamAttachMemAsync_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamAttachMemAsync_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1736, __pyx_L366_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1736, __pyx_L366_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamAttachMemAsync = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1734
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamAttachMemAsync
 *                 __cuStreamAttachMemAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamAttachMemAsync_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L371_try_end;
              __pyx_L366_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1737
 *                 global __cuStreamAttachMemAsync
 *                 __cuStreamAttachMemAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamAttachMemAsync_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L367_exception_handled;
              }
              __pyx_L367_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L371_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1739
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamQuery
 *                 __cuStreamQuery = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamQuery_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1741
 *             try:
 *                 global __cuStreamQuery
 *                 __cuStreamQuery = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamQuery_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1741, __pyx_L372_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1741, __pyx_L372_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamQuery_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1741, __pyx_L372_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamQuery_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1741, __pyx_L372_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1741, __pyx_L372_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamQuery_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamQuery_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamQuery_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1741, __pyx_L372_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1741, __pyx_L372_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamQuery = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1739
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamQuery
 *                 __cuStreamQuery = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamQuery_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L377_try_end;
              __pyx_L372_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1742
 *                 global __cuStreamQuery
 *                 __cuStreamQuery = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamQuery_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L373_exception_handled;
              }
              __pyx_L373_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L377_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1744
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamSynchronize
 *                 __cuStreamSynchronize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamSynchronize_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1746
 *             try:
 *                 global __cuStreamSynchronize
 *                 __cuStreamSynchronize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamSynchronize_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1746, __pyx_L378_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1746, __pyx_L378_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuStreamSynchronize_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1746, __pyx_L378_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuStreamSynchronize_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1746, __pyx_L378_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1746, __pyx_L378_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamSynchronize_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamSynchronize_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamSynchronize_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1746, __pyx_L378_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1746, __pyx_L378_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamSynchronize = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1744
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamSynchronize
 *                 __cuStreamSynchronize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamSynchronize_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L383_try_end;
              __pyx_L378_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1747
 *                 global __cuStreamSynchronize
 *                 __cuStreamSynchronize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamSynchronize_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L379_exception_handled;
              }
              __pyx_L379_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L383_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1749
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamCopyAttributes
 *                 __cuStreamCopyAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamCopyAttributes_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1751
 *             try:
 *                 global __cuStreamCopyAttributes
 *                 __cuStreamCopyAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamCopyAttributes_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1751, __pyx_L384_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1751, __pyx_L384_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamCopyAttributes_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1751, __pyx_L384_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamCopyAttributes_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1751, __pyx_L384_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1751, __pyx_L384_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamCopyAttributes_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamCopyAttributes_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamCopyAttributes_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1751, __pyx_L384_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1751, __pyx_L384_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamCopyAttributes = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1749
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamCopyAttributes
 *                 __cuStreamCopyAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamCopyAttributes_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L389_try_end;
              __pyx_L384_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1752
 *                 global __cuStreamCopyAttributes
 *                 __cuStreamCopyAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamCopyAttributes_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L385_exception_handled;
              }
              __pyx_L385_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L389_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1754
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetAttribute
 *                 __cuStreamGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetAttribute_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1756
 *             try:
 *                 global __cuStreamGetAttribute
 *                 __cuStreamGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetAttribute_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1756, __pyx_L390_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1756, __pyx_L390_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamGetAttribute_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1756, __pyx_L390_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamGetAttribute_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1756, __pyx_L390_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1756, __pyx_L390_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamGetAttribute_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamGetAttribute_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamGetAttribute_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1756, __pyx_L390_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1756, __pyx_L390_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetAttribute = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1754
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetAttribute
 *                 __cuStreamGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetAttribute_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L395_try_end;
              __pyx_L390_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1757
 *                 global __cuStreamGetAttribute
 *                 __cuStreamGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetAttribute_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L391_exception_handled;
              }
              __pyx_L391_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L395_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1759
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamSetAttribute
 *                 __cuStreamSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamSetAttribute_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1761
 *             try:
 *                 global __cuStreamSetAttribute
 *                 __cuStreamSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamSetAttribute_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1761, __pyx_L396_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1761, __pyx_L396_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuStreamSetAttribute_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1761, __pyx_L396_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuStreamSetAttribute_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1761, __pyx_L396_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1761, __pyx_L396_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamSetAttribute_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamSetAttribute_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamSetAttribute_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1761, __pyx_L396_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1761, __pyx_L396_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamSetAttribute = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1759
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamSetAttribute
 *                 __cuStreamSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamSetAttribute_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L401_try_end;
              __pyx_L396_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1762
 *                 global __cuStreamSetAttribute
 *                 __cuStreamSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamSetAttribute_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L397_exception_handled;
              }
              __pyx_L397_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L401_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1764
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuEventRecord
 *                 __cuEventRecord = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventRecord_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1766
 *             try:
 *                 global __cuEventRecord
 *                 __cuEventRecord = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventRecord_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1766, __pyx_L402_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1766, __pyx_L402_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuEventRecord_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1766, __pyx_L402_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuEventRecord_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1766, __pyx_L402_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1766, __pyx_L402_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuEventRecord_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuEventRecord_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuEventRecord_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1766, __pyx_L402_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1766, __pyx_L402_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuEventRecord = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1764
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuEventRecord
 *                 __cuEventRecord = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventRecord_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L407_try_end;
              __pyx_L402_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1767
 *                 global __cuEventRecord
 *                 __cuEventRecord = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventRecord_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L403_exception_handled;
              }
              __pyx_L403_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L407_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1769
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuEventRecordWithFlags
 *                 __cuEventRecordWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventRecordWithFlags_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1771
 *             try:
 *                 global __cuEventRecordWithFlags
 *                 __cuEventRecordWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventRecordWithFlags_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1771, __pyx_L408_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1771, __pyx_L408_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuEventRecordWithFlags_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1771, __pyx_L408_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuEventRecordWithFlags_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1771, __pyx_L408_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1771, __pyx_L408_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuEventRecordWithFlags_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuEventRecordWithFlags_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuEventRecordWithFlags_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1771, __pyx_L408_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1771, __pyx_L408_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuEventRecordWithFlags = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1769
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuEventRecordWithFlags
 *                 __cuEventRecordWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventRecordWithFlags_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L413_try_end;
              __pyx_L408_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1772
 *                 global __cuEventRecordWithFlags
 *                 __cuEventRecordWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventRecordWithFlags_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L409_exception_handled;
              }
              __pyx_L409_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L413_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1774
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuSignalExternalSemaphoresAsync
 *                 __cuSignalExternalSemaphoresAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSignalExternalSemaphoresAsync_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1776
 *             try:
 *                 global __cuSignalExternalSemaphoresAsync
 *                 __cuSignalExternalSemaphoresAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSignalExternalSemaphoresAsync_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1776, __pyx_L414_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1776, __pyx_L414_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuSignalExternalSemaphoresAsync};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1776, __pyx_L414_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuSignalExternalSemaphoresAsync};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1776, __pyx_L414_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1776, __pyx_L414_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuSignalExternalSemaphoresAsync);
                  __Pyx_GIVEREF(__pyx_n_u_cuSignalExternalSemaphoresAsync);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuSignalExternalSemaphoresAsync);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1776, __pyx_L414_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1776, __pyx_L414_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuSignalExternalSemaphoresAsync = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1774
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuSignalExternalSemaphoresAsync
 *                 __cuSignalExternalSemaphoresAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSignalExternalSemaphoresAsync_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L419_try_end;
              __pyx_L414_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1777
 *                 global __cuSignalExternalSemaphoresAsync
 *                 __cuSignalExternalSemaphoresAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSignalExternalSemaphoresAsync_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L415_exception_handled;
              }
              __pyx_L415_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L419_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1779
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuWaitExternalSemaphoresAsync
 *                 __cuWaitExternalSemaphoresAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuWaitExternalSemaphoresAsync_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1781
 *             try:
 *                 global __cuWaitExternalSemaphoresAsync
 *                 __cuWaitExternalSemaphoresAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuWaitExternalSemaphoresAsync_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1781, __pyx_L420_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1781, __pyx_L420_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuWaitExternalSemaphoresAsync_pt};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1781, __pyx_L420_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuWaitExternalSemaphoresAsync_pt};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1781, __pyx_L420_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1781, __pyx_L420_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuWaitExternalSemaphoresAsync_pt);
                  __Pyx_GIVEREF(__pyx_n_u_cuWaitExternalSemaphoresAsync_pt);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuWaitExternalSemaphoresAsync_pt);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1781, __pyx_L420_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1781, __pyx_L420_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuWaitExternalSemaphoresAsync = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1779
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuWaitExternalSemaphoresAsync
 *                 __cuWaitExternalSemaphoresAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuWaitExternalSemaphoresAsync_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L425_try_end;
              __pyx_L420_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1782
 *                 global __cuWaitExternalSemaphoresAsync
 *                 __cuWaitExternalSemaphoresAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuWaitExternalSemaphoresAsync_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L421_exception_handled;
              }
              __pyx_L421_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L425_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1784
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWaitValue32_v2
 *                 __cuStreamWaitValue32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue32_v2_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1786
 *             try:
 *                 global __cuStreamWaitValue32_v2
 *                 __cuStreamWaitValue32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue32_v2_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1786, __pyx_L426_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1786, __pyx_L426_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamWaitValue32_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1786, __pyx_L426_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamWaitValue32_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1786, __pyx_L426_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1786, __pyx_L426_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamWaitValue32_v2_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamWaitValue32_v2_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamWaitValue32_v2_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1786, __pyx_L426_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1786, __pyx_L426_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue32_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1784
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWaitValue32_v2
 *                 __cuStreamWaitValue32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue32_v2_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L431_try_end;
              __pyx_L426_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1787
 *                 global __cuStreamWaitValue32_v2
 *                 __cuStreamWaitValue32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue32_v2_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L427_exception_handled;
              }
              __pyx_L427_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L431_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1789
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWaitValue64_v2
 *                 __cuStreamWaitValue64_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue64_v2_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1791
 *             try:
 *                 global __cuStreamWaitValue64_v2
 *                 __cuStreamWaitValue64_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue64_v2_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1791, __pyx_L432_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1791, __pyx_L432_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuStreamWaitValue64_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1791, __pyx_L432_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuStreamWaitValue64_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1791, __pyx_L432_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1791, __pyx_L432_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamWaitValue64_v2_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamWaitValue64_v2_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamWaitValue64_v2_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1791, __pyx_L432_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1791, __pyx_L432_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue64_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1789
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWaitValue64_v2
 *                 __cuStreamWaitValue64_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue64_v2_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L437_try_end;
              __pyx_L432_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1792
 *                 global __cuStreamWaitValue64_v2
 *                 __cuStreamWaitValue64_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue64_v2_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L433_exception_handled;
              }
              __pyx_L433_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L437_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1794
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWriteValue32_v2
 *                 __cuStreamWriteValue32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue32_v2_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1796
 *             try:
 *                 global __cuStreamWriteValue32_v2
 *                 __cuStreamWriteValue32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue32_v2_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1796, __pyx_L438_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1796, __pyx_L438_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamWriteValue32_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1796, __pyx_L438_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamWriteValue32_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1796, __pyx_L438_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1796, __pyx_L438_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamWriteValue32_v2_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamWriteValue32_v2_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamWriteValue32_v2_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1796, __pyx_L438_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1796, __pyx_L438_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue32_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1794
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWriteValue32_v2
 *                 __cuStreamWriteValue32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue32_v2_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L443_try_end;
              __pyx_L438_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1797
 *                 global __cuStreamWriteValue32_v2
 *                 __cuStreamWriteValue32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue32_v2_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L439_exception_handled;
              }
              __pyx_L439_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L443_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1799
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWriteValue64_v2
 *                 __cuStreamWriteValue64_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue64_v2_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1801
 *             try:
 *                 global __cuStreamWriteValue64_v2
 *                 __cuStreamWriteValue64_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue64_v2_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1801, __pyx_L444_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1801, __pyx_L444_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamWriteValue64_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1801, __pyx_L444_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamWriteValue64_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1801, __pyx_L444_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1801, __pyx_L444_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamWriteValue64_v2_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamWriteValue64_v2_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamWriteValue64_v2_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1801, __pyx_L444_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1801, __pyx_L444_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue64_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1799
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWriteValue64_v2
 *                 __cuStreamWriteValue64_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue64_v2_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L449_try_end;
              __pyx_L444_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1802
 *                 global __cuStreamWriteValue64_v2
 *                 __cuStreamWriteValue64_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue64_v2_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L445_exception_handled;
              }
              __pyx_L445_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L449_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1804
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamBatchMemOp_v2
 *                 __cuStreamBatchMemOp_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBatchMemOp_v2_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1806
 *             try:
 *                 global __cuStreamBatchMemOp_v2
 *                 __cuStreamBatchMemOp_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBatchMemOp_v2_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1806, __pyx_L450_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1806, __pyx_L450_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuStreamBatchMemOp_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1806, __pyx_L450_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuStreamBatchMemOp_v2_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1806, __pyx_L450_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1806, __pyx_L450_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamBatchMemOp_v2_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamBatchMemOp_v2_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamBatchMemOp_v2_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1806, __pyx_L450_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1806, __pyx_L450_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamBatchMemOp_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1804
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamBatchMemOp_v2
 *                 __cuStreamBatchMemOp_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBatchMemOp_v2_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L455_try_end;
              __pyx_L450_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1807
 *                 global __cuStreamBatchMemOp_v2
 *                 __cuStreamBatchMemOp_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBatchMemOp_v2_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L451_exception_handled;
              }
              __pyx_L451_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L455_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1809
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuLaunchKernel
 *                 __cuLaunchKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchKernel_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1811
 *             try:
 *                 global __cuLaunchKernel
 *                 __cuLaunchKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchKernel_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1811, __pyx_L456_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1811, __pyx_L456_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuLaunchKernel_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1811, __pyx_L456_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuLaunchKernel_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1811, __pyx_L456_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1811, __pyx_L456_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuLaunchKernel_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuLaunchKernel_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuLaunchKernel_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1811, __pyx_L456_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1811, __pyx_L456_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchKernel = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1809
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuLaunchKernel
 *                 __cuLaunchKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchKernel_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L461_try_end;
              __pyx_L456_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1812
 *                 global __cuLaunchKernel
 *                 __cuLaunchKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchKernel_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L457_exception_handled;
              }
              __pyx_L457_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L461_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1814
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuLaunchKernelEx
 *                 __cuLaunchKernelEx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchKernelEx_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1816
 *             try:
 *                 global __cuLaunchKernelEx
 *                 __cuLaunchKernelEx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchKernelEx_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1816, __pyx_L462_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1816, __pyx_L462_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuLaunchKernelEx_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1816, __pyx_L462_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuLaunchKernelEx_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1816, __pyx_L462_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1816, __pyx_L462_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuLaunchKernelEx_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuLaunchKernelEx_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuLaunchKernelEx_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1816, __pyx_L462_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1816, __pyx_L462_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchKernelEx = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1814
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuLaunchKernelEx
 *                 __cuLaunchKernelEx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchKernelEx_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L467_try_end;
              __pyx_L462_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1817
 *                 global __cuLaunchKernelEx
 *                 __cuLaunchKernelEx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchKernelEx_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L463_exception_handled;
              }
              __pyx_L463_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L467_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1819
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuLaunchCooperativeKernel
 *                 __cuLaunchCooperativeKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchCooperativeKernel_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1821
 *             try:
 *                 global __cuLaunchCooperativeKernel
 *                 __cuLaunchCooperativeKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchCooperativeKernel_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1821, __pyx_L468_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1821, __pyx_L468_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuLaunchCooperativeKernel_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1821, __pyx_L468_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuLaunchCooperativeKernel_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1821, __pyx_L468_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1821, __pyx_L468_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuLaunchCooperativeKernel_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuLaunchCooperativeKernel_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuLaunchCooperativeKernel_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1821, __pyx_L468_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1821, __pyx_L468_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchCooperativeKernel = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1819
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuLaunchCooperativeKernel
 *                 __cuLaunchCooperativeKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchCooperativeKernel_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L473_try_end;
              __pyx_L468_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1822
 *                 global __cuLaunchCooperativeKernel
 *                 __cuLaunchCooperativeKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchCooperativeKernel_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L469_exception_handled;
              }
              __pyx_L469_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L473_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1824
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuLaunchHostFunc
 *                 __cuLaunchHostFunc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchHostFunc_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1826
 *             try:
 *                 global __cuLaunchHostFunc
 *                 __cuLaunchHostFunc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchHostFunc_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1826, __pyx_L474_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1826, __pyx_L474_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuLaunchHostFunc_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1826, __pyx_L474_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuLaunchHostFunc_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1826, __pyx_L474_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1826, __pyx_L474_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuLaunchHostFunc_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuLaunchHostFunc_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuLaunchHostFunc_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1826, __pyx_L474_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1826, __pyx_L474_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchHostFunc = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1824
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuLaunchHostFunc
 *                 __cuLaunchHostFunc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchHostFunc_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L479_try_end;
              __pyx_L474_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1827
 *                 global __cuLaunchHostFunc
 *                 __cuLaunchHostFunc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchHostFunc_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L475_exception_handled;
              }
              __pyx_L475_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L479_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1829
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuGraphInstantiateWithParams
 *                 __cuGraphInstantiateWithParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphInstantiateWithParams_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1831
 *             try:
 *                 global __cuGraphInstantiateWithParams
 *                 __cuGraphInstantiateWithParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphInstantiateWithParams_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1831, __pyx_L480_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1831, __pyx_L480_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphInstantiateWithParams_pts};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1831, __pyx_L480_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphInstantiateWithParams_pts};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1831, __pyx_L480_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1831, __pyx_L480_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuGraphInstantiateWithParams_pts);
                  __Pyx_GIVEREF(__pyx_n_u_cuGraphInstantiateWithParams_pts);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphInstantiateWithParams_pts);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1831, __pyx_L480_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1831, __pyx_L480_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuGraphInstantiateWithParams = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1829
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuGraphInstantiateWithParams
 *                 __cuGraphInstantiateWithParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphInstantiateWithParams_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L485_try_end;
              __pyx_L480_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1832
 *                 global __cuGraphInstantiateWithParams
 *                 __cuGraphInstantiateWithParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphInstantiateWithParams_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L481_exception_handled;
              }
              __pyx_L481_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L485_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1834
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuGraphUpload
 *                 __cuGraphUpload = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphUpload_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1836
 *             try:
 *                 global __cuGraphUpload
 *                 __cuGraphUpload = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphUpload_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1836, __pyx_L486_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1836, __pyx_L486_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphUpload_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1836, __pyx_L486_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphUpload_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1836, __pyx_L486_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1836, __pyx_L486_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuGraphUpload_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuGraphUpload_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphUpload_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1836, __pyx_L486_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1836, __pyx_L486_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuGraphUpload = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1834
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuGraphUpload
 *                 __cuGraphUpload = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphUpload_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L491_try_end;
              __pyx_L486_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1837
 *                 global __cuGraphUpload
 *                 __cuGraphUpload = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphUpload_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L487_exception_handled;
              }
              __pyx_L487_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L491_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1839
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuGraphLaunch
 *                 __cuGraphLaunch = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphLaunch_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1841
 *             try:
 *                 global __cuGraphLaunch
 *                 __cuGraphLaunch = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphLaunch_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1841, __pyx_L492_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1841, __pyx_L492_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphLaunch_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1841, __pyx_L492_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphLaunch_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1841, __pyx_L492_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1841, __pyx_L492_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuGraphLaunch_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuGraphLaunch_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphLaunch_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1841, __pyx_L492_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1841, __pyx_L492_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuGraphLaunch = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1839
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuGraphLaunch
 *                 __cuGraphLaunch = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphLaunch_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L497_try_end;
              __pyx_L492_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1842
 *                 global __cuGraphLaunch
 *                 __cuGraphLaunch = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphLaunch_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L493_exception_handled;
              }
              __pyx_L493_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L497_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1844
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuGraphicsMapResources
 *                 __cuGraphicsMapResources = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsMapResources_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1846
 *             try:
 *                 global __cuGraphicsMapResources
 *                 __cuGraphicsMapResources = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsMapResources_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1846, __pyx_L498_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1846, __pyx_L498_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphicsMapResources_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1846, __pyx_L498_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphicsMapResources_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1846, __pyx_L498_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1846, __pyx_L498_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuGraphicsMapResources_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuGraphicsMapResources_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphicsMapResources_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1846, __pyx_L498_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1846, __pyx_L498_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsMapResources = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1844
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuGraphicsMapResources
 *                 __cuGraphicsMapResources = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsMapResources_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L503_try_end;
              __pyx_L498_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1847
 *                 global __cuGraphicsMapResources
 *                 __cuGraphicsMapResources = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsMapResources_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L499_exception_handled;
              }
              __pyx_L499_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L503_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1849
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuGraphicsUnmapResources
 *                 __cuGraphicsUnmapResources = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsUnmapResources_ptsz')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1851
 *             try:
 *                 global __cuGraphicsUnmapResources
 *                 __cuGraphicsUnmapResources = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsUnmapResources_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1851, __pyx_L504_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1851, __pyx_L504_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphicsUnmapResources_ptsz};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1851, __pyx_L504_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphicsUnmapResources_ptsz};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1851, __pyx_L504_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1851, __pyx_L504_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuGraphicsUnmapResources_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuGraphicsUnmapResources_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphicsUnmapResources_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1851, __pyx_L504_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1851, __pyx_L504_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsUnmapResources = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1849
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuGraphicsUnmapResources
 *                 __cuGraphicsUnmapResources = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsUnmapResources_ptsz')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L509_try_end;
              __pyx_L504_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1852
 *                 global __cuGraphicsUnmapResources
 *                 __cuGraphicsUnmapResources = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsUnmapResources_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *         else:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L505_exception_handled;
              }
              __pyx_L505_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L509_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1466
 *     # Load using win32GetAddr
 *     with gil:
 *         if usePTDS:             # <<<<<<<<<<<<<<
 *             # Get all PTDS version of functions
 *             pass
 */
            goto __pyx_L47;
          }

          /* "cuda/_cuda/ccuda.pyx":1856
 *         else:
 *             # Else get the regular version
 *             pass             # <<<<<<<<<<<<<<
 *             try:
 *                 global __cuMemcpy
 */
          /*else*/ {

            /* "cuda/_cuda/ccuda.pyx":1857
 *             # Else get the regular version
 *             pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy
 *                 __cuMemcpy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1859
 *             try:
 *                 global __cuMemcpy
 *                 __cuMemcpy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1859, __pyx_L510_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1859, __pyx_L510_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpy};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1859, __pyx_L510_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpy};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1859, __pyx_L510_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1859, __pyx_L510_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpy);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpy);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemcpy);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1859, __pyx_L510_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1859, __pyx_L510_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1857
 *             # Else get the regular version
 *             pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy
 *                 __cuMemcpy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L515_try_end;
              __pyx_L510_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1860
 *                 global __cuMemcpy
 *                 __cuMemcpy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L511_exception_handled;
              }
              __pyx_L511_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L515_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1862
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyPeer
 *                 __cuMemcpyPeer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyPeer')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1864
 *             try:
 *                 global __cuMemcpyPeer
 *                 __cuMemcpyPeer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyPeer')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1864, __pyx_L516_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1864, __pyx_L516_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpyPeer};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1864, __pyx_L516_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpyPeer};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1864, __pyx_L516_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1864, __pyx_L516_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyPeer);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyPeer);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemcpyPeer);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1864, __pyx_L516_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1864, __pyx_L516_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyPeer = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1862
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyPeer
 *                 __cuMemcpyPeer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyPeer')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L521_try_end;
              __pyx_L516_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1865
 *                 global __cuMemcpyPeer
 *                 __cuMemcpyPeer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyPeer')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L517_exception_handled;
              }
              __pyx_L517_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L521_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1867
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyHtoD_v2
 *                 __cuMemcpyHtoD_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoD_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1869
 *             try:
 *                 global __cuMemcpyHtoD_v2
 *                 __cuMemcpyHtoD_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoD_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1869, __pyx_L522_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1869, __pyx_L522_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpyHtoD_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1869, __pyx_L522_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpyHtoD_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1869, __pyx_L522_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1869, __pyx_L522_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyHtoD_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyHtoD_v2);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemcpyHtoD_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1869, __pyx_L522_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1869, __pyx_L522_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoD_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1867
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyHtoD_v2
 *                 __cuMemcpyHtoD_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoD_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L527_try_end;
              __pyx_L522_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1870
 *                 global __cuMemcpyHtoD_v2
 *                 __cuMemcpyHtoD_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoD_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L523_exception_handled;
              }
              __pyx_L523_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L527_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1872
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyDtoH_v2
 *                 __cuMemcpyDtoH_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoH_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1874
 *             try:
 *                 global __cuMemcpyDtoH_v2
 *                 __cuMemcpyDtoH_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoH_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1874, __pyx_L528_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1874, __pyx_L528_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpyDtoH_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1874, __pyx_L528_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpyDtoH_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1874, __pyx_L528_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1874, __pyx_L528_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyDtoH_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyDtoH_v2);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemcpyDtoH_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1874, __pyx_L528_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1874, __pyx_L528_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoH_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1872
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyDtoH_v2
 *                 __cuMemcpyDtoH_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoH_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L533_try_end;
              __pyx_L528_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1875
 *                 global __cuMemcpyDtoH_v2
 *                 __cuMemcpyDtoH_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoH_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L529_exception_handled;
              }
              __pyx_L529_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L533_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1877
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyDtoD_v2
 *                 __cuMemcpyDtoD_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoD_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1879
 *             try:
 *                 global __cuMemcpyDtoD_v2
 *                 __cuMemcpyDtoD_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoD_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1879, __pyx_L534_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1879, __pyx_L534_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpyDtoD_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1879, __pyx_L534_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpyDtoD_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1879, __pyx_L534_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1879, __pyx_L534_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyDtoD_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyDtoD_v2);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemcpyDtoD_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1879, __pyx_L534_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1879, __pyx_L534_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoD_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1877
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyDtoD_v2
 *                 __cuMemcpyDtoD_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoD_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L539_try_end;
              __pyx_L534_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1880
 *                 global __cuMemcpyDtoD_v2
 *                 __cuMemcpyDtoD_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoD_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L535_exception_handled;
              }
              __pyx_L535_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L539_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1882
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyDtoA_v2
 *                 __cuMemcpyDtoA_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoA_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1884
 *             try:
 *                 global __cuMemcpyDtoA_v2
 *                 __cuMemcpyDtoA_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoA_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1884, __pyx_L540_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1884, __pyx_L540_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpyDtoA_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1884, __pyx_L540_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpyDtoA_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1884, __pyx_L540_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1884, __pyx_L540_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyDtoA_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyDtoA_v2);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemcpyDtoA_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1884, __pyx_L540_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1884, __pyx_L540_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoA_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1882
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyDtoA_v2
 *                 __cuMemcpyDtoA_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoA_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L545_try_end;
              __pyx_L540_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1885
 *                 global __cuMemcpyDtoA_v2
 *                 __cuMemcpyDtoA_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoA_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L541_exception_handled;
              }
              __pyx_L541_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L545_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1887
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyAtoD_v2
 *                 __cuMemcpyAtoD_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoD_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1889
 *             try:
 *                 global __cuMemcpyAtoD_v2
 *                 __cuMemcpyAtoD_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoD_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1889, __pyx_L546_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1889, __pyx_L546_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpyAtoD_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1889, __pyx_L546_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpyAtoD_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1889, __pyx_L546_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1889, __pyx_L546_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyAtoD_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyAtoD_v2);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemcpyAtoD_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1889, __pyx_L546_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1889, __pyx_L546_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoD_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1887
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyAtoD_v2
 *                 __cuMemcpyAtoD_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoD_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L551_try_end;
              __pyx_L546_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1890
 *                 global __cuMemcpyAtoD_v2
 *                 __cuMemcpyAtoD_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoD_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L547_exception_handled;
              }
              __pyx_L547_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L551_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1892
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyHtoA_v2
 *                 __cuMemcpyHtoA_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoA_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1894
 *             try:
 *                 global __cuMemcpyHtoA_v2
 *                 __cuMemcpyHtoA_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoA_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1894, __pyx_L552_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1894, __pyx_L552_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpyHtoA_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1894, __pyx_L552_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpyHtoA_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1894, __pyx_L552_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1894, __pyx_L552_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyHtoA_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyHtoA_v2);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemcpyHtoA_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1894, __pyx_L552_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1894, __pyx_L552_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoA_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1892
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyHtoA_v2
 *                 __cuMemcpyHtoA_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoA_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L557_try_end;
              __pyx_L552_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1895
 *                 global __cuMemcpyHtoA_v2
 *                 __cuMemcpyHtoA_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoA_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L553_exception_handled;
              }
              __pyx_L553_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L557_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1897
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyAtoH_v2
 *                 __cuMemcpyAtoH_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoH_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1899
 *             try:
 *                 global __cuMemcpyAtoH_v2
 *                 __cuMemcpyAtoH_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoH_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1899, __pyx_L558_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1899, __pyx_L558_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpyAtoH_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1899, __pyx_L558_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpyAtoH_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1899, __pyx_L558_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1899, __pyx_L558_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyAtoH_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyAtoH_v2);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemcpyAtoH_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1899, __pyx_L558_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1899, __pyx_L558_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoH_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1897
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyAtoH_v2
 *                 __cuMemcpyAtoH_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoH_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L563_try_end;
              __pyx_L558_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1900
 *                 global __cuMemcpyAtoH_v2
 *                 __cuMemcpyAtoH_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoH_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L559_exception_handled;
              }
              __pyx_L559_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L563_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1902
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyAtoA_v2
 *                 __cuMemcpyAtoA_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoA_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1904
 *             try:
 *                 global __cuMemcpyAtoA_v2
 *                 __cuMemcpyAtoA_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoA_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1904, __pyx_L564_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1904, __pyx_L564_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpyAtoA_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1904, __pyx_L564_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpyAtoA_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1904, __pyx_L564_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1904, __pyx_L564_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyAtoA_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyAtoA_v2);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemcpyAtoA_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1904, __pyx_L564_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1904, __pyx_L564_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoA_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1902
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyAtoA_v2
 *                 __cuMemcpyAtoA_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoA_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L569_try_end;
              __pyx_L564_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1905
 *                 global __cuMemcpyAtoA_v2
 *                 __cuMemcpyAtoA_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoA_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L565_exception_handled;
              }
              __pyx_L565_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L569_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1907
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy2D_v2
 *                 __cuMemcpy2D_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy2D_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1909
 *             try:
 *                 global __cuMemcpy2D_v2
 *                 __cuMemcpy2D_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy2D_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1909, __pyx_L570_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1909, __pyx_L570_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpy2D_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1909, __pyx_L570_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpy2D_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1909, __pyx_L570_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1909, __pyx_L570_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpy2D_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpy2D_v2);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemcpy2D_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1909, __pyx_L570_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1909, __pyx_L570_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2D_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1907
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy2D_v2
 *                 __cuMemcpy2D_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy2D_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L575_try_end;
              __pyx_L570_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1910
 *                 global __cuMemcpy2D_v2
 *                 __cuMemcpy2D_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy2D_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L571_exception_handled;
              }
              __pyx_L571_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L575_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1912
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy2DUnaligned_v2
 *                 __cuMemcpy2DUnaligned_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy2DUnaligned_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1914
 *             try:
 *                 global __cuMemcpy2DUnaligned_v2
 *                 __cuMemcpy2DUnaligned_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy2DUnaligned_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1914, __pyx_L576_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1914, __pyx_L576_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpy2DUnaligned_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1914, __pyx_L576_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpy2DUnaligned_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1914, __pyx_L576_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1914, __pyx_L576_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpy2DUnaligned_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpy2DUnaligned_v2);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemcpy2DUnaligned_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1914, __pyx_L576_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1914, __pyx_L576_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2DUnaligned_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1912
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy2DUnaligned_v2
 *                 __cuMemcpy2DUnaligned_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy2DUnaligned_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L581_try_end;
              __pyx_L576_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1915
 *                 global __cuMemcpy2DUnaligned_v2
 *                 __cuMemcpy2DUnaligned_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy2DUnaligned_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L577_exception_handled;
              }
              __pyx_L577_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L581_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1917
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy3D_v2
 *                 __cuMemcpy3D_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3D_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1919
 *             try:
 *                 global __cuMemcpy3D_v2
 *                 __cuMemcpy3D_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3D_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1919, __pyx_L582_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1919, __pyx_L582_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpy3D_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1919, __pyx_L582_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpy3D_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1919, __pyx_L582_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1919, __pyx_L582_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpy3D_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpy3D_v2);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemcpy3D_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1919, __pyx_L582_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1919, __pyx_L582_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3D_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1917
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy3D_v2
 *                 __cuMemcpy3D_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3D_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L587_try_end;
              __pyx_L582_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1920
 *                 global __cuMemcpy3D_v2
 *                 __cuMemcpy3D_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3D_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L583_exception_handled;
              }
              __pyx_L583_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L587_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1922
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy3DPeer
 *                 __cuMemcpy3DPeer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DPeer')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1924
 *             try:
 *                 global __cuMemcpy3DPeer
 *                 __cuMemcpy3DPeer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DPeer')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1924, __pyx_L588_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1924, __pyx_L588_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpy3DPeer};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1924, __pyx_L588_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpy3DPeer};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1924, __pyx_L588_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1924, __pyx_L588_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpy3DPeer);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpy3DPeer);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemcpy3DPeer);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1924, __pyx_L588_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1924, __pyx_L588_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DPeer = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1922
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy3DPeer
 *                 __cuMemcpy3DPeer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DPeer')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L593_try_end;
              __pyx_L588_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1925
 *                 global __cuMemcpy3DPeer
 *                 __cuMemcpy3DPeer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DPeer')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L589_exception_handled;
              }
              __pyx_L589_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L593_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1927
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyAsync
 *                 __cuMemcpyAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAsync')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1929
 *             try:
 *                 global __cuMemcpyAsync
 *                 __cuMemcpyAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAsync')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1929, __pyx_L594_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1929, __pyx_L594_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpyAsync};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1929, __pyx_L594_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpyAsync};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1929, __pyx_L594_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1929, __pyx_L594_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyAsync);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyAsync);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemcpyAsync);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1929, __pyx_L594_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1929, __pyx_L594_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAsync = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1927
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyAsync
 *                 __cuMemcpyAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAsync')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L599_try_end;
              __pyx_L594_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1930
 *                 global __cuMemcpyAsync
 *                 __cuMemcpyAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAsync')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L595_exception_handled;
              }
              __pyx_L595_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L599_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1932
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyPeerAsync
 *                 __cuMemcpyPeerAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyPeerAsync')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1934
 *             try:
 *                 global __cuMemcpyPeerAsync
 *                 __cuMemcpyPeerAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyPeerAsync')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1934, __pyx_L600_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1934, __pyx_L600_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpyPeerAsync};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1934, __pyx_L600_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpyPeerAsync};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1934, __pyx_L600_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1934, __pyx_L600_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyPeerAsync);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyPeerAsync);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemcpyPeerAsync);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1934, __pyx_L600_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1934, __pyx_L600_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyPeerAsync = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1932
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyPeerAsync
 *                 __cuMemcpyPeerAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyPeerAsync')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L605_try_end;
              __pyx_L600_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1935
 *                 global __cuMemcpyPeerAsync
 *                 __cuMemcpyPeerAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyPeerAsync')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L601_exception_handled;
              }
              __pyx_L601_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L605_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1937
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyHtoDAsync_v2
 *                 __cuMemcpyHtoDAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoDAsync_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1939
 *             try:
 *                 global __cuMemcpyHtoDAsync_v2
 *                 __cuMemcpyHtoDAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoDAsync_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1939, __pyx_L606_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1939, __pyx_L606_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpyHtoDAsync_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1939, __pyx_L606_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpyHtoDAsync_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1939, __pyx_L606_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1939, __pyx_L606_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyHtoDAsync_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyHtoDAsync_v2);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemcpyHtoDAsync_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1939, __pyx_L606_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1939, __pyx_L606_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoDAsync_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1937
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyHtoDAsync_v2
 *                 __cuMemcpyHtoDAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoDAsync_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L611_try_end;
              __pyx_L606_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1940
 *                 global __cuMemcpyHtoDAsync_v2
 *                 __cuMemcpyHtoDAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoDAsync_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L607_exception_handled;
              }
              __pyx_L607_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L611_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1942
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyDtoHAsync_v2
 *                 __cuMemcpyDtoHAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoHAsync_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1944
 *             try:
 *                 global __cuMemcpyDtoHAsync_v2
 *                 __cuMemcpyDtoHAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoHAsync_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1944, __pyx_L612_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1944, __pyx_L612_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpyDtoHAsync_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1944, __pyx_L612_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpyDtoHAsync_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1944, __pyx_L612_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1944, __pyx_L612_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyDtoHAsync_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyDtoHAsync_v2);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemcpyDtoHAsync_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1944, __pyx_L612_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1944, __pyx_L612_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoHAsync_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1942
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyDtoHAsync_v2
 *                 __cuMemcpyDtoHAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoHAsync_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L617_try_end;
              __pyx_L612_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1945
 *                 global __cuMemcpyDtoHAsync_v2
 *                 __cuMemcpyDtoHAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoHAsync_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L613_exception_handled;
              }
              __pyx_L613_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L617_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1947
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyDtoDAsync_v2
 *                 __cuMemcpyDtoDAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoDAsync_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1949
 *             try:
 *                 global __cuMemcpyDtoDAsync_v2
 *                 __cuMemcpyDtoDAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoDAsync_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1949, __pyx_L618_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1949, __pyx_L618_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpyDtoDAsync_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1949, __pyx_L618_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpyDtoDAsync_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1949, __pyx_L618_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1949, __pyx_L618_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyDtoDAsync_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyDtoDAsync_v2);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemcpyDtoDAsync_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1949, __pyx_L618_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1949, __pyx_L618_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoDAsync_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1947
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyDtoDAsync_v2
 *                 __cuMemcpyDtoDAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoDAsync_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L623_try_end;
              __pyx_L618_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1950
 *                 global __cuMemcpyDtoDAsync_v2
 *                 __cuMemcpyDtoDAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoDAsync_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L619_exception_handled;
              }
              __pyx_L619_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L623_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1952
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyHtoAAsync_v2
 *                 __cuMemcpyHtoAAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoAAsync_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1954
 *             try:
 *                 global __cuMemcpyHtoAAsync_v2
 *                 __cuMemcpyHtoAAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoAAsync_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1954, __pyx_L624_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1954, __pyx_L624_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpyHtoAAsync_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1954, __pyx_L624_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpyHtoAAsync_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1954, __pyx_L624_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1954, __pyx_L624_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyHtoAAsync_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyHtoAAsync_v2);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemcpyHtoAAsync_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1954, __pyx_L624_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1954, __pyx_L624_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoAAsync_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1952
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyHtoAAsync_v2
 *                 __cuMemcpyHtoAAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoAAsync_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L629_try_end;
              __pyx_L624_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1955
 *                 global __cuMemcpyHtoAAsync_v2
 *                 __cuMemcpyHtoAAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoAAsync_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L625_exception_handled;
              }
              __pyx_L625_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L629_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1957
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyAtoHAsync_v2
 *                 __cuMemcpyAtoHAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoHAsync_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1959
 *             try:
 *                 global __cuMemcpyAtoHAsync_v2
 *                 __cuMemcpyAtoHAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoHAsync_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1959, __pyx_L630_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1959, __pyx_L630_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpyAtoHAsync_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1959, __pyx_L630_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpyAtoHAsync_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1959, __pyx_L630_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1959, __pyx_L630_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpyAtoHAsync_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpyAtoHAsync_v2);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemcpyAtoHAsync_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1959, __pyx_L630_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1959, __pyx_L630_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoHAsync_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1957
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyAtoHAsync_v2
 *                 __cuMemcpyAtoHAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoHAsync_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L635_try_end;
              __pyx_L630_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1960
 *                 global __cuMemcpyAtoHAsync_v2
 *                 __cuMemcpyAtoHAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoHAsync_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L631_exception_handled;
              }
              __pyx_L631_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L635_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1962
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy2DAsync_v2
 *                 __cuMemcpy2DAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy2DAsync_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1964
 *             try:
 *                 global __cuMemcpy2DAsync_v2
 *                 __cuMemcpy2DAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy2DAsync_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1964, __pyx_L636_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1964, __pyx_L636_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpy2DAsync_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1964, __pyx_L636_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemcpy2DAsync_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1964, __pyx_L636_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1964, __pyx_L636_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpy2DAsync_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpy2DAsync_v2);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemcpy2DAsync_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1964, __pyx_L636_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1964, __pyx_L636_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2DAsync_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1962
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy2DAsync_v2
 *                 __cuMemcpy2DAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy2DAsync_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L641_try_end;
              __pyx_L636_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1965
 *                 global __cuMemcpy2DAsync_v2
 *                 __cuMemcpy2DAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy2DAsync_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L637_exception_handled;
              }
              __pyx_L637_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L641_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1967
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy3DAsync_v2
 *                 __cuMemcpy3DAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DAsync_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1969
 *             try:
 *                 global __cuMemcpy3DAsync_v2
 *                 __cuMemcpy3DAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DAsync_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1969, __pyx_L642_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1969, __pyx_L642_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpy3DAsync_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1969, __pyx_L642_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemcpy3DAsync_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1969, __pyx_L642_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1969, __pyx_L642_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpy3DAsync_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpy3DAsync_v2);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemcpy3DAsync_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1969, __pyx_L642_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1969, __pyx_L642_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DAsync_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1967
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy3DAsync_v2
 *                 __cuMemcpy3DAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DAsync_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L647_try_end;
              __pyx_L642_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1970
 *                 global __cuMemcpy3DAsync_v2
 *                 __cuMemcpy3DAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DAsync_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L643_exception_handled;
              }
              __pyx_L643_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L647_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1972
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy3DPeerAsync
 *                 __cuMemcpy3DPeerAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DPeerAsync')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1974
 *             try:
 *                 global __cuMemcpy3DPeerAsync
 *                 __cuMemcpy3DPeerAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DPeerAsync')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1974, __pyx_L648_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1974, __pyx_L648_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpy3DPeerAsync};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1974, __pyx_L648_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemcpy3DPeerAsync};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1974, __pyx_L648_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1974, __pyx_L648_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemcpy3DPeerAsync);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemcpy3DPeerAsync);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemcpy3DPeerAsync);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1974, __pyx_L648_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1974, __pyx_L648_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DPeerAsync = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1972
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy3DPeerAsync
 *                 __cuMemcpy3DPeerAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DPeerAsync')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L653_try_end;
              __pyx_L648_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1975
 *                 global __cuMemcpy3DPeerAsync
 *                 __cuMemcpy3DPeerAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DPeerAsync')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L649_exception_handled;
              }
              __pyx_L649_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L653_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1977
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD8_v2
 *                 __cuMemsetD8_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD8_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1979
 *             try:
 *                 global __cuMemsetD8_v2
 *                 __cuMemsetD8_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD8_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1979, __pyx_L654_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1979, __pyx_L654_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemsetD8_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1979, __pyx_L654_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemsetD8_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1979, __pyx_L654_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1979, __pyx_L654_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemsetD8_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemsetD8_v2);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemsetD8_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1979, __pyx_L654_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1979, __pyx_L654_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD8_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1977
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD8_v2
 *                 __cuMemsetD8_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD8_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L659_try_end;
              __pyx_L654_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1980
 *                 global __cuMemsetD8_v2
 *                 __cuMemsetD8_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD8_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L655_exception_handled;
              }
              __pyx_L655_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L659_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1982
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD16_v2
 *                 __cuMemsetD16_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD16_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1984
 *             try:
 *                 global __cuMemsetD16_v2
 *                 __cuMemsetD16_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD16_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1984, __pyx_L660_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1984, __pyx_L660_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemsetD16_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1984, __pyx_L660_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemsetD16_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1984, __pyx_L660_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1984, __pyx_L660_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemsetD16_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemsetD16_v2);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemsetD16_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1984, __pyx_L660_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1984, __pyx_L660_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD16_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1982
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD16_v2
 *                 __cuMemsetD16_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD16_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L665_try_end;
              __pyx_L660_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1985
 *                 global __cuMemsetD16_v2
 *                 __cuMemsetD16_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD16_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L661_exception_handled;
              }
              __pyx_L661_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L665_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1987
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD32_v2
 *                 __cuMemsetD32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD32_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1989
 *             try:
 *                 global __cuMemsetD32_v2
 *                 __cuMemsetD32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD32_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1989, __pyx_L666_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1989, __pyx_L666_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemsetD32_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1989, __pyx_L666_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemsetD32_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1989, __pyx_L666_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1989, __pyx_L666_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemsetD32_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemsetD32_v2);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemsetD32_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1989, __pyx_L666_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1989, __pyx_L666_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD32_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1987
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD32_v2
 *                 __cuMemsetD32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD32_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L671_try_end;
              __pyx_L666_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1990
 *                 global __cuMemsetD32_v2
 *                 __cuMemsetD32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD32_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L667_exception_handled;
              }
              __pyx_L667_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L671_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1992
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D8_v2
 *                 __cuMemsetD2D8_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D8_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1994
 *             try:
 *                 global __cuMemsetD2D8_v2
 *                 __cuMemsetD2D8_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D8_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1994, __pyx_L672_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1994, __pyx_L672_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemsetD2D8_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1994, __pyx_L672_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemsetD2D8_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1994, __pyx_L672_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1994, __pyx_L672_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemsetD2D8_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemsetD2D8_v2);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemsetD2D8_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1994, __pyx_L672_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1994, __pyx_L672_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D8_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1992
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D8_v2
 *                 __cuMemsetD2D8_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D8_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L677_try_end;
              __pyx_L672_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":1995
 *                 global __cuMemsetD2D8_v2
 *                 __cuMemsetD2D8_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D8_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L673_exception_handled;
              }
              __pyx_L673_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L677_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":1997
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D16_v2
 *                 __cuMemsetD2D16_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D16_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":1999
 *             try:
 *                 global __cuMemsetD2D16_v2
 *                 __cuMemsetD2D16_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D16_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1999, __pyx_L678_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1999, __pyx_L678_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemsetD2D16_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1999, __pyx_L678_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemsetD2D16_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1999, __pyx_L678_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1999, __pyx_L678_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemsetD2D16_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemsetD2D16_v2);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemsetD2D16_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1999, __pyx_L678_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1999, __pyx_L678_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D16_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1997
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D16_v2
 *                 __cuMemsetD2D16_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D16_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L683_try_end;
              __pyx_L678_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2000
 *                 global __cuMemsetD2D16_v2
 *                 __cuMemsetD2D16_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D16_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L679_exception_handled;
              }
              __pyx_L679_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L683_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2002
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D32_v2
 *                 __cuMemsetD2D32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D32_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2004
 *             try:
 *                 global __cuMemsetD2D32_v2
 *                 __cuMemsetD2D32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D32_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2004, __pyx_L684_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2004, __pyx_L684_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemsetD2D32_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2004, __pyx_L684_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemsetD2D32_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2004, __pyx_L684_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2004, __pyx_L684_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemsetD2D32_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemsetD2D32_v2);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemsetD2D32_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2004, __pyx_L684_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2004, __pyx_L684_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D32_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2002
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D32_v2
 *                 __cuMemsetD2D32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D32_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L689_try_end;
              __pyx_L684_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2005
 *                 global __cuMemsetD2D32_v2
 *                 __cuMemsetD2D32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D32_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L685_exception_handled;
              }
              __pyx_L685_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L689_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2007
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD8Async
 *                 __cuMemsetD8Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD8Async')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2009
 *             try:
 *                 global __cuMemsetD8Async
 *                 __cuMemsetD8Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD8Async')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2009, __pyx_L690_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2009, __pyx_L690_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemsetD8Async};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2009, __pyx_L690_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemsetD8Async};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2009, __pyx_L690_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2009, __pyx_L690_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemsetD8Async);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemsetD8Async);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemsetD8Async);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2009, __pyx_L690_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2009, __pyx_L690_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD8Async = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2007
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD8Async
 *                 __cuMemsetD8Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD8Async')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L695_try_end;
              __pyx_L690_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2010
 *                 global __cuMemsetD8Async
 *                 __cuMemsetD8Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD8Async')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L691_exception_handled;
              }
              __pyx_L691_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L695_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2012
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD16Async
 *                 __cuMemsetD16Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD16Async')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2014
 *             try:
 *                 global __cuMemsetD16Async
 *                 __cuMemsetD16Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD16Async')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2014, __pyx_L696_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2014, __pyx_L696_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemsetD16Async};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2014, __pyx_L696_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemsetD16Async};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2014, __pyx_L696_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2014, __pyx_L696_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemsetD16Async);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemsetD16Async);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemsetD16Async);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2014, __pyx_L696_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2014, __pyx_L696_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD16Async = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2012
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD16Async
 *                 __cuMemsetD16Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD16Async')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L701_try_end;
              __pyx_L696_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2015
 *                 global __cuMemsetD16Async
 *                 __cuMemsetD16Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD16Async')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L697_exception_handled;
              }
              __pyx_L697_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L701_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2017
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD32Async
 *                 __cuMemsetD32Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD32Async')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2019
 *             try:
 *                 global __cuMemsetD32Async
 *                 __cuMemsetD32Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD32Async')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2019, __pyx_L702_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2019, __pyx_L702_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemsetD32Async};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2019, __pyx_L702_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemsetD32Async};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2019, __pyx_L702_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2019, __pyx_L702_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemsetD32Async);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemsetD32Async);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemsetD32Async);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2019, __pyx_L702_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2019, __pyx_L702_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD32Async = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2017
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD32Async
 *                 __cuMemsetD32Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD32Async')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L707_try_end;
              __pyx_L702_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2020
 *                 global __cuMemsetD32Async
 *                 __cuMemsetD32Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD32Async')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L703_exception_handled;
              }
              __pyx_L703_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L707_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2022
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D8Async
 *                 __cuMemsetD2D8Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D8Async')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2024
 *             try:
 *                 global __cuMemsetD2D8Async
 *                 __cuMemsetD2D8Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D8Async')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2024, __pyx_L708_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2024, __pyx_L708_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemsetD2D8Async};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2024, __pyx_L708_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemsetD2D8Async};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2024, __pyx_L708_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2024, __pyx_L708_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemsetD2D8Async);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemsetD2D8Async);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemsetD2D8Async);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2024, __pyx_L708_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2024, __pyx_L708_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D8Async = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2022
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D8Async
 *                 __cuMemsetD2D8Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D8Async')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L713_try_end;
              __pyx_L708_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2025
 *                 global __cuMemsetD2D8Async
 *                 __cuMemsetD2D8Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D8Async')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L709_exception_handled;
              }
              __pyx_L709_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L713_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2027
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D16Async
 *                 __cuMemsetD2D16Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D16Async')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2029
 *             try:
 *                 global __cuMemsetD2D16Async
 *                 __cuMemsetD2D16Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D16Async')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2029, __pyx_L714_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2029, __pyx_L714_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemsetD2D16Async};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2029, __pyx_L714_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemsetD2D16Async};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2029, __pyx_L714_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2029, __pyx_L714_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemsetD2D16Async);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemsetD2D16Async);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemsetD2D16Async);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2029, __pyx_L714_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2029, __pyx_L714_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D16Async = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2027
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D16Async
 *                 __cuMemsetD2D16Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D16Async')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L719_try_end;
              __pyx_L714_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2030
 *                 global __cuMemsetD2D16Async
 *                 __cuMemsetD2D16Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D16Async')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L715_exception_handled;
              }
              __pyx_L715_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L719_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2032
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D32Async
 *                 __cuMemsetD2D32Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D32Async')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2034
 *             try:
 *                 global __cuMemsetD2D32Async
 *                 __cuMemsetD2D32Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D32Async')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2034, __pyx_L720_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2034, __pyx_L720_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemsetD2D32Async};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2034, __pyx_L720_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemsetD2D32Async};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2034, __pyx_L720_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2034, __pyx_L720_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemsetD2D32Async);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemsetD2D32Async);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemsetD2D32Async);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2034, __pyx_L720_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2034, __pyx_L720_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D32Async = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2032
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D32Async
 *                 __cuMemsetD2D32Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D32Async')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L725_try_end;
              __pyx_L720_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2035
 *                 global __cuMemsetD2D32Async
 *                 __cuMemsetD2D32Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D32Async')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L721_exception_handled;
              }
              __pyx_L721_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L725_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2037
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemMapArrayAsync
 *                 __cuMemMapArrayAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemMapArrayAsync')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2039
 *             try:
 *                 global __cuMemMapArrayAsync
 *                 __cuMemMapArrayAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemMapArrayAsync')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2039, __pyx_L726_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2039, __pyx_L726_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemMapArrayAsync};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2039, __pyx_L726_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemMapArrayAsync};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2039, __pyx_L726_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2039, __pyx_L726_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemMapArrayAsync);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemMapArrayAsync);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemMapArrayAsync);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2039, __pyx_L726_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2039, __pyx_L726_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemMapArrayAsync = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2037
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemMapArrayAsync
 *                 __cuMemMapArrayAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemMapArrayAsync')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L731_try_end;
              __pyx_L726_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2040
 *                 global __cuMemMapArrayAsync
 *                 __cuMemMapArrayAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemMapArrayAsync')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L727_exception_handled;
              }
              __pyx_L727_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L731_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2042
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemFreeAsync
 *                 __cuMemFreeAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemFreeAsync')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2044
 *             try:
 *                 global __cuMemFreeAsync
 *                 __cuMemFreeAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemFreeAsync')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2044, __pyx_L732_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2044, __pyx_L732_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemFreeAsync};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2044, __pyx_L732_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemFreeAsync};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2044, __pyx_L732_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2044, __pyx_L732_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemFreeAsync);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemFreeAsync);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemFreeAsync);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2044, __pyx_L732_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2044, __pyx_L732_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemFreeAsync = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2042
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemFreeAsync
 *                 __cuMemFreeAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemFreeAsync')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L737_try_end;
              __pyx_L732_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2045
 *                 global __cuMemFreeAsync
 *                 __cuMemFreeAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemFreeAsync')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L733_exception_handled;
              }
              __pyx_L733_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L737_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2047
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemAllocAsync
 *                 __cuMemAllocAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocAsync')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2049
 *             try:
 *                 global __cuMemAllocAsync
 *                 __cuMemAllocAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocAsync')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2049, __pyx_L738_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2049, __pyx_L738_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemAllocAsync};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2049, __pyx_L738_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemAllocAsync};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2049, __pyx_L738_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2049, __pyx_L738_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemAllocAsync);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemAllocAsync);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemAllocAsync);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2049, __pyx_L738_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2049, __pyx_L738_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocAsync = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2047
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemAllocAsync
 *                 __cuMemAllocAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocAsync')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L743_try_end;
              __pyx_L738_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2050
 *                 global __cuMemAllocAsync
 *                 __cuMemAllocAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocAsync')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L739_exception_handled;
              }
              __pyx_L739_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L743_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2052
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemAllocFromPoolAsync
 *                 __cuMemAllocFromPoolAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocFromPoolAsync')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2054
 *             try:
 *                 global __cuMemAllocFromPoolAsync
 *                 __cuMemAllocFromPoolAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocFromPoolAsync')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2054, __pyx_L744_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2054, __pyx_L744_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemAllocFromPoolAsync};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2054, __pyx_L744_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemAllocFromPoolAsync};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2054, __pyx_L744_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2054, __pyx_L744_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemAllocFromPoolAsync);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemAllocFromPoolAsync);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemAllocFromPoolAsync);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2054, __pyx_L744_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2054, __pyx_L744_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocFromPoolAsync = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2052
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemAllocFromPoolAsync
 *                 __cuMemAllocFromPoolAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocFromPoolAsync')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L749_try_end;
              __pyx_L744_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2055
 *                 global __cuMemAllocFromPoolAsync
 *                 __cuMemAllocFromPoolAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocFromPoolAsync')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L745_exception_handled;
              }
              __pyx_L745_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L749_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2057
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemPrefetchAsync
 *                 __cuMemPrefetchAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPrefetchAsync')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2059
 *             try:
 *                 global __cuMemPrefetchAsync
 *                 __cuMemPrefetchAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPrefetchAsync')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2059, __pyx_L750_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2059, __pyx_L750_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemPrefetchAsync};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2059, __pyx_L750_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemPrefetchAsync};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2059, __pyx_L750_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2059, __pyx_L750_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemPrefetchAsync);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemPrefetchAsync);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemPrefetchAsync);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2059, __pyx_L750_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2059, __pyx_L750_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemPrefetchAsync = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2057
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemPrefetchAsync
 *                 __cuMemPrefetchAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPrefetchAsync')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L755_try_end;
              __pyx_L750_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2060
 *                 global __cuMemPrefetchAsync
 *                 __cuMemPrefetchAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPrefetchAsync')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L751_exception_handled;
              }
              __pyx_L751_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L755_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2062
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemPrefetchAsync_v2
 *                 __cuMemPrefetchAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPrefetchAsync_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2064
 *             try:
 *                 global __cuMemPrefetchAsync_v2
 *                 __cuMemPrefetchAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPrefetchAsync_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2064, __pyx_L756_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2064, __pyx_L756_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemPrefetchAsync_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2064, __pyx_L756_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemPrefetchAsync_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2064, __pyx_L756_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2064, __pyx_L756_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuMemPrefetchAsync_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuMemPrefetchAsync_v2);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemPrefetchAsync_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2064, __pyx_L756_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2064, __pyx_L756_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuMemPrefetchAsync_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2062
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemPrefetchAsync_v2
 *                 __cuMemPrefetchAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPrefetchAsync_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L761_try_end;
              __pyx_L756_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2065
 *                 global __cuMemPrefetchAsync_v2
 *                 __cuMemPrefetchAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPrefetchAsync_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L757_exception_handled;
              }
              __pyx_L757_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L761_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2067
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetPriority
 *                 __cuStreamGetPriority = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetPriority')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2069
 *             try:
 *                 global __cuStreamGetPriority
 *                 __cuStreamGetPriority = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetPriority')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2069, __pyx_L762_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2069, __pyx_L762_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamGetPriority};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2069, __pyx_L762_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamGetPriority};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2069, __pyx_L762_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2069, __pyx_L762_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamGetPriority);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamGetPriority);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamGetPriority);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2069, __pyx_L762_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2069, __pyx_L762_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetPriority = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2067
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetPriority
 *                 __cuStreamGetPriority = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetPriority')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L767_try_end;
              __pyx_L762_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2070
 *                 global __cuStreamGetPriority
 *                 __cuStreamGetPriority = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetPriority')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L763_exception_handled;
              }
              __pyx_L763_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L767_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2072
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetFlags
 *                 __cuStreamGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetFlags')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2074
 *             try:
 *                 global __cuStreamGetFlags
 *                 __cuStreamGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetFlags')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2074, __pyx_L768_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2074, __pyx_L768_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamGetFlags};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2074, __pyx_L768_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamGetFlags};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2074, __pyx_L768_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2074, __pyx_L768_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamGetFlags);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamGetFlags);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamGetFlags);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2074, __pyx_L768_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2074, __pyx_L768_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetFlags = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2072
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetFlags
 *                 __cuStreamGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetFlags')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L773_try_end;
              __pyx_L768_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2075
 *                 global __cuStreamGetFlags
 *                 __cuStreamGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetFlags')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L769_exception_handled;
              }
              __pyx_L769_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L773_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2077
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetId
 *                 __cuStreamGetId = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetId')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2079
 *             try:
 *                 global __cuStreamGetId
 *                 __cuStreamGetId = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetId')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2079, __pyx_L774_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2079, __pyx_L774_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuStreamGetId};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2079, __pyx_L774_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuStreamGetId};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2079, __pyx_L774_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2079, __pyx_L774_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamGetId);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamGetId);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamGetId);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2079, __pyx_L774_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2079, __pyx_L774_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetId = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2077
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetId
 *                 __cuStreamGetId = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetId')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L779_try_end;
              __pyx_L774_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2080
 *                 global __cuStreamGetId
 *                 __cuStreamGetId = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetId')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L775_exception_handled;
              }
              __pyx_L775_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L779_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2082
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetCtx
 *                 __cuStreamGetCtx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCtx')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2084
 *             try:
 *                 global __cuStreamGetCtx
 *                 __cuStreamGetCtx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCtx')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2084, __pyx_L780_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2084, __pyx_L780_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamGetCtx};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2084, __pyx_L780_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamGetCtx};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2084, __pyx_L780_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2084, __pyx_L780_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamGetCtx);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamGetCtx);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamGetCtx);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2084, __pyx_L780_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2084, __pyx_L780_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCtx = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2082
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetCtx
 *                 __cuStreamGetCtx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCtx')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L785_try_end;
              __pyx_L780_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2085
 *                 global __cuStreamGetCtx
 *                 __cuStreamGetCtx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCtx')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L781_exception_handled;
              }
              __pyx_L781_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L785_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2087
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWaitEvent
 *                 __cuStreamWaitEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitEvent')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2089
 *             try:
 *                 global __cuStreamWaitEvent
 *                 __cuStreamWaitEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitEvent')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2089, __pyx_L786_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2089, __pyx_L786_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamWaitEvent};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2089, __pyx_L786_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamWaitEvent};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2089, __pyx_L786_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2089, __pyx_L786_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamWaitEvent);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamWaitEvent);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamWaitEvent);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2089, __pyx_L786_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2089, __pyx_L786_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitEvent = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2087
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWaitEvent
 *                 __cuStreamWaitEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitEvent')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L791_try_end;
              __pyx_L786_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2090
 *                 global __cuStreamWaitEvent
 *                 __cuStreamWaitEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitEvent')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L787_exception_handled;
              }
              __pyx_L787_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L791_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2092
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamAddCallback
 *                 __cuStreamAddCallback = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamAddCallback')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2094
 *             try:
 *                 global __cuStreamAddCallback
 *                 __cuStreamAddCallback = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamAddCallback')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2094, __pyx_L792_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2094, __pyx_L792_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuStreamAddCallback};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2094, __pyx_L792_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuStreamAddCallback};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2094, __pyx_L792_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2094, __pyx_L792_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamAddCallback);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamAddCallback);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamAddCallback);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2094, __pyx_L792_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2094, __pyx_L792_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamAddCallback = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2092
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamAddCallback
 *                 __cuStreamAddCallback = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamAddCallback')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L797_try_end;
              __pyx_L792_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2095
 *                 global __cuStreamAddCallback
 *                 __cuStreamAddCallback = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamAddCallback')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L793_exception_handled;
              }
              __pyx_L793_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L797_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2097
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamBeginCapture_v2
 *                 __cuStreamBeginCapture_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBeginCapture_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2099
 *             try:
 *                 global __cuStreamBeginCapture_v2
 *                 __cuStreamBeginCapture_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBeginCapture_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2099, __pyx_L798_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2099, __pyx_L798_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamBeginCapture_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2099, __pyx_L798_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamBeginCapture_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2099, __pyx_L798_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2099, __pyx_L798_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamBeginCapture_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamBeginCapture_v2);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamBeginCapture_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2099, __pyx_L798_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2099, __pyx_L798_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamBeginCapture_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2097
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamBeginCapture_v2
 *                 __cuStreamBeginCapture_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBeginCapture_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L803_try_end;
              __pyx_L798_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2100
 *                 global __cuStreamBeginCapture_v2
 *                 __cuStreamBeginCapture_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBeginCapture_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L799_exception_handled;
              }
              __pyx_L799_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L803_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2102
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamEndCapture
 *                 __cuStreamEndCapture = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamEndCapture')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2104
 *             try:
 *                 global __cuStreamEndCapture
 *                 __cuStreamEndCapture = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamEndCapture')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2104, __pyx_L804_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2104, __pyx_L804_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamEndCapture};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2104, __pyx_L804_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamEndCapture};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2104, __pyx_L804_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2104, __pyx_L804_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamEndCapture);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamEndCapture);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamEndCapture);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2104, __pyx_L804_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2104, __pyx_L804_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamEndCapture = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2102
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamEndCapture
 *                 __cuStreamEndCapture = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamEndCapture')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L809_try_end;
              __pyx_L804_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2105
 *                 global __cuStreamEndCapture
 *                 __cuStreamEndCapture = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamEndCapture')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L805_exception_handled;
              }
              __pyx_L805_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L809_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2107
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamIsCapturing
 *                 __cuStreamIsCapturing = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamIsCapturing')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2109
 *             try:
 *                 global __cuStreamIsCapturing
 *                 __cuStreamIsCapturing = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamIsCapturing')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2109, __pyx_L810_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2109, __pyx_L810_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuStreamIsCapturing};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2109, __pyx_L810_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuStreamIsCapturing};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2109, __pyx_L810_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2109, __pyx_L810_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamIsCapturing);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamIsCapturing);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamIsCapturing);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2109, __pyx_L810_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2109, __pyx_L810_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamIsCapturing = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2107
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamIsCapturing
 *                 __cuStreamIsCapturing = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamIsCapturing')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L815_try_end;
              __pyx_L810_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2110
 *                 global __cuStreamIsCapturing
 *                 __cuStreamIsCapturing = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamIsCapturing')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L811_exception_handled;
              }
              __pyx_L811_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L815_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2112
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetCaptureInfo_v2
 *                 __cuStreamGetCaptureInfo_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCaptureInfo_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2114
 *             try:
 *                 global __cuStreamGetCaptureInfo_v2
 *                 __cuStreamGetCaptureInfo_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCaptureInfo_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2114, __pyx_L816_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2114, __pyx_L816_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamGetCaptureInfo_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2114, __pyx_L816_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamGetCaptureInfo_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2114, __pyx_L816_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2114, __pyx_L816_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamGetCaptureInfo_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamGetCaptureInfo_v2);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamGetCaptureInfo_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2114, __pyx_L816_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2114, __pyx_L816_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCaptureInfo_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2112
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetCaptureInfo_v2
 *                 __cuStreamGetCaptureInfo_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCaptureInfo_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L821_try_end;
              __pyx_L816_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2115
 *                 global __cuStreamGetCaptureInfo_v2
 *                 __cuStreamGetCaptureInfo_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCaptureInfo_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L817_exception_handled;
              }
              __pyx_L817_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L821_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2117
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamUpdateCaptureDependencies
 *                 __cuStreamUpdateCaptureDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamUpdateCaptureDependencies')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2119
 *             try:
 *                 global __cuStreamUpdateCaptureDependencies
 *                 __cuStreamUpdateCaptureDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamUpdateCaptureDependencies')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2119, __pyx_L822_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2119, __pyx_L822_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamUpdateCaptureDependencie_2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2119, __pyx_L822_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamUpdateCaptureDependencie_2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2119, __pyx_L822_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2119, __pyx_L822_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamUpdateCaptureDependencie_2);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamUpdateCaptureDependencie_2);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamUpdateCaptureDependencie_2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2119, __pyx_L822_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2119, __pyx_L822_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamUpdateCaptureDependencies = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2117
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamUpdateCaptureDependencies
 *                 __cuStreamUpdateCaptureDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamUpdateCaptureDependencies')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L827_try_end;
              __pyx_L822_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2120
 *                 global __cuStreamUpdateCaptureDependencies
 *                 __cuStreamUpdateCaptureDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamUpdateCaptureDependencies')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L823_exception_handled;
              }
              __pyx_L823_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L827_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2122
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamAttachMemAsync
 *                 __cuStreamAttachMemAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamAttachMemAsync')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2124
 *             try:
 *                 global __cuStreamAttachMemAsync
 *                 __cuStreamAttachMemAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamAttachMemAsync')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2124, __pyx_L828_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2124, __pyx_L828_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuStreamAttachMemAsync};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2124, __pyx_L828_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuStreamAttachMemAsync};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2124, __pyx_L828_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2124, __pyx_L828_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamAttachMemAsync);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamAttachMemAsync);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamAttachMemAsync);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2124, __pyx_L828_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2124, __pyx_L828_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamAttachMemAsync = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2122
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamAttachMemAsync
 *                 __cuStreamAttachMemAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamAttachMemAsync')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L833_try_end;
              __pyx_L828_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2125
 *                 global __cuStreamAttachMemAsync
 *                 __cuStreamAttachMemAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamAttachMemAsync')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L829_exception_handled;
              }
              __pyx_L829_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L833_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2127
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamQuery
 *                 __cuStreamQuery = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamQuery')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2129
 *             try:
 *                 global __cuStreamQuery
 *                 __cuStreamQuery = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamQuery')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2129, __pyx_L834_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2129, __pyx_L834_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamQuery};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2129, __pyx_L834_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamQuery};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2129, __pyx_L834_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2129, __pyx_L834_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamQuery);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamQuery);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamQuery);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2129, __pyx_L834_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2129, __pyx_L834_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamQuery = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2127
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamQuery
 *                 __cuStreamQuery = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamQuery')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L839_try_end;
              __pyx_L834_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2130
 *                 global __cuStreamQuery
 *                 __cuStreamQuery = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamQuery')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L835_exception_handled;
              }
              __pyx_L835_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L839_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2132
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamSynchronize
 *                 __cuStreamSynchronize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamSynchronize')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2134
 *             try:
 *                 global __cuStreamSynchronize
 *                 __cuStreamSynchronize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamSynchronize')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2134, __pyx_L840_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2134, __pyx_L840_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamSynchronize};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2134, __pyx_L840_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamSynchronize};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2134, __pyx_L840_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2134, __pyx_L840_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamSynchronize);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamSynchronize);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamSynchronize);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2134, __pyx_L840_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2134, __pyx_L840_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamSynchronize = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2132
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamSynchronize
 *                 __cuStreamSynchronize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamSynchronize')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L845_try_end;
              __pyx_L840_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2135
 *                 global __cuStreamSynchronize
 *                 __cuStreamSynchronize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamSynchronize')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L841_exception_handled;
              }
              __pyx_L841_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L845_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2137
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamCopyAttributes
 *                 __cuStreamCopyAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamCopyAttributes')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2139
 *             try:
 *                 global __cuStreamCopyAttributes
 *                 __cuStreamCopyAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamCopyAttributes')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2139, __pyx_L846_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2139, __pyx_L846_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuStreamCopyAttributes};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2139, __pyx_L846_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuStreamCopyAttributes};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2139, __pyx_L846_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2139, __pyx_L846_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamCopyAttributes);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamCopyAttributes);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamCopyAttributes);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2139, __pyx_L846_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2139, __pyx_L846_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamCopyAttributes = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2137
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamCopyAttributes
 *                 __cuStreamCopyAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamCopyAttributes')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L851_try_end;
              __pyx_L846_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2140
 *                 global __cuStreamCopyAttributes
 *                 __cuStreamCopyAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamCopyAttributes')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L847_exception_handled;
              }
              __pyx_L847_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L851_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2142
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetAttribute
 *                 __cuStreamGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetAttribute')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2144
 *             try:
 *                 global __cuStreamGetAttribute
 *                 __cuStreamGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetAttribute')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2144, __pyx_L852_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2144, __pyx_L852_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamGetAttribute};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2144, __pyx_L852_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamGetAttribute};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2144, __pyx_L852_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2144, __pyx_L852_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamGetAttribute);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamGetAttribute);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamGetAttribute);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2144, __pyx_L852_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2144, __pyx_L852_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetAttribute = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2142
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetAttribute
 *                 __cuStreamGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetAttribute')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L857_try_end;
              __pyx_L852_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2145
 *                 global __cuStreamGetAttribute
 *                 __cuStreamGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetAttribute')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L853_exception_handled;
              }
              __pyx_L853_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L857_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2147
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamSetAttribute
 *                 __cuStreamSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamSetAttribute')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2149
 *             try:
 *                 global __cuStreamSetAttribute
 *                 __cuStreamSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamSetAttribute')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2149, __pyx_L858_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2149, __pyx_L858_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamSetAttribute};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2149, __pyx_L858_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamSetAttribute};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2149, __pyx_L858_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2149, __pyx_L858_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamSetAttribute);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamSetAttribute);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamSetAttribute);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2149, __pyx_L858_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2149, __pyx_L858_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamSetAttribute = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2147
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamSetAttribute
 *                 __cuStreamSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamSetAttribute')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L863_try_end;
              __pyx_L858_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2150
 *                 global __cuStreamSetAttribute
 *                 __cuStreamSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamSetAttribute')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L859_exception_handled;
              }
              __pyx_L859_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L863_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2152
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuEventRecord
 *                 __cuEventRecord = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventRecord')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2154
 *             try:
 *                 global __cuEventRecord
 *                 __cuEventRecord = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventRecord')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2154, __pyx_L864_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2154, __pyx_L864_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuEventRecord};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2154, __pyx_L864_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuEventRecord};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2154, __pyx_L864_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2154, __pyx_L864_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuEventRecord);
                  __Pyx_GIVEREF(__pyx_n_u_cuEventRecord);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuEventRecord);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2154, __pyx_L864_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2154, __pyx_L864_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuEventRecord = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2152
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuEventRecord
 *                 __cuEventRecord = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventRecord')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L869_try_end;
              __pyx_L864_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2155
 *                 global __cuEventRecord
 *                 __cuEventRecord = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventRecord')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L865_exception_handled;
              }
              __pyx_L865_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L869_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2157
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuEventRecordWithFlags
 *                 __cuEventRecordWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventRecordWithFlags')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2159
 *             try:
 *                 global __cuEventRecordWithFlags
 *                 __cuEventRecordWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventRecordWithFlags')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2159, __pyx_L870_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2159, __pyx_L870_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuEventRecordWithFlags};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2159, __pyx_L870_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuEventRecordWithFlags};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2159, __pyx_L870_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2159, __pyx_L870_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuEventRecordWithFlags);
                  __Pyx_GIVEREF(__pyx_n_u_cuEventRecordWithFlags);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuEventRecordWithFlags);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2159, __pyx_L870_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2159, __pyx_L870_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuEventRecordWithFlags = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2157
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuEventRecordWithFlags
 *                 __cuEventRecordWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventRecordWithFlags')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L875_try_end;
              __pyx_L870_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2160
 *                 global __cuEventRecordWithFlags
 *                 __cuEventRecordWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventRecordWithFlags')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L871_exception_handled;
              }
              __pyx_L871_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L875_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2162
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuSignalExternalSemaphoresAsync
 *                 __cuSignalExternalSemaphoresAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSignalExternalSemaphoresAsync')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2164
 *             try:
 *                 global __cuSignalExternalSemaphoresAsync
 *                 __cuSignalExternalSemaphoresAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSignalExternalSemaphoresAsync')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2164, __pyx_L876_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2164, __pyx_L876_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuSignalExternalSemaphoresAsync_2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2164, __pyx_L876_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuSignalExternalSemaphoresAsync_2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2164, __pyx_L876_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2164, __pyx_L876_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuSignalExternalSemaphoresAsync_2);
                  __Pyx_GIVEREF(__pyx_n_u_cuSignalExternalSemaphoresAsync_2);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuSignalExternalSemaphoresAsync_2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2164, __pyx_L876_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2164, __pyx_L876_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuSignalExternalSemaphoresAsync = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2162
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuSignalExternalSemaphoresAsync
 *                 __cuSignalExternalSemaphoresAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSignalExternalSemaphoresAsync')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L881_try_end;
              __pyx_L876_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2165
 *                 global __cuSignalExternalSemaphoresAsync
 *                 __cuSignalExternalSemaphoresAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSignalExternalSemaphoresAsync')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L877_exception_handled;
              }
              __pyx_L877_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L881_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2167
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuWaitExternalSemaphoresAsync
 *                 __cuWaitExternalSemaphoresAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuWaitExternalSemaphoresAsync')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2169
 *             try:
 *                 global __cuWaitExternalSemaphoresAsync
 *                 __cuWaitExternalSemaphoresAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuWaitExternalSemaphoresAsync')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2169, __pyx_L882_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2169, __pyx_L882_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuWaitExternalSemaphoresAsync};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2169, __pyx_L882_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuWaitExternalSemaphoresAsync};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2169, __pyx_L882_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2169, __pyx_L882_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuWaitExternalSemaphoresAsync);
                  __Pyx_GIVEREF(__pyx_n_u_cuWaitExternalSemaphoresAsync);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuWaitExternalSemaphoresAsync);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2169, __pyx_L882_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2169, __pyx_L882_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuWaitExternalSemaphoresAsync = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2167
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuWaitExternalSemaphoresAsync
 *                 __cuWaitExternalSemaphoresAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuWaitExternalSemaphoresAsync')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L887_try_end;
              __pyx_L882_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2170
 *                 global __cuWaitExternalSemaphoresAsync
 *                 __cuWaitExternalSemaphoresAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuWaitExternalSemaphoresAsync')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L883_exception_handled;
              }
              __pyx_L883_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L887_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2172
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWaitValue32_v2
 *                 __cuStreamWaitValue32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue32_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2174
 *             try:
 *                 global __cuStreamWaitValue32_v2
 *                 __cuStreamWaitValue32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue32_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2174, __pyx_L888_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2174, __pyx_L888_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamWaitValue32_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2174, __pyx_L888_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamWaitValue32_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2174, __pyx_L888_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2174, __pyx_L888_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamWaitValue32_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamWaitValue32_v2);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamWaitValue32_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2174, __pyx_L888_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2174, __pyx_L888_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue32_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2172
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWaitValue32_v2
 *                 __cuStreamWaitValue32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue32_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L893_try_end;
              __pyx_L888_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2175
 *                 global __cuStreamWaitValue32_v2
 *                 __cuStreamWaitValue32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue32_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L889_exception_handled;
              }
              __pyx_L889_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L893_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2177
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWaitValue64_v2
 *                 __cuStreamWaitValue64_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue64_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2179
 *             try:
 *                 global __cuStreamWaitValue64_v2
 *                 __cuStreamWaitValue64_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue64_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2179, __pyx_L894_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2179, __pyx_L894_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamWaitValue64_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2179, __pyx_L894_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamWaitValue64_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2179, __pyx_L894_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2179, __pyx_L894_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamWaitValue64_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamWaitValue64_v2);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamWaitValue64_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2179, __pyx_L894_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2179, __pyx_L894_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue64_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2177
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWaitValue64_v2
 *                 __cuStreamWaitValue64_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue64_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L899_try_end;
              __pyx_L894_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2180
 *                 global __cuStreamWaitValue64_v2
 *                 __cuStreamWaitValue64_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue64_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L895_exception_handled;
              }
              __pyx_L895_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L899_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2182
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWriteValue32_v2
 *                 __cuStreamWriteValue32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue32_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2184
 *             try:
 *                 global __cuStreamWriteValue32_v2
 *                 __cuStreamWriteValue32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue32_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2184, __pyx_L900_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2184, __pyx_L900_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuStreamWriteValue32_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2184, __pyx_L900_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuStreamWriteValue32_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2184, __pyx_L900_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2184, __pyx_L900_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamWriteValue32_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamWriteValue32_v2);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamWriteValue32_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2184, __pyx_L900_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2184, __pyx_L900_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue32_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2182
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWriteValue32_v2
 *                 __cuStreamWriteValue32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue32_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L905_try_end;
              __pyx_L900_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2185
 *                 global __cuStreamWriteValue32_v2
 *                 __cuStreamWriteValue32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue32_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L901_exception_handled;
              }
              __pyx_L901_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L905_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2187
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWriteValue64_v2
 *                 __cuStreamWriteValue64_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue64_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2189
 *             try:
 *                 global __cuStreamWriteValue64_v2
 *                 __cuStreamWriteValue64_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue64_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2189, __pyx_L906_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2189, __pyx_L906_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamWriteValue64_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2189, __pyx_L906_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamWriteValue64_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2189, __pyx_L906_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2189, __pyx_L906_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamWriteValue64_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamWriteValue64_v2);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamWriteValue64_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2189, __pyx_L906_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2189, __pyx_L906_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue64_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2187
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWriteValue64_v2
 *                 __cuStreamWriteValue64_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue64_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L911_try_end;
              __pyx_L906_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2190
 *                 global __cuStreamWriteValue64_v2
 *                 __cuStreamWriteValue64_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue64_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L907_exception_handled;
              }
              __pyx_L907_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L911_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2192
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamBatchMemOp_v2
 *                 __cuStreamBatchMemOp_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBatchMemOp_v2')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2194
 *             try:
 *                 global __cuStreamBatchMemOp_v2
 *                 __cuStreamBatchMemOp_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBatchMemOp_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2194, __pyx_L912_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2194, __pyx_L912_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamBatchMemOp_v2};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2194, __pyx_L912_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamBatchMemOp_v2};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2194, __pyx_L912_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2194, __pyx_L912_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuStreamBatchMemOp_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamBatchMemOp_v2);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamBatchMemOp_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2194, __pyx_L912_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2194, __pyx_L912_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamBatchMemOp_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2192
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamBatchMemOp_v2
 *                 __cuStreamBatchMemOp_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBatchMemOp_v2')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L917_try_end;
              __pyx_L912_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2195
 *                 global __cuStreamBatchMemOp_v2
 *                 __cuStreamBatchMemOp_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBatchMemOp_v2')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L913_exception_handled;
              }
              __pyx_L913_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L917_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2197
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuLaunchKernel
 *                 __cuLaunchKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchKernel')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2199
 *             try:
 *                 global __cuLaunchKernel
 *                 __cuLaunchKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchKernel')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2199, __pyx_L918_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2199, __pyx_L918_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuLaunchKernel};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2199, __pyx_L918_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuLaunchKernel};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2199, __pyx_L918_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2199, __pyx_L918_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuLaunchKernel);
                  __Pyx_GIVEREF(__pyx_n_u_cuLaunchKernel);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuLaunchKernel);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2199, __pyx_L918_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2199, __pyx_L918_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchKernel = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2197
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuLaunchKernel
 *                 __cuLaunchKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchKernel')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L923_try_end;
              __pyx_L918_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2200
 *                 global __cuLaunchKernel
 *                 __cuLaunchKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchKernel')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L919_exception_handled;
              }
              __pyx_L919_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L923_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2202
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuLaunchKernelEx
 *                 __cuLaunchKernelEx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchKernelEx')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2204
 *             try:
 *                 global __cuLaunchKernelEx
 *                 __cuLaunchKernelEx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchKernelEx')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2204, __pyx_L924_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2204, __pyx_L924_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuLaunchKernelEx};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2204, __pyx_L924_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuLaunchKernelEx};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2204, __pyx_L924_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2204, __pyx_L924_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuLaunchKernelEx);
                  __Pyx_GIVEREF(__pyx_n_u_cuLaunchKernelEx);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuLaunchKernelEx);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2204, __pyx_L924_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2204, __pyx_L924_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchKernelEx = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2202
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuLaunchKernelEx
 *                 __cuLaunchKernelEx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchKernelEx')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L929_try_end;
              __pyx_L924_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2205
 *                 global __cuLaunchKernelEx
 *                 __cuLaunchKernelEx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchKernelEx')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L925_exception_handled;
              }
              __pyx_L925_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L929_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2207
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuLaunchCooperativeKernel
 *                 __cuLaunchCooperativeKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchCooperativeKernel')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2209
 *             try:
 *                 global __cuLaunchCooperativeKernel
 *                 __cuLaunchCooperativeKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchCooperativeKernel')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2209, __pyx_L930_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2209, __pyx_L930_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuLaunchCooperativeKernel};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2209, __pyx_L930_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuLaunchCooperativeKernel};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2209, __pyx_L930_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2209, __pyx_L930_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuLaunchCooperativeKernel);
                  __Pyx_GIVEREF(__pyx_n_u_cuLaunchCooperativeKernel);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuLaunchCooperativeKernel);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2209, __pyx_L930_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2209, __pyx_L930_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchCooperativeKernel = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2207
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuLaunchCooperativeKernel
 *                 __cuLaunchCooperativeKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchCooperativeKernel')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L935_try_end;
              __pyx_L930_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2210
 *                 global __cuLaunchCooperativeKernel
 *                 __cuLaunchCooperativeKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchCooperativeKernel')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L931_exception_handled;
              }
              __pyx_L931_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L935_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2212
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuLaunchHostFunc
 *                 __cuLaunchHostFunc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchHostFunc')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2214
 *             try:
 *                 global __cuLaunchHostFunc
 *                 __cuLaunchHostFunc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchHostFunc')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2214, __pyx_L936_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2214, __pyx_L936_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuLaunchHostFunc};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2214, __pyx_L936_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuLaunchHostFunc};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2214, __pyx_L936_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2214, __pyx_L936_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuLaunchHostFunc);
                  __Pyx_GIVEREF(__pyx_n_u_cuLaunchHostFunc);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuLaunchHostFunc);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2214, __pyx_L936_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2214, __pyx_L936_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchHostFunc = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2212
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuLaunchHostFunc
 *                 __cuLaunchHostFunc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchHostFunc')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L941_try_end;
              __pyx_L936_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2215
 *                 global __cuLaunchHostFunc
 *                 __cuLaunchHostFunc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchHostFunc')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L937_exception_handled;
              }
              __pyx_L937_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L941_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2217
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuGraphInstantiateWithParams
 *                 __cuGraphInstantiateWithParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphInstantiateWithParams')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2219
 *             try:
 *                 global __cuGraphInstantiateWithParams
 *                 __cuGraphInstantiateWithParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphInstantiateWithParams')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2219, __pyx_L942_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2219, __pyx_L942_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphInstantiateWithParams};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2219, __pyx_L942_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphInstantiateWithParams};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2219, __pyx_L942_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2219, __pyx_L942_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuGraphInstantiateWithParams);
                  __Pyx_GIVEREF(__pyx_n_u_cuGraphInstantiateWithParams);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphInstantiateWithParams);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2219, __pyx_L942_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2219, __pyx_L942_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuGraphInstantiateWithParams = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2217
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuGraphInstantiateWithParams
 *                 __cuGraphInstantiateWithParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphInstantiateWithParams')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L947_try_end;
              __pyx_L942_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2220
 *                 global __cuGraphInstantiateWithParams
 *                 __cuGraphInstantiateWithParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphInstantiateWithParams')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L943_exception_handled;
              }
              __pyx_L943_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L947_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2222
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuGraphUpload
 *                 __cuGraphUpload = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphUpload')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2224
 *             try:
 *                 global __cuGraphUpload
 *                 __cuGraphUpload = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphUpload')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2224, __pyx_L948_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2224, __pyx_L948_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphUpload};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2224, __pyx_L948_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphUpload};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2224, __pyx_L948_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2224, __pyx_L948_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuGraphUpload);
                  __Pyx_GIVEREF(__pyx_n_u_cuGraphUpload);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphUpload);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2224, __pyx_L948_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2224, __pyx_L948_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuGraphUpload = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2222
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuGraphUpload
 *                 __cuGraphUpload = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphUpload')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L953_try_end;
              __pyx_L948_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2225
 *                 global __cuGraphUpload
 *                 __cuGraphUpload = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphUpload')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L949_exception_handled;
              }
              __pyx_L949_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L953_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2227
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuGraphLaunch
 *                 __cuGraphLaunch = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphLaunch')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2229
 *             try:
 *                 global __cuGraphLaunch
 *                 __cuGraphLaunch = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphLaunch')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2229, __pyx_L954_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2229, __pyx_L954_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_10 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphLaunch};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2229, __pyx_L954_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphLaunch};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2229, __pyx_L954_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2229, __pyx_L954_error)
                  __Pyx_GOTREF(__pyx_t_12);
                  if (__pyx_t_10) {
                    __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuGraphLaunch);
                  __Pyx_GIVEREF(__pyx_n_u_cuGraphLaunch);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphLaunch);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2229, __pyx_L954_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2229, __pyx_L954_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuGraphLaunch = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2227
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuGraphLaunch
 *                 __cuGraphLaunch = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphLaunch')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L959_try_end;
              __pyx_L954_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2230
 *                 global __cuGraphLaunch
 *                 __cuGraphLaunch = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphLaunch')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L955_exception_handled;
              }
              __pyx_L955_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L959_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2232
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuGraphicsMapResources
 *                 __cuGraphicsMapResources = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsMapResources')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_9);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2234
 *             try:
 *                 global __cuGraphicsMapResources
 *                 __cuGraphicsMapResources = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsMapResources')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2234, __pyx_L960_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2234, __pyx_L960_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_3 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_12, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphicsMapResources};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2234, __pyx_L960_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphicsMapResources};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2234, __pyx_L960_error)
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2234, __pyx_L960_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  if (__pyx_t_3) {
                    __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuGraphicsMapResources);
                  __Pyx_GIVEREF(__pyx_n_u_cuGraphicsMapResources);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphicsMapResources);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2234, __pyx_L960_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2234, __pyx_L960_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsMapResources = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2232
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuGraphicsMapResources
 *                 __cuGraphicsMapResources = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsMapResources')
 */
              }
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L965_try_end;
              __pyx_L960_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2235
 *                 global __cuGraphicsMapResources
 *                 __cuGraphicsMapResources = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsMapResources')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L961_exception_handled;
              }
              __pyx_L961_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
              __pyx_L965_try_end:;
            }

            /* "cuda/_cuda/ccuda.pyx":2237
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuGraphicsUnmapResources
 *                 __cuGraphicsUnmapResources = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsUnmapResources')
 */
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_8);
              __Pyx_XGOTREF(__pyx_t_7);
              /*try:*/ {

                /* "cuda/_cuda/ccuda.pyx":2239
 *             try:
 *                 global __cuGraphicsUnmapResources
 *                 __cuGraphicsUnmapResources = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsUnmapResources')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2239, __pyx_L966_error)
                __Pyx_GOTREF(__pyx_t_12);
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2239, __pyx_L966_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_12 = NULL;
                __pyx_t_13 = 0;
                if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_12)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_12);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_13 = 1;
                  }
                }
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphicsUnmapResources};
                  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2239, __pyx_L966_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                  PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphicsUnmapResources};
                  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2239, __pyx_L966_error)
                  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                  __Pyx_GOTREF(__pyx_t_4);
                } else
                #endif
                {
                  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2239, __pyx_L966_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  if (__pyx_t_12) {
                    __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                  }
                  __Pyx_INCREF(__pyx_v_handle);
                  __Pyx_GIVEREF(__pyx_v_handle);
                  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                  __Pyx_INCREF(__pyx_n_u_cuGraphicsUnmapResources);
                  __Pyx_GIVEREF(__pyx_n_u_cuGraphicsUnmapResources);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphicsUnmapResources);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2239, __pyx_L966_error)
                  __Pyx_GOTREF(__pyx_t_4);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2239, __pyx_L966_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsUnmapResources = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2237
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuGraphicsUnmapResources
 *                 __cuGraphicsUnmapResources = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsUnmapResources')
 */
              }
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              goto __pyx_L971_try_end;
              __pyx_L966_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

              /* "cuda/_cuda/ccuda.pyx":2240
 *                 global __cuGraphicsUnmapResources
 *                 __cuGraphicsUnmapResources = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsUnmapResources')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *         # Get remaining functions
 */
              /*except:*/ {
                __Pyx_ErrRestore(0,0,0);
                goto __pyx_L967_exception_handled;
              }
              __pyx_L967_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_8);
              __Pyx_XGIVEREF(__pyx_t_7);
              __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
              __pyx_L971_try_end:;
            }
          }
          __pyx_L47:;

          /* "cuda/_cuda/ccuda.pyx":2243
 *                 pass
 *         # Get remaining functions
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGetErrorString
 *             __cuGetErrorString = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetErrorString')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2245
 *         try:
 *             global __cuGetErrorString
 *             __cuGetErrorString = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetErrorString')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2245, __pyx_L972_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2245, __pyx_L972_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGetErrorString};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2245, __pyx_L972_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGetErrorString};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2245, __pyx_L972_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2245, __pyx_L972_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGetErrorString);
                __Pyx_GIVEREF(__pyx_n_u_cuGetErrorString);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGetErrorString);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2245, __pyx_L972_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2245, __pyx_L972_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGetErrorString = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2243
 *                 pass
 *         # Get remaining functions
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGetErrorString
 *             __cuGetErrorString = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetErrorString')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L977_try_end;
            __pyx_L972_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2246
 *             global __cuGetErrorString
 *             __cuGetErrorString = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetErrorString')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L973_exception_handled;
            }
            __pyx_L973_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L977_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2248
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGetErrorName
 *             __cuGetErrorName = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetErrorName')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2250
 *         try:
 *             global __cuGetErrorName
 *             __cuGetErrorName = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetErrorName')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2250, __pyx_L978_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2250, __pyx_L978_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGetErrorName};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2250, __pyx_L978_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGetErrorName};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2250, __pyx_L978_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2250, __pyx_L978_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGetErrorName);
                __Pyx_GIVEREF(__pyx_n_u_cuGetErrorName);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGetErrorName);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2250, __pyx_L978_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2250, __pyx_L978_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGetErrorName = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2248
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGetErrorName
 *             __cuGetErrorName = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetErrorName')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L983_try_end;
            __pyx_L978_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2251
 *             global __cuGetErrorName
 *             __cuGetErrorName = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetErrorName')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L979_exception_handled;
            }
            __pyx_L979_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L983_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2253
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuInit
 *             __cuInit = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuInit')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2255
 *         try:
 *             global __cuInit
 *             __cuInit = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuInit')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2255, __pyx_L984_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2255, __pyx_L984_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuInit};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2255, __pyx_L984_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuInit};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2255, __pyx_L984_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2255, __pyx_L984_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuInit);
                __Pyx_GIVEREF(__pyx_n_u_cuInit);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuInit);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2255, __pyx_L984_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2255, __pyx_L984_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuInit = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2253
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuInit
 *             __cuInit = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuInit')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L989_try_end;
            __pyx_L984_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2256
 *             global __cuInit
 *             __cuInit = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuInit')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L985_exception_handled;
            }
            __pyx_L985_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L989_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2258
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDriverGetVersion
 *             __cuDriverGetVersion = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDriverGetVersion')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2260
 *         try:
 *             global __cuDriverGetVersion
 *             __cuDriverGetVersion = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDriverGetVersion')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2260, __pyx_L990_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2260, __pyx_L990_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuDriverGetVersion};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2260, __pyx_L990_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuDriverGetVersion};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2260, __pyx_L990_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2260, __pyx_L990_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDriverGetVersion);
                __Pyx_GIVEREF(__pyx_n_u_cuDriverGetVersion);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuDriverGetVersion);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2260, __pyx_L990_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2260, __pyx_L990_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDriverGetVersion = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2258
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDriverGetVersion
 *             __cuDriverGetVersion = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDriverGetVersion')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L995_try_end;
            __pyx_L990_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2261
 *             global __cuDriverGetVersion
 *             __cuDriverGetVersion = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDriverGetVersion')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L991_exception_handled;
            }
            __pyx_L991_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L995_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2263
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGet
 *             __cuDeviceGet = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGet')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2265
 *         try:
 *             global __cuDeviceGet
 *             __cuDeviceGet = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGet')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2265, __pyx_L996_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2265, __pyx_L996_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuDeviceGet};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2265, __pyx_L996_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuDeviceGet};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2265, __pyx_L996_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2265, __pyx_L996_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDeviceGet);
                __Pyx_GIVEREF(__pyx_n_u_cuDeviceGet);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuDeviceGet);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2265, __pyx_L996_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2265, __pyx_L996_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGet = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2263
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGet
 *             __cuDeviceGet = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGet')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1001_try_end;
            __pyx_L996_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2266
 *             global __cuDeviceGet
 *             __cuDeviceGet = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGet')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L997_exception_handled;
            }
            __pyx_L997_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1001_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2268
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetCount
 *             __cuDeviceGetCount = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetCount')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2270
 *         try:
 *             global __cuDeviceGetCount
 *             __cuDeviceGetCount = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetCount')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2270, __pyx_L1002_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2270, __pyx_L1002_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuDeviceGetCount};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2270, __pyx_L1002_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuDeviceGetCount};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2270, __pyx_L1002_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2270, __pyx_L1002_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDeviceGetCount);
                __Pyx_GIVEREF(__pyx_n_u_cuDeviceGetCount);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuDeviceGetCount);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2270, __pyx_L1002_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2270, __pyx_L1002_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetCount = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2268
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetCount
 *             __cuDeviceGetCount = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetCount')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1007_try_end;
            __pyx_L1002_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2271
 *             global __cuDeviceGetCount
 *             __cuDeviceGetCount = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetCount')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1003_exception_handled;
            }
            __pyx_L1003_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1007_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2273
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetName
 *             __cuDeviceGetName = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetName')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2275
 *         try:
 *             global __cuDeviceGetName
 *             __cuDeviceGetName = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetName')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2275, __pyx_L1008_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2275, __pyx_L1008_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuDeviceGetName};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2275, __pyx_L1008_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuDeviceGetName};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2275, __pyx_L1008_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2275, __pyx_L1008_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDeviceGetName);
                __Pyx_GIVEREF(__pyx_n_u_cuDeviceGetName);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuDeviceGetName);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2275, __pyx_L1008_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2275, __pyx_L1008_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetName = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2273
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetName
 *             __cuDeviceGetName = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetName')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1013_try_end;
            __pyx_L1008_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2276
 *             global __cuDeviceGetName
 *             __cuDeviceGetName = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetName')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1009_exception_handled;
            }
            __pyx_L1009_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1013_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2278
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetUuid
 *             __cuDeviceGetUuid = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetUuid')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2280
 *         try:
 *             global __cuDeviceGetUuid
 *             __cuDeviceGetUuid = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetUuid')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2280, __pyx_L1014_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2280, __pyx_L1014_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuDeviceGetUuid};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2280, __pyx_L1014_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuDeviceGetUuid};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2280, __pyx_L1014_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2280, __pyx_L1014_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDeviceGetUuid);
                __Pyx_GIVEREF(__pyx_n_u_cuDeviceGetUuid);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuDeviceGetUuid);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2280, __pyx_L1014_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2280, __pyx_L1014_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetUuid = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2278
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetUuid
 *             __cuDeviceGetUuid = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetUuid')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1019_try_end;
            __pyx_L1014_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2281
 *             global __cuDeviceGetUuid
 *             __cuDeviceGetUuid = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetUuid')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1015_exception_handled;
            }
            __pyx_L1015_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1019_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2283
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetUuid_v2
 *             __cuDeviceGetUuid_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetUuid_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2285
 *         try:
 *             global __cuDeviceGetUuid_v2
 *             __cuDeviceGetUuid_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetUuid_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2285, __pyx_L1020_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2285, __pyx_L1020_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuDeviceGetUuid_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2285, __pyx_L1020_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuDeviceGetUuid_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2285, __pyx_L1020_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2285, __pyx_L1020_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDeviceGetUuid_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuDeviceGetUuid_v2);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuDeviceGetUuid_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2285, __pyx_L1020_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2285, __pyx_L1020_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetUuid_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2283
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetUuid_v2
 *             __cuDeviceGetUuid_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetUuid_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1025_try_end;
            __pyx_L1020_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2286
 *             global __cuDeviceGetUuid_v2
 *             __cuDeviceGetUuid_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetUuid_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1021_exception_handled;
            }
            __pyx_L1021_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1025_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2288
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetLuid
 *             __cuDeviceGetLuid = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetLuid')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2290
 *         try:
 *             global __cuDeviceGetLuid
 *             __cuDeviceGetLuid = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetLuid')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2290, __pyx_L1026_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2290, __pyx_L1026_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuDeviceGetLuid};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2290, __pyx_L1026_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuDeviceGetLuid};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2290, __pyx_L1026_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2290, __pyx_L1026_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDeviceGetLuid);
                __Pyx_GIVEREF(__pyx_n_u_cuDeviceGetLuid);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuDeviceGetLuid);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2290, __pyx_L1026_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2290, __pyx_L1026_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetLuid = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2288
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetLuid
 *             __cuDeviceGetLuid = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetLuid')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1031_try_end;
            __pyx_L1026_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2291
 *             global __cuDeviceGetLuid
 *             __cuDeviceGetLuid = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetLuid')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1027_exception_handled;
            }
            __pyx_L1027_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1031_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2293
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceTotalMem_v2
 *             __cuDeviceTotalMem_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceTotalMem_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2295
 *         try:
 *             global __cuDeviceTotalMem_v2
 *             __cuDeviceTotalMem_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceTotalMem_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2295, __pyx_L1032_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2295, __pyx_L1032_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuDeviceTotalMem_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2295, __pyx_L1032_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuDeviceTotalMem_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2295, __pyx_L1032_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2295, __pyx_L1032_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDeviceTotalMem_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuDeviceTotalMem_v2);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuDeviceTotalMem_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2295, __pyx_L1032_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2295, __pyx_L1032_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceTotalMem_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2293
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceTotalMem_v2
 *             __cuDeviceTotalMem_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceTotalMem_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1037_try_end;
            __pyx_L1032_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2296
 *             global __cuDeviceTotalMem_v2
 *             __cuDeviceTotalMem_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceTotalMem_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1033_exception_handled;
            }
            __pyx_L1033_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1037_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2298
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetTexture1DLinearMaxWidth
 *             __cuDeviceGetTexture1DLinearMaxWidth = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetTexture1DLinearMaxWidth')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2300
 *         try:
 *             global __cuDeviceGetTexture1DLinearMaxWidth
 *             __cuDeviceGetTexture1DLinearMaxWidth = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetTexture1DLinearMaxWidth')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2300, __pyx_L1038_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2300, __pyx_L1038_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuDeviceGetTexture1DLinearMaxWid};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2300, __pyx_L1038_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuDeviceGetTexture1DLinearMaxWid};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2300, __pyx_L1038_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2300, __pyx_L1038_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDeviceGetTexture1DLinearMaxWid);
                __Pyx_GIVEREF(__pyx_n_u_cuDeviceGetTexture1DLinearMaxWid);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuDeviceGetTexture1DLinearMaxWid);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2300, __pyx_L1038_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2300, __pyx_L1038_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetTexture1DLinearMaxWidth = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2298
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetTexture1DLinearMaxWidth
 *             __cuDeviceGetTexture1DLinearMaxWidth = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetTexture1DLinearMaxWidth')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1043_try_end;
            __pyx_L1038_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2301
 *             global __cuDeviceGetTexture1DLinearMaxWidth
 *             __cuDeviceGetTexture1DLinearMaxWidth = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetTexture1DLinearMaxWidth')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1039_exception_handled;
            }
            __pyx_L1039_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1043_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2303
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetAttribute
 *             __cuDeviceGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetAttribute')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2305
 *         try:
 *             global __cuDeviceGetAttribute
 *             __cuDeviceGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetAttribute')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2305, __pyx_L1044_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2305, __pyx_L1044_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuDeviceGetAttribute};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2305, __pyx_L1044_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuDeviceGetAttribute};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2305, __pyx_L1044_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2305, __pyx_L1044_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDeviceGetAttribute);
                __Pyx_GIVEREF(__pyx_n_u_cuDeviceGetAttribute);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuDeviceGetAttribute);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2305, __pyx_L1044_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2305, __pyx_L1044_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetAttribute = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2303
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetAttribute
 *             __cuDeviceGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetAttribute')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1049_try_end;
            __pyx_L1044_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2306
 *             global __cuDeviceGetAttribute
 *             __cuDeviceGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetAttribute')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1045_exception_handled;
            }
            __pyx_L1045_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1049_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2308
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetNvSciSyncAttributes
 *             __cuDeviceGetNvSciSyncAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetNvSciSyncAttributes')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2310
 *         try:
 *             global __cuDeviceGetNvSciSyncAttributes
 *             __cuDeviceGetNvSciSyncAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetNvSciSyncAttributes')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2310, __pyx_L1050_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2310, __pyx_L1050_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuDeviceGetNvSciSyncAttributes};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2310, __pyx_L1050_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuDeviceGetNvSciSyncAttributes};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2310, __pyx_L1050_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2310, __pyx_L1050_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDeviceGetNvSciSyncAttributes);
                __Pyx_GIVEREF(__pyx_n_u_cuDeviceGetNvSciSyncAttributes);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuDeviceGetNvSciSyncAttributes);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2310, __pyx_L1050_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2310, __pyx_L1050_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetNvSciSyncAttributes = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2308
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetNvSciSyncAttributes
 *             __cuDeviceGetNvSciSyncAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetNvSciSyncAttributes')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1055_try_end;
            __pyx_L1050_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2311
 *             global __cuDeviceGetNvSciSyncAttributes
 *             __cuDeviceGetNvSciSyncAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetNvSciSyncAttributes')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1051_exception_handled;
            }
            __pyx_L1051_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1055_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2313
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceSetMemPool
 *             __cuDeviceSetMemPool = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceSetMemPool')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2315
 *         try:
 *             global __cuDeviceSetMemPool
 *             __cuDeviceSetMemPool = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceSetMemPool')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2315, __pyx_L1056_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2315, __pyx_L1056_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuDeviceSetMemPool};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2315, __pyx_L1056_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuDeviceSetMemPool};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2315, __pyx_L1056_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2315, __pyx_L1056_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDeviceSetMemPool);
                __Pyx_GIVEREF(__pyx_n_u_cuDeviceSetMemPool);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuDeviceSetMemPool);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2315, __pyx_L1056_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2315, __pyx_L1056_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceSetMemPool = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2313
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceSetMemPool
 *             __cuDeviceSetMemPool = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceSetMemPool')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1061_try_end;
            __pyx_L1056_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2316
 *             global __cuDeviceSetMemPool
 *             __cuDeviceSetMemPool = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceSetMemPool')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1057_exception_handled;
            }
            __pyx_L1057_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1061_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2318
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetMemPool
 *             __cuDeviceGetMemPool = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetMemPool')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2320
 *         try:
 *             global __cuDeviceGetMemPool
 *             __cuDeviceGetMemPool = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetMemPool')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2320, __pyx_L1062_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2320, __pyx_L1062_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuDeviceGetMemPool};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2320, __pyx_L1062_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuDeviceGetMemPool};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2320, __pyx_L1062_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2320, __pyx_L1062_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDeviceGetMemPool);
                __Pyx_GIVEREF(__pyx_n_u_cuDeviceGetMemPool);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuDeviceGetMemPool);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2320, __pyx_L1062_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2320, __pyx_L1062_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetMemPool = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2318
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetMemPool
 *             __cuDeviceGetMemPool = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetMemPool')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1067_try_end;
            __pyx_L1062_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2321
 *             global __cuDeviceGetMemPool
 *             __cuDeviceGetMemPool = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetMemPool')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1063_exception_handled;
            }
            __pyx_L1063_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1067_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2323
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetDefaultMemPool
 *             __cuDeviceGetDefaultMemPool = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetDefaultMemPool')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2325
 *         try:
 *             global __cuDeviceGetDefaultMemPool
 *             __cuDeviceGetDefaultMemPool = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetDefaultMemPool')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2325, __pyx_L1068_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2325, __pyx_L1068_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuDeviceGetDefaultMemPool};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2325, __pyx_L1068_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuDeviceGetDefaultMemPool};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2325, __pyx_L1068_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2325, __pyx_L1068_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDeviceGetDefaultMemPool);
                __Pyx_GIVEREF(__pyx_n_u_cuDeviceGetDefaultMemPool);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuDeviceGetDefaultMemPool);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2325, __pyx_L1068_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2325, __pyx_L1068_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetDefaultMemPool = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2323
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetDefaultMemPool
 *             __cuDeviceGetDefaultMemPool = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetDefaultMemPool')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1073_try_end;
            __pyx_L1068_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2326
 *             global __cuDeviceGetDefaultMemPool
 *             __cuDeviceGetDefaultMemPool = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetDefaultMemPool')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1069_exception_handled;
            }
            __pyx_L1069_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1073_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2328
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetExecAffinitySupport
 *             __cuDeviceGetExecAffinitySupport = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetExecAffinitySupport')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2330
 *         try:
 *             global __cuDeviceGetExecAffinitySupport
 *             __cuDeviceGetExecAffinitySupport = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetExecAffinitySupport')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2330, __pyx_L1074_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2330, __pyx_L1074_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuDeviceGetExecAffinitySupport};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2330, __pyx_L1074_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuDeviceGetExecAffinitySupport};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2330, __pyx_L1074_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2330, __pyx_L1074_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDeviceGetExecAffinitySupport);
                __Pyx_GIVEREF(__pyx_n_u_cuDeviceGetExecAffinitySupport);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuDeviceGetExecAffinitySupport);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2330, __pyx_L1074_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2330, __pyx_L1074_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetExecAffinitySupport = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2328
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetExecAffinitySupport
 *             __cuDeviceGetExecAffinitySupport = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetExecAffinitySupport')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1079_try_end;
            __pyx_L1074_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2331
 *             global __cuDeviceGetExecAffinitySupport
 *             __cuDeviceGetExecAffinitySupport = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetExecAffinitySupport')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1075_exception_handled;
            }
            __pyx_L1075_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1079_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2333
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFlushGPUDirectRDMAWrites
 *             __cuFlushGPUDirectRDMAWrites = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFlushGPUDirectRDMAWrites')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2335
 *         try:
 *             global __cuFlushGPUDirectRDMAWrites
 *             __cuFlushGPUDirectRDMAWrites = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFlushGPUDirectRDMAWrites')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2335, __pyx_L1080_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2335, __pyx_L1080_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuFlushGPUDirectRDMAWrites};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2335, __pyx_L1080_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuFlushGPUDirectRDMAWrites};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2335, __pyx_L1080_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2335, __pyx_L1080_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuFlushGPUDirectRDMAWrites);
                __Pyx_GIVEREF(__pyx_n_u_cuFlushGPUDirectRDMAWrites);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuFlushGPUDirectRDMAWrites);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2335, __pyx_L1080_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2335, __pyx_L1080_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuFlushGPUDirectRDMAWrites = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2333
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFlushGPUDirectRDMAWrites
 *             __cuFlushGPUDirectRDMAWrites = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFlushGPUDirectRDMAWrites')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1085_try_end;
            __pyx_L1080_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2336
 *             global __cuFlushGPUDirectRDMAWrites
 *             __cuFlushGPUDirectRDMAWrites = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFlushGPUDirectRDMAWrites')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1081_exception_handled;
            }
            __pyx_L1081_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1085_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2338
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetProperties
 *             __cuDeviceGetProperties = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetProperties')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2340
 *         try:
 *             global __cuDeviceGetProperties
 *             __cuDeviceGetProperties = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetProperties')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2340, __pyx_L1086_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2340, __pyx_L1086_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuDeviceGetProperties};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2340, __pyx_L1086_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuDeviceGetProperties};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2340, __pyx_L1086_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2340, __pyx_L1086_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDeviceGetProperties);
                __Pyx_GIVEREF(__pyx_n_u_cuDeviceGetProperties);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuDeviceGetProperties);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2340, __pyx_L1086_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2340, __pyx_L1086_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetProperties = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2338
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetProperties
 *             __cuDeviceGetProperties = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetProperties')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1091_try_end;
            __pyx_L1086_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2341
 *             global __cuDeviceGetProperties
 *             __cuDeviceGetProperties = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetProperties')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1087_exception_handled;
            }
            __pyx_L1087_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1091_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2343
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceComputeCapability
 *             __cuDeviceComputeCapability = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceComputeCapability')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2345
 *         try:
 *             global __cuDeviceComputeCapability
 *             __cuDeviceComputeCapability = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceComputeCapability')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2345, __pyx_L1092_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2345, __pyx_L1092_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuDeviceComputeCapability};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2345, __pyx_L1092_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuDeviceComputeCapability};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2345, __pyx_L1092_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2345, __pyx_L1092_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDeviceComputeCapability);
                __Pyx_GIVEREF(__pyx_n_u_cuDeviceComputeCapability);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuDeviceComputeCapability);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2345, __pyx_L1092_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2345, __pyx_L1092_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceComputeCapability = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2343
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceComputeCapability
 *             __cuDeviceComputeCapability = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceComputeCapability')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1097_try_end;
            __pyx_L1092_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2346
 *             global __cuDeviceComputeCapability
 *             __cuDeviceComputeCapability = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceComputeCapability')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1093_exception_handled;
            }
            __pyx_L1093_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1097_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2348
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDevicePrimaryCtxRetain
 *             __cuDevicePrimaryCtxRetain = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxRetain')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2350
 *         try:
 *             global __cuDevicePrimaryCtxRetain
 *             __cuDevicePrimaryCtxRetain = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxRetain')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2350, __pyx_L1098_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2350, __pyx_L1098_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuDevicePrimaryCtxRetain};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2350, __pyx_L1098_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuDevicePrimaryCtxRetain};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2350, __pyx_L1098_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2350, __pyx_L1098_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDevicePrimaryCtxRetain);
                __Pyx_GIVEREF(__pyx_n_u_cuDevicePrimaryCtxRetain);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuDevicePrimaryCtxRetain);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2350, __pyx_L1098_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2350, __pyx_L1098_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxRetain = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2348
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDevicePrimaryCtxRetain
 *             __cuDevicePrimaryCtxRetain = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxRetain')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1103_try_end;
            __pyx_L1098_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2351
 *             global __cuDevicePrimaryCtxRetain
 *             __cuDevicePrimaryCtxRetain = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxRetain')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1099_exception_handled;
            }
            __pyx_L1099_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1103_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2353
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDevicePrimaryCtxRelease_v2
 *             __cuDevicePrimaryCtxRelease_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxRelease_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2355
 *         try:
 *             global __cuDevicePrimaryCtxRelease_v2
 *             __cuDevicePrimaryCtxRelease_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxRelease_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2355, __pyx_L1104_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2355, __pyx_L1104_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuDevicePrimaryCtxRelease_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2355, __pyx_L1104_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuDevicePrimaryCtxRelease_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2355, __pyx_L1104_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2355, __pyx_L1104_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDevicePrimaryCtxRelease_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuDevicePrimaryCtxRelease_v2);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuDevicePrimaryCtxRelease_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2355, __pyx_L1104_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2355, __pyx_L1104_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxRelease_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2353
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDevicePrimaryCtxRelease_v2
 *             __cuDevicePrimaryCtxRelease_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxRelease_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1109_try_end;
            __pyx_L1104_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2356
 *             global __cuDevicePrimaryCtxRelease_v2
 *             __cuDevicePrimaryCtxRelease_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxRelease_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1105_exception_handled;
            }
            __pyx_L1105_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1109_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2358
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDevicePrimaryCtxSetFlags_v2
 *             __cuDevicePrimaryCtxSetFlags_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxSetFlags_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2360
 *         try:
 *             global __cuDevicePrimaryCtxSetFlags_v2
 *             __cuDevicePrimaryCtxSetFlags_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxSetFlags_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2360, __pyx_L1110_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2360, __pyx_L1110_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuDevicePrimaryCtxSetFlags_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2360, __pyx_L1110_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuDevicePrimaryCtxSetFlags_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2360, __pyx_L1110_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2360, __pyx_L1110_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDevicePrimaryCtxSetFlags_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuDevicePrimaryCtxSetFlags_v2);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuDevicePrimaryCtxSetFlags_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2360, __pyx_L1110_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2360, __pyx_L1110_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxSetFlags_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2358
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDevicePrimaryCtxSetFlags_v2
 *             __cuDevicePrimaryCtxSetFlags_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxSetFlags_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1115_try_end;
            __pyx_L1110_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2361
 *             global __cuDevicePrimaryCtxSetFlags_v2
 *             __cuDevicePrimaryCtxSetFlags_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxSetFlags_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1111_exception_handled;
            }
            __pyx_L1111_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1115_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2363
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDevicePrimaryCtxGetState
 *             __cuDevicePrimaryCtxGetState = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxGetState')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2365
 *         try:
 *             global __cuDevicePrimaryCtxGetState
 *             __cuDevicePrimaryCtxGetState = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxGetState')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2365, __pyx_L1116_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2365, __pyx_L1116_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuDevicePrimaryCtxGetState};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2365, __pyx_L1116_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuDevicePrimaryCtxGetState};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2365, __pyx_L1116_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2365, __pyx_L1116_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDevicePrimaryCtxGetState);
                __Pyx_GIVEREF(__pyx_n_u_cuDevicePrimaryCtxGetState);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuDevicePrimaryCtxGetState);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2365, __pyx_L1116_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2365, __pyx_L1116_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxGetState = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2363
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDevicePrimaryCtxGetState
 *             __cuDevicePrimaryCtxGetState = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxGetState')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1121_try_end;
            __pyx_L1116_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2366
 *             global __cuDevicePrimaryCtxGetState
 *             __cuDevicePrimaryCtxGetState = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxGetState')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1117_exception_handled;
            }
            __pyx_L1117_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1121_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2368
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDevicePrimaryCtxReset_v2
 *             __cuDevicePrimaryCtxReset_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxReset_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2370
 *         try:
 *             global __cuDevicePrimaryCtxReset_v2
 *             __cuDevicePrimaryCtxReset_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxReset_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2370, __pyx_L1122_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2370, __pyx_L1122_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuDevicePrimaryCtxReset_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2370, __pyx_L1122_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuDevicePrimaryCtxReset_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2370, __pyx_L1122_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2370, __pyx_L1122_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDevicePrimaryCtxReset_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuDevicePrimaryCtxReset_v2);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuDevicePrimaryCtxReset_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2370, __pyx_L1122_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2370, __pyx_L1122_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxReset_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2368
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDevicePrimaryCtxReset_v2
 *             __cuDevicePrimaryCtxReset_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxReset_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1127_try_end;
            __pyx_L1122_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2371
 *             global __cuDevicePrimaryCtxReset_v2
 *             __cuDevicePrimaryCtxReset_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxReset_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1123_exception_handled;
            }
            __pyx_L1123_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1127_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2373
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxCreate_v2
 *             __cuCtxCreate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxCreate_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2375
 *         try:
 *             global __cuCtxCreate_v2
 *             __cuCtxCreate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxCreate_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2375, __pyx_L1128_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2375, __pyx_L1128_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuCtxCreate_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2375, __pyx_L1128_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuCtxCreate_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2375, __pyx_L1128_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2375, __pyx_L1128_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCtxCreate_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxCreate_v2);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuCtxCreate_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2375, __pyx_L1128_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2375, __pyx_L1128_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCtxCreate_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2373
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxCreate_v2
 *             __cuCtxCreate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxCreate_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1133_try_end;
            __pyx_L1128_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2376
 *             global __cuCtxCreate_v2
 *             __cuCtxCreate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxCreate_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1129_exception_handled;
            }
            __pyx_L1129_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1133_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2378
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxCreate_v3
 *             __cuCtxCreate_v3 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxCreate_v3')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2380
 *         try:
 *             global __cuCtxCreate_v3
 *             __cuCtxCreate_v3 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxCreate_v3')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2380, __pyx_L1134_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2380, __pyx_L1134_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuCtxCreate_v3};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2380, __pyx_L1134_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuCtxCreate_v3};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2380, __pyx_L1134_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2380, __pyx_L1134_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCtxCreate_v3);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxCreate_v3);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuCtxCreate_v3);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2380, __pyx_L1134_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2380, __pyx_L1134_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCtxCreate_v3 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2378
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxCreate_v3
 *             __cuCtxCreate_v3 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxCreate_v3')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1139_try_end;
            __pyx_L1134_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2381
 *             global __cuCtxCreate_v3
 *             __cuCtxCreate_v3 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxCreate_v3')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1135_exception_handled;
            }
            __pyx_L1135_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1139_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2383
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxDestroy_v2
 *             __cuCtxDestroy_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxDestroy_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2385
 *         try:
 *             global __cuCtxDestroy_v2
 *             __cuCtxDestroy_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxDestroy_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2385, __pyx_L1140_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2385, __pyx_L1140_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuCtxDestroy_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2385, __pyx_L1140_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuCtxDestroy_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2385, __pyx_L1140_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2385, __pyx_L1140_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCtxDestroy_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxDestroy_v2);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuCtxDestroy_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2385, __pyx_L1140_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2385, __pyx_L1140_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCtxDestroy_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2383
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxDestroy_v2
 *             __cuCtxDestroy_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxDestroy_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1145_try_end;
            __pyx_L1140_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2386
 *             global __cuCtxDestroy_v2
 *             __cuCtxDestroy_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxDestroy_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1141_exception_handled;
            }
            __pyx_L1141_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1145_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2388
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxPushCurrent_v2
 *             __cuCtxPushCurrent_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxPushCurrent_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2390
 *         try:
 *             global __cuCtxPushCurrent_v2
 *             __cuCtxPushCurrent_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxPushCurrent_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2390, __pyx_L1146_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2390, __pyx_L1146_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuCtxPushCurrent_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2390, __pyx_L1146_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuCtxPushCurrent_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2390, __pyx_L1146_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2390, __pyx_L1146_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCtxPushCurrent_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxPushCurrent_v2);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuCtxPushCurrent_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2390, __pyx_L1146_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2390, __pyx_L1146_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCtxPushCurrent_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2388
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxPushCurrent_v2
 *             __cuCtxPushCurrent_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxPushCurrent_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1151_try_end;
            __pyx_L1146_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2391
 *             global __cuCtxPushCurrent_v2
 *             __cuCtxPushCurrent_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxPushCurrent_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1147_exception_handled;
            }
            __pyx_L1147_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1151_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2393
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxPopCurrent_v2
 *             __cuCtxPopCurrent_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxPopCurrent_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2395
 *         try:
 *             global __cuCtxPopCurrent_v2
 *             __cuCtxPopCurrent_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxPopCurrent_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2395, __pyx_L1152_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2395, __pyx_L1152_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuCtxPopCurrent_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2395, __pyx_L1152_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuCtxPopCurrent_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2395, __pyx_L1152_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2395, __pyx_L1152_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCtxPopCurrent_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxPopCurrent_v2);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuCtxPopCurrent_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2395, __pyx_L1152_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2395, __pyx_L1152_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCtxPopCurrent_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2393
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxPopCurrent_v2
 *             __cuCtxPopCurrent_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxPopCurrent_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1157_try_end;
            __pyx_L1152_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2396
 *             global __cuCtxPopCurrent_v2
 *             __cuCtxPopCurrent_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxPopCurrent_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1153_exception_handled;
            }
            __pyx_L1153_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1157_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2398
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxSetCurrent
 *             __cuCtxSetCurrent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSetCurrent')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2400
 *         try:
 *             global __cuCtxSetCurrent
 *             __cuCtxSetCurrent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSetCurrent')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2400, __pyx_L1158_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2400, __pyx_L1158_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuCtxSetCurrent};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2400, __pyx_L1158_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuCtxSetCurrent};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2400, __pyx_L1158_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2400, __pyx_L1158_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCtxSetCurrent);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxSetCurrent);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuCtxSetCurrent);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2400, __pyx_L1158_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2400, __pyx_L1158_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetCurrent = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2398
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxSetCurrent
 *             __cuCtxSetCurrent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSetCurrent')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1163_try_end;
            __pyx_L1158_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2401
 *             global __cuCtxSetCurrent
 *             __cuCtxSetCurrent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSetCurrent')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1159_exception_handled;
            }
            __pyx_L1159_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1163_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2403
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxGetCurrent
 *             __cuCtxGetCurrent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetCurrent')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2405
 *         try:
 *             global __cuCtxGetCurrent
 *             __cuCtxGetCurrent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetCurrent')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2405, __pyx_L1164_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2405, __pyx_L1164_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuCtxGetCurrent};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2405, __pyx_L1164_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuCtxGetCurrent};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2405, __pyx_L1164_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2405, __pyx_L1164_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCtxGetCurrent);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxGetCurrent);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuCtxGetCurrent);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2405, __pyx_L1164_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2405, __pyx_L1164_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetCurrent = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2403
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxGetCurrent
 *             __cuCtxGetCurrent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetCurrent')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1169_try_end;
            __pyx_L1164_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2406
 *             global __cuCtxGetCurrent
 *             __cuCtxGetCurrent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetCurrent')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1165_exception_handled;
            }
            __pyx_L1165_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1169_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2408
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxGetDevice
 *             __cuCtxGetDevice = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetDevice')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2410
 *         try:
 *             global __cuCtxGetDevice
 *             __cuCtxGetDevice = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetDevice')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2410, __pyx_L1170_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2410, __pyx_L1170_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuCtxGetDevice};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2410, __pyx_L1170_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuCtxGetDevice};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2410, __pyx_L1170_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2410, __pyx_L1170_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCtxGetDevice);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxGetDevice);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuCtxGetDevice);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2410, __pyx_L1170_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2410, __pyx_L1170_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetDevice = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2408
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxGetDevice
 *             __cuCtxGetDevice = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetDevice')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1175_try_end;
            __pyx_L1170_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2411
 *             global __cuCtxGetDevice
 *             __cuCtxGetDevice = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetDevice')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1171_exception_handled;
            }
            __pyx_L1171_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1175_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2413
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxGetFlags
 *             __cuCtxGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetFlags')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2415
 *         try:
 *             global __cuCtxGetFlags
 *             __cuCtxGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetFlags')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2415, __pyx_L1176_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2415, __pyx_L1176_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuCtxGetFlags};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2415, __pyx_L1176_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuCtxGetFlags};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2415, __pyx_L1176_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2415, __pyx_L1176_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCtxGetFlags);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxGetFlags);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuCtxGetFlags);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2415, __pyx_L1176_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2415, __pyx_L1176_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetFlags = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2413
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxGetFlags
 *             __cuCtxGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetFlags')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1181_try_end;
            __pyx_L1176_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2416
 *             global __cuCtxGetFlags
 *             __cuCtxGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetFlags')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1177_exception_handled;
            }
            __pyx_L1177_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1181_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2418
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxSetFlags
 *             __cuCtxSetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSetFlags')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2420
 *         try:
 *             global __cuCtxSetFlags
 *             __cuCtxSetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSetFlags')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2420, __pyx_L1182_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2420, __pyx_L1182_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuCtxSetFlags};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2420, __pyx_L1182_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuCtxSetFlags};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2420, __pyx_L1182_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2420, __pyx_L1182_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCtxSetFlags);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxSetFlags);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuCtxSetFlags);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2420, __pyx_L1182_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2420, __pyx_L1182_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetFlags = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2418
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxSetFlags
 *             __cuCtxSetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSetFlags')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1187_try_end;
            __pyx_L1182_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2421
 *             global __cuCtxSetFlags
 *             __cuCtxSetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSetFlags')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1183_exception_handled;
            }
            __pyx_L1183_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1187_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2423
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxGetId
 *             __cuCtxGetId = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetId')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2425
 *         try:
 *             global __cuCtxGetId
 *             __cuCtxGetId = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetId')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2425, __pyx_L1188_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2425, __pyx_L1188_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuCtxGetId};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2425, __pyx_L1188_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuCtxGetId};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2425, __pyx_L1188_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2425, __pyx_L1188_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCtxGetId);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxGetId);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuCtxGetId);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2425, __pyx_L1188_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2425, __pyx_L1188_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetId = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2423
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxGetId
 *             __cuCtxGetId = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetId')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1193_try_end;
            __pyx_L1188_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2426
 *             global __cuCtxGetId
 *             __cuCtxGetId = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetId')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1189_exception_handled;
            }
            __pyx_L1189_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1193_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2428
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxSynchronize
 *             __cuCtxSynchronize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSynchronize')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2430
 *         try:
 *             global __cuCtxSynchronize
 *             __cuCtxSynchronize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSynchronize')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2430, __pyx_L1194_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2430, __pyx_L1194_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuCtxSynchronize};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2430, __pyx_L1194_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuCtxSynchronize};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2430, __pyx_L1194_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2430, __pyx_L1194_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCtxSynchronize);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxSynchronize);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuCtxSynchronize);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2430, __pyx_L1194_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2430, __pyx_L1194_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCtxSynchronize = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2428
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxSynchronize
 *             __cuCtxSynchronize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSynchronize')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1199_try_end;
            __pyx_L1194_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2431
 *             global __cuCtxSynchronize
 *             __cuCtxSynchronize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSynchronize')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1195_exception_handled;
            }
            __pyx_L1195_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1199_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2433
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxSetLimit
 *             __cuCtxSetLimit = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSetLimit')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2435
 *         try:
 *             global __cuCtxSetLimit
 *             __cuCtxSetLimit = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSetLimit')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2435, __pyx_L1200_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2435, __pyx_L1200_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuCtxSetLimit};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2435, __pyx_L1200_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuCtxSetLimit};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2435, __pyx_L1200_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2435, __pyx_L1200_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCtxSetLimit);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxSetLimit);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuCtxSetLimit);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2435, __pyx_L1200_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2435, __pyx_L1200_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetLimit = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2433
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxSetLimit
 *             __cuCtxSetLimit = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSetLimit')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1205_try_end;
            __pyx_L1200_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2436
 *             global __cuCtxSetLimit
 *             __cuCtxSetLimit = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSetLimit')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1201_exception_handled;
            }
            __pyx_L1201_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1205_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2438
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxGetLimit
 *             __cuCtxGetLimit = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetLimit')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2440
 *         try:
 *             global __cuCtxGetLimit
 *             __cuCtxGetLimit = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetLimit')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2440, __pyx_L1206_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2440, __pyx_L1206_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuCtxGetLimit};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2440, __pyx_L1206_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuCtxGetLimit};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2440, __pyx_L1206_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2440, __pyx_L1206_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCtxGetLimit);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxGetLimit);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuCtxGetLimit);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2440, __pyx_L1206_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2440, __pyx_L1206_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetLimit = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2438
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxGetLimit
 *             __cuCtxGetLimit = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetLimit')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1211_try_end;
            __pyx_L1206_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2441
 *             global __cuCtxGetLimit
 *             __cuCtxGetLimit = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetLimit')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1207_exception_handled;
            }
            __pyx_L1207_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1211_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2443
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxGetCacheConfig
 *             __cuCtxGetCacheConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetCacheConfig')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2445
 *         try:
 *             global __cuCtxGetCacheConfig
 *             __cuCtxGetCacheConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetCacheConfig')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2445, __pyx_L1212_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2445, __pyx_L1212_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuCtxGetCacheConfig};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2445, __pyx_L1212_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuCtxGetCacheConfig};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2445, __pyx_L1212_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2445, __pyx_L1212_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCtxGetCacheConfig);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxGetCacheConfig);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuCtxGetCacheConfig);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2445, __pyx_L1212_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2445, __pyx_L1212_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetCacheConfig = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2443
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxGetCacheConfig
 *             __cuCtxGetCacheConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetCacheConfig')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1217_try_end;
            __pyx_L1212_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2446
 *             global __cuCtxGetCacheConfig
 *             __cuCtxGetCacheConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetCacheConfig')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1213_exception_handled;
            }
            __pyx_L1213_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1217_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2448
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxSetCacheConfig
 *             __cuCtxSetCacheConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSetCacheConfig')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2450
 *         try:
 *             global __cuCtxSetCacheConfig
 *             __cuCtxSetCacheConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSetCacheConfig')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2450, __pyx_L1218_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2450, __pyx_L1218_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuCtxSetCacheConfig};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2450, __pyx_L1218_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuCtxSetCacheConfig};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2450, __pyx_L1218_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2450, __pyx_L1218_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCtxSetCacheConfig);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxSetCacheConfig);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuCtxSetCacheConfig);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2450, __pyx_L1218_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2450, __pyx_L1218_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetCacheConfig = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2448
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxSetCacheConfig
 *             __cuCtxSetCacheConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSetCacheConfig')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1223_try_end;
            __pyx_L1218_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2451
 *             global __cuCtxSetCacheConfig
 *             __cuCtxSetCacheConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSetCacheConfig')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1219_exception_handled;
            }
            __pyx_L1219_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1223_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2453
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxGetSharedMemConfig
 *             __cuCtxGetSharedMemConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetSharedMemConfig')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2455
 *         try:
 *             global __cuCtxGetSharedMemConfig
 *             __cuCtxGetSharedMemConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetSharedMemConfig')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2455, __pyx_L1224_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2455, __pyx_L1224_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuCtxGetSharedMemConfig};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2455, __pyx_L1224_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuCtxGetSharedMemConfig};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2455, __pyx_L1224_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2455, __pyx_L1224_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCtxGetSharedMemConfig);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxGetSharedMemConfig);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuCtxGetSharedMemConfig);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2455, __pyx_L1224_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2455, __pyx_L1224_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetSharedMemConfig = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2453
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxGetSharedMemConfig
 *             __cuCtxGetSharedMemConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetSharedMemConfig')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1229_try_end;
            __pyx_L1224_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2456
 *             global __cuCtxGetSharedMemConfig
 *             __cuCtxGetSharedMemConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetSharedMemConfig')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1225_exception_handled;
            }
            __pyx_L1225_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1229_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2458
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxSetSharedMemConfig
 *             __cuCtxSetSharedMemConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSetSharedMemConfig')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2460
 *         try:
 *             global __cuCtxSetSharedMemConfig
 *             __cuCtxSetSharedMemConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSetSharedMemConfig')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2460, __pyx_L1230_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2460, __pyx_L1230_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuCtxSetSharedMemConfig};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2460, __pyx_L1230_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuCtxSetSharedMemConfig};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2460, __pyx_L1230_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2460, __pyx_L1230_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCtxSetSharedMemConfig);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxSetSharedMemConfig);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuCtxSetSharedMemConfig);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2460, __pyx_L1230_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2460, __pyx_L1230_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetSharedMemConfig = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2458
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxSetSharedMemConfig
 *             __cuCtxSetSharedMemConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSetSharedMemConfig')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1235_try_end;
            __pyx_L1230_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2461
 *             global __cuCtxSetSharedMemConfig
 *             __cuCtxSetSharedMemConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSetSharedMemConfig')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1231_exception_handled;
            }
            __pyx_L1231_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1235_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2463
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxGetApiVersion
 *             __cuCtxGetApiVersion = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetApiVersion')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2465
 *         try:
 *             global __cuCtxGetApiVersion
 *             __cuCtxGetApiVersion = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetApiVersion')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2465, __pyx_L1236_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2465, __pyx_L1236_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuCtxGetApiVersion};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2465, __pyx_L1236_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuCtxGetApiVersion};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2465, __pyx_L1236_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2465, __pyx_L1236_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCtxGetApiVersion);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxGetApiVersion);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuCtxGetApiVersion);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2465, __pyx_L1236_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2465, __pyx_L1236_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetApiVersion = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2463
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxGetApiVersion
 *             __cuCtxGetApiVersion = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetApiVersion')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1241_try_end;
            __pyx_L1236_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2466
 *             global __cuCtxGetApiVersion
 *             __cuCtxGetApiVersion = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetApiVersion')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1237_exception_handled;
            }
            __pyx_L1237_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1241_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2468
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxGetStreamPriorityRange
 *             __cuCtxGetStreamPriorityRange = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetStreamPriorityRange')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2470
 *         try:
 *             global __cuCtxGetStreamPriorityRange
 *             __cuCtxGetStreamPriorityRange = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetStreamPriorityRange')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2470, __pyx_L1242_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2470, __pyx_L1242_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuCtxGetStreamPriorityRange};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2470, __pyx_L1242_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuCtxGetStreamPriorityRange};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2470, __pyx_L1242_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2470, __pyx_L1242_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCtxGetStreamPriorityRange);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxGetStreamPriorityRange);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuCtxGetStreamPriorityRange);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2470, __pyx_L1242_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2470, __pyx_L1242_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetStreamPriorityRange = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2468
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxGetStreamPriorityRange
 *             __cuCtxGetStreamPriorityRange = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetStreamPriorityRange')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1247_try_end;
            __pyx_L1242_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2471
 *             global __cuCtxGetStreamPriorityRange
 *             __cuCtxGetStreamPriorityRange = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetStreamPriorityRange')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1243_exception_handled;
            }
            __pyx_L1243_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1247_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2473
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxResetPersistingL2Cache
 *             __cuCtxResetPersistingL2Cache = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxResetPersistingL2Cache')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2475
 *         try:
 *             global __cuCtxResetPersistingL2Cache
 *             __cuCtxResetPersistingL2Cache = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxResetPersistingL2Cache')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2475, __pyx_L1248_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2475, __pyx_L1248_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuCtxResetPersistingL2Cache};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2475, __pyx_L1248_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuCtxResetPersistingL2Cache};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2475, __pyx_L1248_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2475, __pyx_L1248_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCtxResetPersistingL2Cache);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxResetPersistingL2Cache);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuCtxResetPersistingL2Cache);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2475, __pyx_L1248_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2475, __pyx_L1248_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCtxResetPersistingL2Cache = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2473
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxResetPersistingL2Cache
 *             __cuCtxResetPersistingL2Cache = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxResetPersistingL2Cache')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1253_try_end;
            __pyx_L1248_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2476
 *             global __cuCtxResetPersistingL2Cache
 *             __cuCtxResetPersistingL2Cache = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxResetPersistingL2Cache')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1249_exception_handled;
            }
            __pyx_L1249_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1253_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2478
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxGetExecAffinity
 *             __cuCtxGetExecAffinity = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetExecAffinity')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2480
 *         try:
 *             global __cuCtxGetExecAffinity
 *             __cuCtxGetExecAffinity = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetExecAffinity')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2480, __pyx_L1254_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2480, __pyx_L1254_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuCtxGetExecAffinity};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2480, __pyx_L1254_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuCtxGetExecAffinity};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2480, __pyx_L1254_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2480, __pyx_L1254_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCtxGetExecAffinity);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxGetExecAffinity);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuCtxGetExecAffinity);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2480, __pyx_L1254_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2480, __pyx_L1254_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetExecAffinity = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2478
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxGetExecAffinity
 *             __cuCtxGetExecAffinity = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetExecAffinity')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1259_try_end;
            __pyx_L1254_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2481
 *             global __cuCtxGetExecAffinity
 *             __cuCtxGetExecAffinity = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetExecAffinity')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1255_exception_handled;
            }
            __pyx_L1255_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1259_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2483
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxAttach
 *             __cuCtxAttach = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxAttach')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2485
 *         try:
 *             global __cuCtxAttach
 *             __cuCtxAttach = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxAttach')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2485, __pyx_L1260_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2485, __pyx_L1260_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuCtxAttach};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2485, __pyx_L1260_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuCtxAttach};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2485, __pyx_L1260_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2485, __pyx_L1260_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCtxAttach);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxAttach);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuCtxAttach);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2485, __pyx_L1260_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2485, __pyx_L1260_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCtxAttach = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2483
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxAttach
 *             __cuCtxAttach = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxAttach')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1265_try_end;
            __pyx_L1260_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2486
 *             global __cuCtxAttach
 *             __cuCtxAttach = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxAttach')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1261_exception_handled;
            }
            __pyx_L1261_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1265_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2488
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxDetach
 *             __cuCtxDetach = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxDetach')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2490
 *         try:
 *             global __cuCtxDetach
 *             __cuCtxDetach = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxDetach')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2490, __pyx_L1266_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2490, __pyx_L1266_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuCtxDetach};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2490, __pyx_L1266_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuCtxDetach};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2490, __pyx_L1266_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2490, __pyx_L1266_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCtxDetach);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxDetach);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuCtxDetach);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2490, __pyx_L1266_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2490, __pyx_L1266_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCtxDetach = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2488
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxDetach
 *             __cuCtxDetach = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxDetach')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1271_try_end;
            __pyx_L1266_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2491
 *             global __cuCtxDetach
 *             __cuCtxDetach = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxDetach')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1267_exception_handled;
            }
            __pyx_L1267_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1271_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2493
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuModuleLoad
 *             __cuModuleLoad = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleLoad')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2495
 *         try:
 *             global __cuModuleLoad
 *             __cuModuleLoad = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleLoad')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2495, __pyx_L1272_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2495, __pyx_L1272_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuModuleLoad};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2495, __pyx_L1272_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuModuleLoad};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2495, __pyx_L1272_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2495, __pyx_L1272_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuModuleLoad);
                __Pyx_GIVEREF(__pyx_n_u_cuModuleLoad);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuModuleLoad);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2495, __pyx_L1272_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2495, __pyx_L1272_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoad = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2493
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuModuleLoad
 *             __cuModuleLoad = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleLoad')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1277_try_end;
            __pyx_L1272_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2496
 *             global __cuModuleLoad
 *             __cuModuleLoad = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleLoad')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1273_exception_handled;
            }
            __pyx_L1273_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1277_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2498
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuModuleLoadData
 *             __cuModuleLoadData = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleLoadData')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2500
 *         try:
 *             global __cuModuleLoadData
 *             __cuModuleLoadData = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleLoadData')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2500, __pyx_L1278_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2500, __pyx_L1278_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuModuleLoadData};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2500, __pyx_L1278_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuModuleLoadData};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2500, __pyx_L1278_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2500, __pyx_L1278_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuModuleLoadData);
                __Pyx_GIVEREF(__pyx_n_u_cuModuleLoadData);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuModuleLoadData);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2500, __pyx_L1278_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2500, __pyx_L1278_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadData = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2498
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuModuleLoadData
 *             __cuModuleLoadData = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleLoadData')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1283_try_end;
            __pyx_L1278_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2501
 *             global __cuModuleLoadData
 *             __cuModuleLoadData = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleLoadData')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1279_exception_handled;
            }
            __pyx_L1279_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1283_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2503
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuModuleLoadDataEx
 *             __cuModuleLoadDataEx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleLoadDataEx')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2505
 *         try:
 *             global __cuModuleLoadDataEx
 *             __cuModuleLoadDataEx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleLoadDataEx')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2505, __pyx_L1284_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2505, __pyx_L1284_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuModuleLoadDataEx};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2505, __pyx_L1284_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuModuleLoadDataEx};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2505, __pyx_L1284_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2505, __pyx_L1284_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuModuleLoadDataEx);
                __Pyx_GIVEREF(__pyx_n_u_cuModuleLoadDataEx);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuModuleLoadDataEx);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2505, __pyx_L1284_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2505, __pyx_L1284_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadDataEx = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2503
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuModuleLoadDataEx
 *             __cuModuleLoadDataEx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleLoadDataEx')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1289_try_end;
            __pyx_L1284_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2506
 *             global __cuModuleLoadDataEx
 *             __cuModuleLoadDataEx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleLoadDataEx')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1285_exception_handled;
            }
            __pyx_L1285_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1289_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2508
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuModuleLoadFatBinary
 *             __cuModuleLoadFatBinary = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleLoadFatBinary')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2510
 *         try:
 *             global __cuModuleLoadFatBinary
 *             __cuModuleLoadFatBinary = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleLoadFatBinary')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2510, __pyx_L1290_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2510, __pyx_L1290_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuModuleLoadFatBinary};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2510, __pyx_L1290_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuModuleLoadFatBinary};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2510, __pyx_L1290_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2510, __pyx_L1290_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuModuleLoadFatBinary);
                __Pyx_GIVEREF(__pyx_n_u_cuModuleLoadFatBinary);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuModuleLoadFatBinary);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2510, __pyx_L1290_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2510, __pyx_L1290_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadFatBinary = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2508
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuModuleLoadFatBinary
 *             __cuModuleLoadFatBinary = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleLoadFatBinary')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1295_try_end;
            __pyx_L1290_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2511
 *             global __cuModuleLoadFatBinary
 *             __cuModuleLoadFatBinary = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleLoadFatBinary')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1291_exception_handled;
            }
            __pyx_L1291_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1295_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2513
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuModuleUnload
 *             __cuModuleUnload = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleUnload')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2515
 *         try:
 *             global __cuModuleUnload
 *             __cuModuleUnload = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleUnload')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2515, __pyx_L1296_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2515, __pyx_L1296_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuModuleUnload};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2515, __pyx_L1296_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuModuleUnload};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2515, __pyx_L1296_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2515, __pyx_L1296_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuModuleUnload);
                __Pyx_GIVEREF(__pyx_n_u_cuModuleUnload);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuModuleUnload);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2515, __pyx_L1296_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2515, __pyx_L1296_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuModuleUnload = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2513
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuModuleUnload
 *             __cuModuleUnload = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleUnload')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1301_try_end;
            __pyx_L1296_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2516
 *             global __cuModuleUnload
 *             __cuModuleUnload = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleUnload')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1297_exception_handled;
            }
            __pyx_L1297_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1301_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2518
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuModuleGetLoadingMode
 *             __cuModuleGetLoadingMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetLoadingMode')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2520
 *         try:
 *             global __cuModuleGetLoadingMode
 *             __cuModuleGetLoadingMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetLoadingMode')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2520, __pyx_L1302_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2520, __pyx_L1302_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuModuleGetLoadingMode};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2520, __pyx_L1302_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuModuleGetLoadingMode};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2520, __pyx_L1302_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2520, __pyx_L1302_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuModuleGetLoadingMode);
                __Pyx_GIVEREF(__pyx_n_u_cuModuleGetLoadingMode);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuModuleGetLoadingMode);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2520, __pyx_L1302_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2520, __pyx_L1302_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetLoadingMode = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2518
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuModuleGetLoadingMode
 *             __cuModuleGetLoadingMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetLoadingMode')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1307_try_end;
            __pyx_L1302_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2521
 *             global __cuModuleGetLoadingMode
 *             __cuModuleGetLoadingMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetLoadingMode')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1303_exception_handled;
            }
            __pyx_L1303_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1307_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2523
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuModuleGetFunction
 *             __cuModuleGetFunction = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetFunction')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2525
 *         try:
 *             global __cuModuleGetFunction
 *             __cuModuleGetFunction = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetFunction')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2525, __pyx_L1308_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2525, __pyx_L1308_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuModuleGetFunction};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2525, __pyx_L1308_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuModuleGetFunction};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2525, __pyx_L1308_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2525, __pyx_L1308_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuModuleGetFunction);
                __Pyx_GIVEREF(__pyx_n_u_cuModuleGetFunction);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuModuleGetFunction);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2525, __pyx_L1308_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2525, __pyx_L1308_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetFunction = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2523
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuModuleGetFunction
 *             __cuModuleGetFunction = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetFunction')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1313_try_end;
            __pyx_L1308_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2526
 *             global __cuModuleGetFunction
 *             __cuModuleGetFunction = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetFunction')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1309_exception_handled;
            }
            __pyx_L1309_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1313_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2528
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuModuleGetGlobal_v2
 *             __cuModuleGetGlobal_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetGlobal_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2530
 *         try:
 *             global __cuModuleGetGlobal_v2
 *             __cuModuleGetGlobal_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetGlobal_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2530, __pyx_L1314_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2530, __pyx_L1314_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuModuleGetGlobal_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2530, __pyx_L1314_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuModuleGetGlobal_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2530, __pyx_L1314_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2530, __pyx_L1314_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuModuleGetGlobal_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuModuleGetGlobal_v2);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuModuleGetGlobal_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2530, __pyx_L1314_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2530, __pyx_L1314_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetGlobal_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2528
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuModuleGetGlobal_v2
 *             __cuModuleGetGlobal_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetGlobal_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1319_try_end;
            __pyx_L1314_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2531
 *             global __cuModuleGetGlobal_v2
 *             __cuModuleGetGlobal_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetGlobal_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1315_exception_handled;
            }
            __pyx_L1315_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1319_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2533
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLinkCreate_v2
 *             __cuLinkCreate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLinkCreate_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2535
 *         try:
 *             global __cuLinkCreate_v2
 *             __cuLinkCreate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLinkCreate_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2535, __pyx_L1320_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2535, __pyx_L1320_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuLinkCreate_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2535, __pyx_L1320_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuLinkCreate_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2535, __pyx_L1320_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2535, __pyx_L1320_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuLinkCreate_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuLinkCreate_v2);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuLinkCreate_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2535, __pyx_L1320_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2535, __pyx_L1320_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuLinkCreate_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2533
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLinkCreate_v2
 *             __cuLinkCreate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLinkCreate_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1325_try_end;
            __pyx_L1320_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2536
 *             global __cuLinkCreate_v2
 *             __cuLinkCreate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLinkCreate_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1321_exception_handled;
            }
            __pyx_L1321_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1325_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2538
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLinkAddData_v2
 *             __cuLinkAddData_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLinkAddData_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2540
 *         try:
 *             global __cuLinkAddData_v2
 *             __cuLinkAddData_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLinkAddData_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2540, __pyx_L1326_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2540, __pyx_L1326_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuLinkAddData_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2540, __pyx_L1326_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuLinkAddData_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2540, __pyx_L1326_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2540, __pyx_L1326_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuLinkAddData_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuLinkAddData_v2);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuLinkAddData_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2540, __pyx_L1326_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2540, __pyx_L1326_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuLinkAddData_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2538
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLinkAddData_v2
 *             __cuLinkAddData_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLinkAddData_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1331_try_end;
            __pyx_L1326_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2541
 *             global __cuLinkAddData_v2
 *             __cuLinkAddData_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLinkAddData_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1327_exception_handled;
            }
            __pyx_L1327_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1331_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2543
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLinkAddFile_v2
 *             __cuLinkAddFile_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLinkAddFile_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2545
 *         try:
 *             global __cuLinkAddFile_v2
 *             __cuLinkAddFile_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLinkAddFile_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2545, __pyx_L1332_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2545, __pyx_L1332_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuLinkAddFile_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2545, __pyx_L1332_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuLinkAddFile_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2545, __pyx_L1332_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2545, __pyx_L1332_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuLinkAddFile_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuLinkAddFile_v2);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuLinkAddFile_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2545, __pyx_L1332_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2545, __pyx_L1332_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuLinkAddFile_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2543
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLinkAddFile_v2
 *             __cuLinkAddFile_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLinkAddFile_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1337_try_end;
            __pyx_L1332_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2546
 *             global __cuLinkAddFile_v2
 *             __cuLinkAddFile_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLinkAddFile_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1333_exception_handled;
            }
            __pyx_L1333_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1337_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2548
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLinkComplete
 *             __cuLinkComplete = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLinkComplete')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2550
 *         try:
 *             global __cuLinkComplete
 *             __cuLinkComplete = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLinkComplete')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2550, __pyx_L1338_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2550, __pyx_L1338_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuLinkComplete};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2550, __pyx_L1338_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuLinkComplete};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2550, __pyx_L1338_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2550, __pyx_L1338_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuLinkComplete);
                __Pyx_GIVEREF(__pyx_n_u_cuLinkComplete);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuLinkComplete);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2550, __pyx_L1338_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2550, __pyx_L1338_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuLinkComplete = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2548
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLinkComplete
 *             __cuLinkComplete = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLinkComplete')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1343_try_end;
            __pyx_L1338_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2551
 *             global __cuLinkComplete
 *             __cuLinkComplete = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLinkComplete')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1339_exception_handled;
            }
            __pyx_L1339_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1343_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2553
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLinkDestroy
 *             __cuLinkDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLinkDestroy')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2555
 *         try:
 *             global __cuLinkDestroy
 *             __cuLinkDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLinkDestroy')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2555, __pyx_L1344_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2555, __pyx_L1344_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuLinkDestroy};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2555, __pyx_L1344_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuLinkDestroy};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2555, __pyx_L1344_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2555, __pyx_L1344_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuLinkDestroy);
                __Pyx_GIVEREF(__pyx_n_u_cuLinkDestroy);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuLinkDestroy);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2555, __pyx_L1344_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2555, __pyx_L1344_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuLinkDestroy = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2553
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLinkDestroy
 *             __cuLinkDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLinkDestroy')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1349_try_end;
            __pyx_L1344_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2556
 *             global __cuLinkDestroy
 *             __cuLinkDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLinkDestroy')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1345_exception_handled;
            }
            __pyx_L1345_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1349_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2558
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuModuleGetTexRef
 *             __cuModuleGetTexRef = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetTexRef')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2560
 *         try:
 *             global __cuModuleGetTexRef
 *             __cuModuleGetTexRef = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetTexRef')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2560, __pyx_L1350_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2560, __pyx_L1350_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuModuleGetTexRef};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2560, __pyx_L1350_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuModuleGetTexRef};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2560, __pyx_L1350_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2560, __pyx_L1350_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuModuleGetTexRef);
                __Pyx_GIVEREF(__pyx_n_u_cuModuleGetTexRef);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuModuleGetTexRef);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2560, __pyx_L1350_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2560, __pyx_L1350_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetTexRef = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2558
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuModuleGetTexRef
 *             __cuModuleGetTexRef = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetTexRef')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1355_try_end;
            __pyx_L1350_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2561
 *             global __cuModuleGetTexRef
 *             __cuModuleGetTexRef = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetTexRef')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1351_exception_handled;
            }
            __pyx_L1351_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1355_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2563
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuModuleGetSurfRef
 *             __cuModuleGetSurfRef = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetSurfRef')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2565
 *         try:
 *             global __cuModuleGetSurfRef
 *             __cuModuleGetSurfRef = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetSurfRef')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2565, __pyx_L1356_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2565, __pyx_L1356_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuModuleGetSurfRef};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2565, __pyx_L1356_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuModuleGetSurfRef};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2565, __pyx_L1356_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2565, __pyx_L1356_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuModuleGetSurfRef);
                __Pyx_GIVEREF(__pyx_n_u_cuModuleGetSurfRef);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuModuleGetSurfRef);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2565, __pyx_L1356_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2565, __pyx_L1356_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetSurfRef = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2563
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuModuleGetSurfRef
 *             __cuModuleGetSurfRef = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetSurfRef')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1361_try_end;
            __pyx_L1356_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2566
 *             global __cuModuleGetSurfRef
 *             __cuModuleGetSurfRef = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetSurfRef')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1357_exception_handled;
            }
            __pyx_L1357_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1361_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2568
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLibraryLoadData
 *             __cuLibraryLoadData = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryLoadData')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2570
 *         try:
 *             global __cuLibraryLoadData
 *             __cuLibraryLoadData = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryLoadData')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2570, __pyx_L1362_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2570, __pyx_L1362_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuLibraryLoadData};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2570, __pyx_L1362_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuLibraryLoadData};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2570, __pyx_L1362_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2570, __pyx_L1362_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuLibraryLoadData);
                __Pyx_GIVEREF(__pyx_n_u_cuLibraryLoadData);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuLibraryLoadData);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2570, __pyx_L1362_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2570, __pyx_L1362_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuLibraryLoadData = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2568
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLibraryLoadData
 *             __cuLibraryLoadData = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryLoadData')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1367_try_end;
            __pyx_L1362_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2571
 *             global __cuLibraryLoadData
 *             __cuLibraryLoadData = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryLoadData')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1363_exception_handled;
            }
            __pyx_L1363_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1367_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2573
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLibraryLoadFromFile
 *             __cuLibraryLoadFromFile = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryLoadFromFile')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2575
 *         try:
 *             global __cuLibraryLoadFromFile
 *             __cuLibraryLoadFromFile = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryLoadFromFile')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2575, __pyx_L1368_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2575, __pyx_L1368_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuLibraryLoadFromFile};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2575, __pyx_L1368_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuLibraryLoadFromFile};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2575, __pyx_L1368_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2575, __pyx_L1368_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuLibraryLoadFromFile);
                __Pyx_GIVEREF(__pyx_n_u_cuLibraryLoadFromFile);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuLibraryLoadFromFile);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2575, __pyx_L1368_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2575, __pyx_L1368_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuLibraryLoadFromFile = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2573
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLibraryLoadFromFile
 *             __cuLibraryLoadFromFile = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryLoadFromFile')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1373_try_end;
            __pyx_L1368_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2576
 *             global __cuLibraryLoadFromFile
 *             __cuLibraryLoadFromFile = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryLoadFromFile')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1369_exception_handled;
            }
            __pyx_L1369_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1373_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2578
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLibraryUnload
 *             __cuLibraryUnload = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryUnload')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2580
 *         try:
 *             global __cuLibraryUnload
 *             __cuLibraryUnload = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryUnload')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2580, __pyx_L1374_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2580, __pyx_L1374_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuLibraryUnload};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2580, __pyx_L1374_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuLibraryUnload};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2580, __pyx_L1374_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2580, __pyx_L1374_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuLibraryUnload);
                __Pyx_GIVEREF(__pyx_n_u_cuLibraryUnload);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuLibraryUnload);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2580, __pyx_L1374_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2580, __pyx_L1374_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuLibraryUnload = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2578
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLibraryUnload
 *             __cuLibraryUnload = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryUnload')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1379_try_end;
            __pyx_L1374_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2581
 *             global __cuLibraryUnload
 *             __cuLibraryUnload = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryUnload')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1375_exception_handled;
            }
            __pyx_L1375_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1379_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2583
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLibraryGetKernel
 *             __cuLibraryGetKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryGetKernel')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2585
 *         try:
 *             global __cuLibraryGetKernel
 *             __cuLibraryGetKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryGetKernel')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2585, __pyx_L1380_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2585, __pyx_L1380_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuLibraryGetKernel};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2585, __pyx_L1380_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuLibraryGetKernel};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2585, __pyx_L1380_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2585, __pyx_L1380_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuLibraryGetKernel);
                __Pyx_GIVEREF(__pyx_n_u_cuLibraryGetKernel);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuLibraryGetKernel);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2585, __pyx_L1380_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2585, __pyx_L1380_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetKernel = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2583
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLibraryGetKernel
 *             __cuLibraryGetKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryGetKernel')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1385_try_end;
            __pyx_L1380_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2586
 *             global __cuLibraryGetKernel
 *             __cuLibraryGetKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryGetKernel')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1381_exception_handled;
            }
            __pyx_L1381_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1385_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2588
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLibraryGetModule
 *             __cuLibraryGetModule = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryGetModule')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2590
 *         try:
 *             global __cuLibraryGetModule
 *             __cuLibraryGetModule = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryGetModule')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2590, __pyx_L1386_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2590, __pyx_L1386_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuLibraryGetModule};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2590, __pyx_L1386_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuLibraryGetModule};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2590, __pyx_L1386_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2590, __pyx_L1386_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuLibraryGetModule);
                __Pyx_GIVEREF(__pyx_n_u_cuLibraryGetModule);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuLibraryGetModule);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2590, __pyx_L1386_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2590, __pyx_L1386_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetModule = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2588
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLibraryGetModule
 *             __cuLibraryGetModule = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryGetModule')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1391_try_end;
            __pyx_L1386_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2591
 *             global __cuLibraryGetModule
 *             __cuLibraryGetModule = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryGetModule')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1387_exception_handled;
            }
            __pyx_L1387_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1391_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2593
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuKernelGetFunction
 *             __cuKernelGetFunction = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuKernelGetFunction')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2595
 *         try:
 *             global __cuKernelGetFunction
 *             __cuKernelGetFunction = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuKernelGetFunction')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2595, __pyx_L1392_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2595, __pyx_L1392_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuKernelGetFunction};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2595, __pyx_L1392_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuKernelGetFunction};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2595, __pyx_L1392_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2595, __pyx_L1392_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuKernelGetFunction);
                __Pyx_GIVEREF(__pyx_n_u_cuKernelGetFunction);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuKernelGetFunction);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2595, __pyx_L1392_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2595, __pyx_L1392_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuKernelGetFunction = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2593
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuKernelGetFunction
 *             __cuKernelGetFunction = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuKernelGetFunction')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1397_try_end;
            __pyx_L1392_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2596
 *             global __cuKernelGetFunction
 *             __cuKernelGetFunction = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuKernelGetFunction')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1393_exception_handled;
            }
            __pyx_L1393_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1397_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2598
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLibraryGetGlobal
 *             __cuLibraryGetGlobal = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryGetGlobal')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2600
 *         try:
 *             global __cuLibraryGetGlobal
 *             __cuLibraryGetGlobal = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryGetGlobal')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2600, __pyx_L1398_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2600, __pyx_L1398_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuLibraryGetGlobal};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2600, __pyx_L1398_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuLibraryGetGlobal};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2600, __pyx_L1398_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2600, __pyx_L1398_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuLibraryGetGlobal);
                __Pyx_GIVEREF(__pyx_n_u_cuLibraryGetGlobal);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuLibraryGetGlobal);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2600, __pyx_L1398_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2600, __pyx_L1398_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetGlobal = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2598
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLibraryGetGlobal
 *             __cuLibraryGetGlobal = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryGetGlobal')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1403_try_end;
            __pyx_L1398_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2601
 *             global __cuLibraryGetGlobal
 *             __cuLibraryGetGlobal = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryGetGlobal')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1399_exception_handled;
            }
            __pyx_L1399_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1403_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2603
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLibraryGetManaged
 *             __cuLibraryGetManaged = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryGetManaged')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2605
 *         try:
 *             global __cuLibraryGetManaged
 *             __cuLibraryGetManaged = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryGetManaged')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2605, __pyx_L1404_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2605, __pyx_L1404_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuLibraryGetManaged};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2605, __pyx_L1404_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuLibraryGetManaged};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2605, __pyx_L1404_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2605, __pyx_L1404_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuLibraryGetManaged);
                __Pyx_GIVEREF(__pyx_n_u_cuLibraryGetManaged);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuLibraryGetManaged);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2605, __pyx_L1404_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2605, __pyx_L1404_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetManaged = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2603
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLibraryGetManaged
 *             __cuLibraryGetManaged = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryGetManaged')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1409_try_end;
            __pyx_L1404_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2606
 *             global __cuLibraryGetManaged
 *             __cuLibraryGetManaged = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryGetManaged')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1405_exception_handled;
            }
            __pyx_L1405_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1409_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2608
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLibraryGetUnifiedFunction
 *             __cuLibraryGetUnifiedFunction = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryGetUnifiedFunction')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2610
 *         try:
 *             global __cuLibraryGetUnifiedFunction
 *             __cuLibraryGetUnifiedFunction = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryGetUnifiedFunction')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2610, __pyx_L1410_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2610, __pyx_L1410_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuLibraryGetUnifiedFunction};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2610, __pyx_L1410_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuLibraryGetUnifiedFunction};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2610, __pyx_L1410_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2610, __pyx_L1410_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuLibraryGetUnifiedFunction);
                __Pyx_GIVEREF(__pyx_n_u_cuLibraryGetUnifiedFunction);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuLibraryGetUnifiedFunction);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2610, __pyx_L1410_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2610, __pyx_L1410_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetUnifiedFunction = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2608
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLibraryGetUnifiedFunction
 *             __cuLibraryGetUnifiedFunction = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryGetUnifiedFunction')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1415_try_end;
            __pyx_L1410_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2611
 *             global __cuLibraryGetUnifiedFunction
 *             __cuLibraryGetUnifiedFunction = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLibraryGetUnifiedFunction')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1411_exception_handled;
            }
            __pyx_L1411_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1415_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2613
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuKernelGetAttribute
 *             __cuKernelGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuKernelGetAttribute')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2615
 *         try:
 *             global __cuKernelGetAttribute
 *             __cuKernelGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuKernelGetAttribute')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2615, __pyx_L1416_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2615, __pyx_L1416_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuKernelGetAttribute};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2615, __pyx_L1416_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuKernelGetAttribute};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2615, __pyx_L1416_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2615, __pyx_L1416_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuKernelGetAttribute);
                __Pyx_GIVEREF(__pyx_n_u_cuKernelGetAttribute);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuKernelGetAttribute);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2615, __pyx_L1416_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2615, __pyx_L1416_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuKernelGetAttribute = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2613
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuKernelGetAttribute
 *             __cuKernelGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuKernelGetAttribute')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1421_try_end;
            __pyx_L1416_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2616
 *             global __cuKernelGetAttribute
 *             __cuKernelGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuKernelGetAttribute')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1417_exception_handled;
            }
            __pyx_L1417_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1421_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2618
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuKernelSetAttribute
 *             __cuKernelSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuKernelSetAttribute')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2620
 *         try:
 *             global __cuKernelSetAttribute
 *             __cuKernelSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuKernelSetAttribute')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2620, __pyx_L1422_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2620, __pyx_L1422_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuKernelSetAttribute};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2620, __pyx_L1422_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuKernelSetAttribute};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2620, __pyx_L1422_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2620, __pyx_L1422_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuKernelSetAttribute);
                __Pyx_GIVEREF(__pyx_n_u_cuKernelSetAttribute);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuKernelSetAttribute);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2620, __pyx_L1422_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2620, __pyx_L1422_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuKernelSetAttribute = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2618
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuKernelSetAttribute
 *             __cuKernelSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuKernelSetAttribute')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1427_try_end;
            __pyx_L1422_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2621
 *             global __cuKernelSetAttribute
 *             __cuKernelSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuKernelSetAttribute')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1423_exception_handled;
            }
            __pyx_L1423_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1427_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2623
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuKernelSetCacheConfig
 *             __cuKernelSetCacheConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuKernelSetCacheConfig')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2625
 *         try:
 *             global __cuKernelSetCacheConfig
 *             __cuKernelSetCacheConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuKernelSetCacheConfig')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2625, __pyx_L1428_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2625, __pyx_L1428_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuKernelSetCacheConfig};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2625, __pyx_L1428_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuKernelSetCacheConfig};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2625, __pyx_L1428_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2625, __pyx_L1428_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuKernelSetCacheConfig);
                __Pyx_GIVEREF(__pyx_n_u_cuKernelSetCacheConfig);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuKernelSetCacheConfig);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2625, __pyx_L1428_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2625, __pyx_L1428_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuKernelSetCacheConfig = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2623
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuKernelSetCacheConfig
 *             __cuKernelSetCacheConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuKernelSetCacheConfig')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1433_try_end;
            __pyx_L1428_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2626
 *             global __cuKernelSetCacheConfig
 *             __cuKernelSetCacheConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuKernelSetCacheConfig')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1429_exception_handled;
            }
            __pyx_L1429_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1433_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2628
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemGetInfo_v2
 *             __cuMemGetInfo_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetInfo_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2630
 *         try:
 *             global __cuMemGetInfo_v2
 *             __cuMemGetInfo_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetInfo_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2630, __pyx_L1434_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2630, __pyx_L1434_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemGetInfo_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2630, __pyx_L1434_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemGetInfo_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2630, __pyx_L1434_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2630, __pyx_L1434_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemGetInfo_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuMemGetInfo_v2);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemGetInfo_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2630, __pyx_L1434_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2630, __pyx_L1434_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemGetInfo_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2628
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemGetInfo_v2
 *             __cuMemGetInfo_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetInfo_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1439_try_end;
            __pyx_L1434_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2631
 *             global __cuMemGetInfo_v2
 *             __cuMemGetInfo_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetInfo_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1435_exception_handled;
            }
            __pyx_L1435_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1439_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2633
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemAlloc_v2
 *             __cuMemAlloc_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAlloc_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2635
 *         try:
 *             global __cuMemAlloc_v2
 *             __cuMemAlloc_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAlloc_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2635, __pyx_L1440_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2635, __pyx_L1440_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemAlloc_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2635, __pyx_L1440_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemAlloc_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2635, __pyx_L1440_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2635, __pyx_L1440_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemAlloc_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuMemAlloc_v2);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemAlloc_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2635, __pyx_L1440_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2635, __pyx_L1440_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemAlloc_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2633
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemAlloc_v2
 *             __cuMemAlloc_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAlloc_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1445_try_end;
            __pyx_L1440_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2636
 *             global __cuMemAlloc_v2
 *             __cuMemAlloc_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAlloc_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1441_exception_handled;
            }
            __pyx_L1441_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1445_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2638
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemAllocPitch_v2
 *             __cuMemAllocPitch_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocPitch_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2640
 *         try:
 *             global __cuMemAllocPitch_v2
 *             __cuMemAllocPitch_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocPitch_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2640, __pyx_L1446_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2640, __pyx_L1446_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemAllocPitch_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2640, __pyx_L1446_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemAllocPitch_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2640, __pyx_L1446_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2640, __pyx_L1446_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemAllocPitch_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuMemAllocPitch_v2);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemAllocPitch_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2640, __pyx_L1446_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2640, __pyx_L1446_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocPitch_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2638
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemAllocPitch_v2
 *             __cuMemAllocPitch_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocPitch_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1451_try_end;
            __pyx_L1446_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2641
 *             global __cuMemAllocPitch_v2
 *             __cuMemAllocPitch_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocPitch_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1447_exception_handled;
            }
            __pyx_L1447_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1451_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2643
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemFree_v2
 *             __cuMemFree_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemFree_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2645
 *         try:
 *             global __cuMemFree_v2
 *             __cuMemFree_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemFree_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2645, __pyx_L1452_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2645, __pyx_L1452_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemFree_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2645, __pyx_L1452_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemFree_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2645, __pyx_L1452_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2645, __pyx_L1452_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemFree_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuMemFree_v2);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemFree_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2645, __pyx_L1452_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2645, __pyx_L1452_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemFree_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2643
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemFree_v2
 *             __cuMemFree_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemFree_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1457_try_end;
            __pyx_L1452_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2646
 *             global __cuMemFree_v2
 *             __cuMemFree_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemFree_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1453_exception_handled;
            }
            __pyx_L1453_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1457_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2648
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemGetAddressRange_v2
 *             __cuMemGetAddressRange_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetAddressRange_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2650
 *         try:
 *             global __cuMemGetAddressRange_v2
 *             __cuMemGetAddressRange_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetAddressRange_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2650, __pyx_L1458_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2650, __pyx_L1458_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemGetAddressRange_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2650, __pyx_L1458_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemGetAddressRange_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2650, __pyx_L1458_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2650, __pyx_L1458_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemGetAddressRange_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuMemGetAddressRange_v2);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemGetAddressRange_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2650, __pyx_L1458_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2650, __pyx_L1458_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAddressRange_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2648
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemGetAddressRange_v2
 *             __cuMemGetAddressRange_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetAddressRange_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1463_try_end;
            __pyx_L1458_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2651
 *             global __cuMemGetAddressRange_v2
 *             __cuMemGetAddressRange_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetAddressRange_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1459_exception_handled;
            }
            __pyx_L1459_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1463_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2653
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemAllocHost_v2
 *             __cuMemAllocHost_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocHost_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2655
 *         try:
 *             global __cuMemAllocHost_v2
 *             __cuMemAllocHost_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocHost_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2655, __pyx_L1464_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2655, __pyx_L1464_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemAllocHost_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2655, __pyx_L1464_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemAllocHost_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2655, __pyx_L1464_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2655, __pyx_L1464_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemAllocHost_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuMemAllocHost_v2);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemAllocHost_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2655, __pyx_L1464_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2655, __pyx_L1464_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocHost_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2653
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemAllocHost_v2
 *             __cuMemAllocHost_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocHost_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1469_try_end;
            __pyx_L1464_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2656
 *             global __cuMemAllocHost_v2
 *             __cuMemAllocHost_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocHost_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1465_exception_handled;
            }
            __pyx_L1465_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1469_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2658
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemFreeHost
 *             __cuMemFreeHost = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemFreeHost')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2660
 *         try:
 *             global __cuMemFreeHost
 *             __cuMemFreeHost = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemFreeHost')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2660, __pyx_L1470_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2660, __pyx_L1470_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemFreeHost};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2660, __pyx_L1470_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemFreeHost};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2660, __pyx_L1470_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2660, __pyx_L1470_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemFreeHost);
                __Pyx_GIVEREF(__pyx_n_u_cuMemFreeHost);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemFreeHost);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2660, __pyx_L1470_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2660, __pyx_L1470_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemFreeHost = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2658
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemFreeHost
 *             __cuMemFreeHost = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemFreeHost')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1475_try_end;
            __pyx_L1470_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2661
 *             global __cuMemFreeHost
 *             __cuMemFreeHost = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemFreeHost')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1471_exception_handled;
            }
            __pyx_L1471_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1475_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2663
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemHostAlloc
 *             __cuMemHostAlloc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemHostAlloc')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2665
 *         try:
 *             global __cuMemHostAlloc
 *             __cuMemHostAlloc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemHostAlloc')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2665, __pyx_L1476_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2665, __pyx_L1476_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemHostAlloc};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2665, __pyx_L1476_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemHostAlloc};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2665, __pyx_L1476_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2665, __pyx_L1476_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemHostAlloc);
                __Pyx_GIVEREF(__pyx_n_u_cuMemHostAlloc);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemHostAlloc);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2665, __pyx_L1476_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2665, __pyx_L1476_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemHostAlloc = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2663
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemHostAlloc
 *             __cuMemHostAlloc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemHostAlloc')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1481_try_end;
            __pyx_L1476_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2666
 *             global __cuMemHostAlloc
 *             __cuMemHostAlloc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemHostAlloc')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1477_exception_handled;
            }
            __pyx_L1477_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1481_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2668
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemHostGetDevicePointer_v2
 *             __cuMemHostGetDevicePointer_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemHostGetDevicePointer_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2670
 *         try:
 *             global __cuMemHostGetDevicePointer_v2
 *             __cuMemHostGetDevicePointer_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemHostGetDevicePointer_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2670, __pyx_L1482_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2670, __pyx_L1482_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemHostGetDevicePointer_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2670, __pyx_L1482_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemHostGetDevicePointer_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2670, __pyx_L1482_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2670, __pyx_L1482_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemHostGetDevicePointer_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuMemHostGetDevicePointer_v2);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemHostGetDevicePointer_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2670, __pyx_L1482_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2670, __pyx_L1482_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemHostGetDevicePointer_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2668
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemHostGetDevicePointer_v2
 *             __cuMemHostGetDevicePointer_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemHostGetDevicePointer_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1487_try_end;
            __pyx_L1482_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2671
 *             global __cuMemHostGetDevicePointer_v2
 *             __cuMemHostGetDevicePointer_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemHostGetDevicePointer_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1483_exception_handled;
            }
            __pyx_L1483_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1487_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2673
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemHostGetFlags
 *             __cuMemHostGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemHostGetFlags')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2675
 *         try:
 *             global __cuMemHostGetFlags
 *             __cuMemHostGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemHostGetFlags')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2675, __pyx_L1488_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2675, __pyx_L1488_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemHostGetFlags};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2675, __pyx_L1488_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemHostGetFlags};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2675, __pyx_L1488_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2675, __pyx_L1488_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemHostGetFlags);
                __Pyx_GIVEREF(__pyx_n_u_cuMemHostGetFlags);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemHostGetFlags);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2675, __pyx_L1488_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2675, __pyx_L1488_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemHostGetFlags = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2673
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemHostGetFlags
 *             __cuMemHostGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemHostGetFlags')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1493_try_end;
            __pyx_L1488_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2676
 *             global __cuMemHostGetFlags
 *             __cuMemHostGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemHostGetFlags')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1489_exception_handled;
            }
            __pyx_L1489_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1493_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2678
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemAllocManaged
 *             __cuMemAllocManaged = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocManaged')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2680
 *         try:
 *             global __cuMemAllocManaged
 *             __cuMemAllocManaged = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocManaged')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2680, __pyx_L1494_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2680, __pyx_L1494_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemAllocManaged};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2680, __pyx_L1494_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemAllocManaged};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2680, __pyx_L1494_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2680, __pyx_L1494_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemAllocManaged);
                __Pyx_GIVEREF(__pyx_n_u_cuMemAllocManaged);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemAllocManaged);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2680, __pyx_L1494_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2680, __pyx_L1494_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocManaged = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2678
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemAllocManaged
 *             __cuMemAllocManaged = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocManaged')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1499_try_end;
            __pyx_L1494_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2681
 *             global __cuMemAllocManaged
 *             __cuMemAllocManaged = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocManaged')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1495_exception_handled;
            }
            __pyx_L1495_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1499_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2683
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetByPCIBusId
 *             __cuDeviceGetByPCIBusId = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetByPCIBusId')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2685
 *         try:
 *             global __cuDeviceGetByPCIBusId
 *             __cuDeviceGetByPCIBusId = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetByPCIBusId')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2685, __pyx_L1500_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2685, __pyx_L1500_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuDeviceGetByPCIBusId};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2685, __pyx_L1500_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuDeviceGetByPCIBusId};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2685, __pyx_L1500_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2685, __pyx_L1500_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDeviceGetByPCIBusId);
                __Pyx_GIVEREF(__pyx_n_u_cuDeviceGetByPCIBusId);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuDeviceGetByPCIBusId);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2685, __pyx_L1500_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2685, __pyx_L1500_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetByPCIBusId = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2683
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetByPCIBusId
 *             __cuDeviceGetByPCIBusId = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetByPCIBusId')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1505_try_end;
            __pyx_L1500_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2686
 *             global __cuDeviceGetByPCIBusId
 *             __cuDeviceGetByPCIBusId = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetByPCIBusId')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1501_exception_handled;
            }
            __pyx_L1501_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1505_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2688
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetPCIBusId
 *             __cuDeviceGetPCIBusId = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetPCIBusId')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2690
 *         try:
 *             global __cuDeviceGetPCIBusId
 *             __cuDeviceGetPCIBusId = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetPCIBusId')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2690, __pyx_L1506_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2690, __pyx_L1506_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuDeviceGetPCIBusId};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2690, __pyx_L1506_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuDeviceGetPCIBusId};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2690, __pyx_L1506_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2690, __pyx_L1506_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDeviceGetPCIBusId);
                __Pyx_GIVEREF(__pyx_n_u_cuDeviceGetPCIBusId);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuDeviceGetPCIBusId);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2690, __pyx_L1506_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2690, __pyx_L1506_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetPCIBusId = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2688
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetPCIBusId
 *             __cuDeviceGetPCIBusId = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetPCIBusId')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1511_try_end;
            __pyx_L1506_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2691
 *             global __cuDeviceGetPCIBusId
 *             __cuDeviceGetPCIBusId = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetPCIBusId')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1507_exception_handled;
            }
            __pyx_L1507_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1511_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2693
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuIpcGetEventHandle
 *             __cuIpcGetEventHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuIpcGetEventHandle')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2695
 *         try:
 *             global __cuIpcGetEventHandle
 *             __cuIpcGetEventHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuIpcGetEventHandle')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2695, __pyx_L1512_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2695, __pyx_L1512_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuIpcGetEventHandle};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2695, __pyx_L1512_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuIpcGetEventHandle};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2695, __pyx_L1512_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2695, __pyx_L1512_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuIpcGetEventHandle);
                __Pyx_GIVEREF(__pyx_n_u_cuIpcGetEventHandle);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuIpcGetEventHandle);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2695, __pyx_L1512_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2695, __pyx_L1512_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuIpcGetEventHandle = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2693
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuIpcGetEventHandle
 *             __cuIpcGetEventHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuIpcGetEventHandle')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1517_try_end;
            __pyx_L1512_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2696
 *             global __cuIpcGetEventHandle
 *             __cuIpcGetEventHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuIpcGetEventHandle')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1513_exception_handled;
            }
            __pyx_L1513_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1517_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2698
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuIpcOpenEventHandle
 *             __cuIpcOpenEventHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuIpcOpenEventHandle')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2700
 *         try:
 *             global __cuIpcOpenEventHandle
 *             __cuIpcOpenEventHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuIpcOpenEventHandle')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2700, __pyx_L1518_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2700, __pyx_L1518_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuIpcOpenEventHandle};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2700, __pyx_L1518_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuIpcOpenEventHandle};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2700, __pyx_L1518_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2700, __pyx_L1518_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuIpcOpenEventHandle);
                __Pyx_GIVEREF(__pyx_n_u_cuIpcOpenEventHandle);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuIpcOpenEventHandle);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2700, __pyx_L1518_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2700, __pyx_L1518_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuIpcOpenEventHandle = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2698
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuIpcOpenEventHandle
 *             __cuIpcOpenEventHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuIpcOpenEventHandle')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1523_try_end;
            __pyx_L1518_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2701
 *             global __cuIpcOpenEventHandle
 *             __cuIpcOpenEventHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuIpcOpenEventHandle')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1519_exception_handled;
            }
            __pyx_L1519_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1523_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2703
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuIpcGetMemHandle
 *             __cuIpcGetMemHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuIpcGetMemHandle')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2705
 *         try:
 *             global __cuIpcGetMemHandle
 *             __cuIpcGetMemHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuIpcGetMemHandle')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2705, __pyx_L1524_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2705, __pyx_L1524_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuIpcGetMemHandle};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2705, __pyx_L1524_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuIpcGetMemHandle};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2705, __pyx_L1524_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2705, __pyx_L1524_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuIpcGetMemHandle);
                __Pyx_GIVEREF(__pyx_n_u_cuIpcGetMemHandle);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuIpcGetMemHandle);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2705, __pyx_L1524_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2705, __pyx_L1524_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuIpcGetMemHandle = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2703
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuIpcGetMemHandle
 *             __cuIpcGetMemHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuIpcGetMemHandle')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1529_try_end;
            __pyx_L1524_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2706
 *             global __cuIpcGetMemHandle
 *             __cuIpcGetMemHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuIpcGetMemHandle')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1525_exception_handled;
            }
            __pyx_L1525_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1529_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2708
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuIpcOpenMemHandle_v2
 *             __cuIpcOpenMemHandle_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuIpcOpenMemHandle_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2710
 *         try:
 *             global __cuIpcOpenMemHandle_v2
 *             __cuIpcOpenMemHandle_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuIpcOpenMemHandle_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2710, __pyx_L1530_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2710, __pyx_L1530_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuIpcOpenMemHandle_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2710, __pyx_L1530_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuIpcOpenMemHandle_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2710, __pyx_L1530_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2710, __pyx_L1530_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuIpcOpenMemHandle_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuIpcOpenMemHandle_v2);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuIpcOpenMemHandle_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2710, __pyx_L1530_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2710, __pyx_L1530_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuIpcOpenMemHandle_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2708
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuIpcOpenMemHandle_v2
 *             __cuIpcOpenMemHandle_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuIpcOpenMemHandle_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1535_try_end;
            __pyx_L1530_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2711
 *             global __cuIpcOpenMemHandle_v2
 *             __cuIpcOpenMemHandle_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuIpcOpenMemHandle_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1531_exception_handled;
            }
            __pyx_L1531_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1535_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2713
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuIpcCloseMemHandle
 *             __cuIpcCloseMemHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuIpcCloseMemHandle')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2715
 *         try:
 *             global __cuIpcCloseMemHandle
 *             __cuIpcCloseMemHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuIpcCloseMemHandle')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2715, __pyx_L1536_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2715, __pyx_L1536_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuIpcCloseMemHandle};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2715, __pyx_L1536_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuIpcCloseMemHandle};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2715, __pyx_L1536_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2715, __pyx_L1536_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuIpcCloseMemHandle);
                __Pyx_GIVEREF(__pyx_n_u_cuIpcCloseMemHandle);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuIpcCloseMemHandle);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2715, __pyx_L1536_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2715, __pyx_L1536_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuIpcCloseMemHandle = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2713
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuIpcCloseMemHandle
 *             __cuIpcCloseMemHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuIpcCloseMemHandle')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1541_try_end;
            __pyx_L1536_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2716
 *             global __cuIpcCloseMemHandle
 *             __cuIpcCloseMemHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuIpcCloseMemHandle')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1537_exception_handled;
            }
            __pyx_L1537_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1541_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2718
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemHostRegister_v2
 *             __cuMemHostRegister_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemHostRegister_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2720
 *         try:
 *             global __cuMemHostRegister_v2
 *             __cuMemHostRegister_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemHostRegister_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2720, __pyx_L1542_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2720, __pyx_L1542_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemHostRegister_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2720, __pyx_L1542_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemHostRegister_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2720, __pyx_L1542_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2720, __pyx_L1542_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemHostRegister_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuMemHostRegister_v2);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemHostRegister_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2720, __pyx_L1542_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2720, __pyx_L1542_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemHostRegister_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2718
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemHostRegister_v2
 *             __cuMemHostRegister_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemHostRegister_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1547_try_end;
            __pyx_L1542_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2721
 *             global __cuMemHostRegister_v2
 *             __cuMemHostRegister_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemHostRegister_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1543_exception_handled;
            }
            __pyx_L1543_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1547_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2723
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemHostUnregister
 *             __cuMemHostUnregister = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemHostUnregister')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2725
 *         try:
 *             global __cuMemHostUnregister
 *             __cuMemHostUnregister = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemHostUnregister')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2725, __pyx_L1548_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2725, __pyx_L1548_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemHostUnregister};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2725, __pyx_L1548_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemHostUnregister};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2725, __pyx_L1548_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2725, __pyx_L1548_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemHostUnregister);
                __Pyx_GIVEREF(__pyx_n_u_cuMemHostUnregister);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemHostUnregister);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2725, __pyx_L1548_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2725, __pyx_L1548_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemHostUnregister = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2723
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemHostUnregister
 *             __cuMemHostUnregister = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemHostUnregister')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1553_try_end;
            __pyx_L1548_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2726
 *             global __cuMemHostUnregister
 *             __cuMemHostUnregister = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemHostUnregister')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1549_exception_handled;
            }
            __pyx_L1549_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1553_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2728
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuArrayCreate_v2
 *             __cuArrayCreate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayCreate_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2730
 *         try:
 *             global __cuArrayCreate_v2
 *             __cuArrayCreate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayCreate_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2730, __pyx_L1554_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2730, __pyx_L1554_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuArrayCreate_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2730, __pyx_L1554_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuArrayCreate_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2730, __pyx_L1554_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2730, __pyx_L1554_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuArrayCreate_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuArrayCreate_v2);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuArrayCreate_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2730, __pyx_L1554_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2730, __pyx_L1554_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuArrayCreate_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2728
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuArrayCreate_v2
 *             __cuArrayCreate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayCreate_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1559_try_end;
            __pyx_L1554_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2731
 *             global __cuArrayCreate_v2
 *             __cuArrayCreate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayCreate_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1555_exception_handled;
            }
            __pyx_L1555_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1559_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2733
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuArrayGetDescriptor_v2
 *             __cuArrayGetDescriptor_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayGetDescriptor_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2735
 *         try:
 *             global __cuArrayGetDescriptor_v2
 *             __cuArrayGetDescriptor_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayGetDescriptor_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2735, __pyx_L1560_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2735, __pyx_L1560_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuArrayGetDescriptor_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2735, __pyx_L1560_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuArrayGetDescriptor_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2735, __pyx_L1560_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2735, __pyx_L1560_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuArrayGetDescriptor_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuArrayGetDescriptor_v2);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuArrayGetDescriptor_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2735, __pyx_L1560_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2735, __pyx_L1560_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetDescriptor_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2733
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuArrayGetDescriptor_v2
 *             __cuArrayGetDescriptor_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayGetDescriptor_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1565_try_end;
            __pyx_L1560_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2736
 *             global __cuArrayGetDescriptor_v2
 *             __cuArrayGetDescriptor_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayGetDescriptor_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1561_exception_handled;
            }
            __pyx_L1561_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1565_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2738
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuArrayGetSparseProperties
 *             __cuArrayGetSparseProperties = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayGetSparseProperties')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2740
 *         try:
 *             global __cuArrayGetSparseProperties
 *             __cuArrayGetSparseProperties = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayGetSparseProperties')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2740, __pyx_L1566_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2740, __pyx_L1566_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuArrayGetSparseProperties};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2740, __pyx_L1566_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuArrayGetSparseProperties};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2740, __pyx_L1566_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2740, __pyx_L1566_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuArrayGetSparseProperties);
                __Pyx_GIVEREF(__pyx_n_u_cuArrayGetSparseProperties);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuArrayGetSparseProperties);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2740, __pyx_L1566_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2740, __pyx_L1566_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetSparseProperties = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2738
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuArrayGetSparseProperties
 *             __cuArrayGetSparseProperties = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayGetSparseProperties')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1571_try_end;
            __pyx_L1566_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2741
 *             global __cuArrayGetSparseProperties
 *             __cuArrayGetSparseProperties = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayGetSparseProperties')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1567_exception_handled;
            }
            __pyx_L1567_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1571_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2743
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMipmappedArrayGetSparseProperties
 *             __cuMipmappedArrayGetSparseProperties = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayGetSparseProperties')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2745
 *         try:
 *             global __cuMipmappedArrayGetSparseProperties
 *             __cuMipmappedArrayGetSparseProperties = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayGetSparseProperties')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2745, __pyx_L1572_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2745, __pyx_L1572_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMipmappedArrayGetSparsePropert};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2745, __pyx_L1572_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMipmappedArrayGetSparsePropert};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2745, __pyx_L1572_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2745, __pyx_L1572_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMipmappedArrayGetSparsePropert);
                __Pyx_GIVEREF(__pyx_n_u_cuMipmappedArrayGetSparsePropert);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMipmappedArrayGetSparsePropert);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2745, __pyx_L1572_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2745, __pyx_L1572_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetSparseProperties = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2743
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMipmappedArrayGetSparseProperties
 *             __cuMipmappedArrayGetSparseProperties = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayGetSparseProperties')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1577_try_end;
            __pyx_L1572_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2746
 *             global __cuMipmappedArrayGetSparseProperties
 *             __cuMipmappedArrayGetSparseProperties = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayGetSparseProperties')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1573_exception_handled;
            }
            __pyx_L1573_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1577_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2748
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuArrayGetMemoryRequirements
 *             __cuArrayGetMemoryRequirements = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayGetMemoryRequirements')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2750
 *         try:
 *             global __cuArrayGetMemoryRequirements
 *             __cuArrayGetMemoryRequirements = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayGetMemoryRequirements')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2750, __pyx_L1578_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2750, __pyx_L1578_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuArrayGetMemoryRequirements};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2750, __pyx_L1578_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuArrayGetMemoryRequirements};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2750, __pyx_L1578_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2750, __pyx_L1578_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuArrayGetMemoryRequirements);
                __Pyx_GIVEREF(__pyx_n_u_cuArrayGetMemoryRequirements);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuArrayGetMemoryRequirements);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2750, __pyx_L1578_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2750, __pyx_L1578_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetMemoryRequirements = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2748
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuArrayGetMemoryRequirements
 *             __cuArrayGetMemoryRequirements = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayGetMemoryRequirements')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1583_try_end;
            __pyx_L1578_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2751
 *             global __cuArrayGetMemoryRequirements
 *             __cuArrayGetMemoryRequirements = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayGetMemoryRequirements')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1579_exception_handled;
            }
            __pyx_L1579_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1583_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2753
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMipmappedArrayGetMemoryRequirements
 *             __cuMipmappedArrayGetMemoryRequirements = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayGetMemoryRequirements')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2755
 *         try:
 *             global __cuMipmappedArrayGetMemoryRequirements
 *             __cuMipmappedArrayGetMemoryRequirements = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayGetMemoryRequirements')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2755, __pyx_L1584_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2755, __pyx_L1584_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMipmappedArrayGetMemoryRequire};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2755, __pyx_L1584_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMipmappedArrayGetMemoryRequire};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2755, __pyx_L1584_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2755, __pyx_L1584_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMipmappedArrayGetMemoryRequire);
                __Pyx_GIVEREF(__pyx_n_u_cuMipmappedArrayGetMemoryRequire);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMipmappedArrayGetMemoryRequire);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2755, __pyx_L1584_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2755, __pyx_L1584_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetMemoryRequirements = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2753
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMipmappedArrayGetMemoryRequirements
 *             __cuMipmappedArrayGetMemoryRequirements = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayGetMemoryRequirements')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1589_try_end;
            __pyx_L1584_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2756
 *             global __cuMipmappedArrayGetMemoryRequirements
 *             __cuMipmappedArrayGetMemoryRequirements = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayGetMemoryRequirements')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1585_exception_handled;
            }
            __pyx_L1585_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1589_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2758
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuArrayGetPlane
 *             __cuArrayGetPlane = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayGetPlane')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2760
 *         try:
 *             global __cuArrayGetPlane
 *             __cuArrayGetPlane = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayGetPlane')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2760, __pyx_L1590_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2760, __pyx_L1590_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuArrayGetPlane};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2760, __pyx_L1590_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuArrayGetPlane};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2760, __pyx_L1590_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2760, __pyx_L1590_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuArrayGetPlane);
                __Pyx_GIVEREF(__pyx_n_u_cuArrayGetPlane);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuArrayGetPlane);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2760, __pyx_L1590_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2760, __pyx_L1590_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetPlane = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2758
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuArrayGetPlane
 *             __cuArrayGetPlane = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayGetPlane')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1595_try_end;
            __pyx_L1590_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2761
 *             global __cuArrayGetPlane
 *             __cuArrayGetPlane = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayGetPlane')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1591_exception_handled;
            }
            __pyx_L1591_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1595_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2763
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuArrayDestroy
 *             __cuArrayDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayDestroy')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2765
 *         try:
 *             global __cuArrayDestroy
 *             __cuArrayDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayDestroy')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2765, __pyx_L1596_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2765, __pyx_L1596_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuArrayDestroy};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2765, __pyx_L1596_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuArrayDestroy};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2765, __pyx_L1596_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2765, __pyx_L1596_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuArrayDestroy);
                __Pyx_GIVEREF(__pyx_n_u_cuArrayDestroy);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuArrayDestroy);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2765, __pyx_L1596_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2765, __pyx_L1596_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuArrayDestroy = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2763
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuArrayDestroy
 *             __cuArrayDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayDestroy')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1601_try_end;
            __pyx_L1596_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2766
 *             global __cuArrayDestroy
 *             __cuArrayDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayDestroy')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1597_exception_handled;
            }
            __pyx_L1597_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1601_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2768
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuArray3DCreate_v2
 *             __cuArray3DCreate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArray3DCreate_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2770
 *         try:
 *             global __cuArray3DCreate_v2
 *             __cuArray3DCreate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArray3DCreate_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2770, __pyx_L1602_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2770, __pyx_L1602_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuArray3DCreate_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2770, __pyx_L1602_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuArray3DCreate_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2770, __pyx_L1602_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2770, __pyx_L1602_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuArray3DCreate_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuArray3DCreate_v2);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuArray3DCreate_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2770, __pyx_L1602_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2770, __pyx_L1602_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuArray3DCreate_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2768
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuArray3DCreate_v2
 *             __cuArray3DCreate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArray3DCreate_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1607_try_end;
            __pyx_L1602_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2771
 *             global __cuArray3DCreate_v2
 *             __cuArray3DCreate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArray3DCreate_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1603_exception_handled;
            }
            __pyx_L1603_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1607_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2773
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuArray3DGetDescriptor_v2
 *             __cuArray3DGetDescriptor_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArray3DGetDescriptor_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2775
 *         try:
 *             global __cuArray3DGetDescriptor_v2
 *             __cuArray3DGetDescriptor_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArray3DGetDescriptor_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2775, __pyx_L1608_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2775, __pyx_L1608_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuArray3DGetDescriptor_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2775, __pyx_L1608_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuArray3DGetDescriptor_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2775, __pyx_L1608_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2775, __pyx_L1608_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuArray3DGetDescriptor_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuArray3DGetDescriptor_v2);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuArray3DGetDescriptor_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2775, __pyx_L1608_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2775, __pyx_L1608_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuArray3DGetDescriptor_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2773
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuArray3DGetDescriptor_v2
 *             __cuArray3DGetDescriptor_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArray3DGetDescriptor_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1613_try_end;
            __pyx_L1608_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2776
 *             global __cuArray3DGetDescriptor_v2
 *             __cuArray3DGetDescriptor_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArray3DGetDescriptor_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1609_exception_handled;
            }
            __pyx_L1609_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1613_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2778
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMipmappedArrayCreate
 *             __cuMipmappedArrayCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayCreate')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2780
 *         try:
 *             global __cuMipmappedArrayCreate
 *             __cuMipmappedArrayCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayCreate')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2780, __pyx_L1614_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2780, __pyx_L1614_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMipmappedArrayCreate};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2780, __pyx_L1614_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMipmappedArrayCreate};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2780, __pyx_L1614_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2780, __pyx_L1614_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMipmappedArrayCreate);
                __Pyx_GIVEREF(__pyx_n_u_cuMipmappedArrayCreate);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMipmappedArrayCreate);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2780, __pyx_L1614_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2780, __pyx_L1614_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayCreate = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2778
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMipmappedArrayCreate
 *             __cuMipmappedArrayCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayCreate')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1619_try_end;
            __pyx_L1614_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2781
 *             global __cuMipmappedArrayCreate
 *             __cuMipmappedArrayCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayCreate')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1615_exception_handled;
            }
            __pyx_L1615_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1619_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2783
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMipmappedArrayGetLevel
 *             __cuMipmappedArrayGetLevel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayGetLevel')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2785
 *         try:
 *             global __cuMipmappedArrayGetLevel
 *             __cuMipmappedArrayGetLevel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayGetLevel')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2785, __pyx_L1620_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2785, __pyx_L1620_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMipmappedArrayGetLevel};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2785, __pyx_L1620_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMipmappedArrayGetLevel};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2785, __pyx_L1620_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2785, __pyx_L1620_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMipmappedArrayGetLevel);
                __Pyx_GIVEREF(__pyx_n_u_cuMipmappedArrayGetLevel);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMipmappedArrayGetLevel);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2785, __pyx_L1620_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2785, __pyx_L1620_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetLevel = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2783
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMipmappedArrayGetLevel
 *             __cuMipmappedArrayGetLevel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayGetLevel')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1625_try_end;
            __pyx_L1620_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2786
 *             global __cuMipmappedArrayGetLevel
 *             __cuMipmappedArrayGetLevel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayGetLevel')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1621_exception_handled;
            }
            __pyx_L1621_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1625_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2788
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMipmappedArrayDestroy
 *             __cuMipmappedArrayDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayDestroy')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2790
 *         try:
 *             global __cuMipmappedArrayDestroy
 *             __cuMipmappedArrayDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayDestroy')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2790, __pyx_L1626_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2790, __pyx_L1626_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMipmappedArrayDestroy};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2790, __pyx_L1626_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMipmappedArrayDestroy};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2790, __pyx_L1626_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2790, __pyx_L1626_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMipmappedArrayDestroy);
                __Pyx_GIVEREF(__pyx_n_u_cuMipmappedArrayDestroy);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMipmappedArrayDestroy);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2790, __pyx_L1626_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2790, __pyx_L1626_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayDestroy = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2788
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMipmappedArrayDestroy
 *             __cuMipmappedArrayDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayDestroy')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1631_try_end;
            __pyx_L1626_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2791
 *             global __cuMipmappedArrayDestroy
 *             __cuMipmappedArrayDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayDestroy')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1627_exception_handled;
            }
            __pyx_L1627_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1631_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2793
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemGetHandleForAddressRange
 *             __cuMemGetHandleForAddressRange = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetHandleForAddressRange')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2795
 *         try:
 *             global __cuMemGetHandleForAddressRange
 *             __cuMemGetHandleForAddressRange = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetHandleForAddressRange')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2795, __pyx_L1632_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2795, __pyx_L1632_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemGetHandleForAddressRange};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2795, __pyx_L1632_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemGetHandleForAddressRange};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2795, __pyx_L1632_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2795, __pyx_L1632_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemGetHandleForAddressRange);
                __Pyx_GIVEREF(__pyx_n_u_cuMemGetHandleForAddressRange);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemGetHandleForAddressRange);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2795, __pyx_L1632_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2795, __pyx_L1632_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemGetHandleForAddressRange = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2793
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemGetHandleForAddressRange
 *             __cuMemGetHandleForAddressRange = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetHandleForAddressRange')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1637_try_end;
            __pyx_L1632_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2796
 *             global __cuMemGetHandleForAddressRange
 *             __cuMemGetHandleForAddressRange = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetHandleForAddressRange')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1633_exception_handled;
            }
            __pyx_L1633_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1637_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2798
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemAddressReserve
 *             __cuMemAddressReserve = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAddressReserve')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2800
 *         try:
 *             global __cuMemAddressReserve
 *             __cuMemAddressReserve = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAddressReserve')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2800, __pyx_L1638_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2800, __pyx_L1638_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemAddressReserve};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2800, __pyx_L1638_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemAddressReserve};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2800, __pyx_L1638_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2800, __pyx_L1638_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemAddressReserve);
                __Pyx_GIVEREF(__pyx_n_u_cuMemAddressReserve);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemAddressReserve);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2800, __pyx_L1638_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2800, __pyx_L1638_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemAddressReserve = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2798
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemAddressReserve
 *             __cuMemAddressReserve = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAddressReserve')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1643_try_end;
            __pyx_L1638_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2801
 *             global __cuMemAddressReserve
 *             __cuMemAddressReserve = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAddressReserve')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1639_exception_handled;
            }
            __pyx_L1639_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1643_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2803
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemAddressFree
 *             __cuMemAddressFree = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAddressFree')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2805
 *         try:
 *             global __cuMemAddressFree
 *             __cuMemAddressFree = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAddressFree')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2805, __pyx_L1644_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2805, __pyx_L1644_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemAddressFree};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2805, __pyx_L1644_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemAddressFree};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2805, __pyx_L1644_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2805, __pyx_L1644_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemAddressFree);
                __Pyx_GIVEREF(__pyx_n_u_cuMemAddressFree);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemAddressFree);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2805, __pyx_L1644_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2805, __pyx_L1644_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemAddressFree = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2803
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemAddressFree
 *             __cuMemAddressFree = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAddressFree')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1649_try_end;
            __pyx_L1644_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2806
 *             global __cuMemAddressFree
 *             __cuMemAddressFree = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAddressFree')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1645_exception_handled;
            }
            __pyx_L1645_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1649_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2808
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemCreate
 *             __cuMemCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemCreate')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2810
 *         try:
 *             global __cuMemCreate
 *             __cuMemCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemCreate')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2810, __pyx_L1650_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2810, __pyx_L1650_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemCreate};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2810, __pyx_L1650_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemCreate};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2810, __pyx_L1650_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2810, __pyx_L1650_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemCreate);
                __Pyx_GIVEREF(__pyx_n_u_cuMemCreate);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemCreate);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2810, __pyx_L1650_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2810, __pyx_L1650_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemCreate = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2808
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemCreate
 *             __cuMemCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemCreate')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1655_try_end;
            __pyx_L1650_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2811
 *             global __cuMemCreate
 *             __cuMemCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemCreate')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1651_exception_handled;
            }
            __pyx_L1651_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1655_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2813
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemRelease
 *             __cuMemRelease = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemRelease')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2815
 *         try:
 *             global __cuMemRelease
 *             __cuMemRelease = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemRelease')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2815, __pyx_L1656_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2815, __pyx_L1656_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemRelease};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2815, __pyx_L1656_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemRelease};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2815, __pyx_L1656_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2815, __pyx_L1656_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemRelease);
                __Pyx_GIVEREF(__pyx_n_u_cuMemRelease);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemRelease);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2815, __pyx_L1656_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2815, __pyx_L1656_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemRelease = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2813
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemRelease
 *             __cuMemRelease = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemRelease')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1661_try_end;
            __pyx_L1656_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2816
 *             global __cuMemRelease
 *             __cuMemRelease = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemRelease')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1657_exception_handled;
            }
            __pyx_L1657_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1661_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2818
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemMap
 *             __cuMemMap = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemMap')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2820
 *         try:
 *             global __cuMemMap
 *             __cuMemMap = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemMap')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2820, __pyx_L1662_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2820, __pyx_L1662_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemMap};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2820, __pyx_L1662_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemMap};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2820, __pyx_L1662_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2820, __pyx_L1662_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemMap);
                __Pyx_GIVEREF(__pyx_n_u_cuMemMap);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemMap);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2820, __pyx_L1662_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2820, __pyx_L1662_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemMap = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2818
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemMap
 *             __cuMemMap = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemMap')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1667_try_end;
            __pyx_L1662_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2821
 *             global __cuMemMap
 *             __cuMemMap = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemMap')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1663_exception_handled;
            }
            __pyx_L1663_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1667_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2823
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemUnmap
 *             __cuMemUnmap = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemUnmap')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2825
 *         try:
 *             global __cuMemUnmap
 *             __cuMemUnmap = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemUnmap')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2825, __pyx_L1668_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2825, __pyx_L1668_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemUnmap};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2825, __pyx_L1668_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemUnmap};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2825, __pyx_L1668_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2825, __pyx_L1668_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemUnmap);
                __Pyx_GIVEREF(__pyx_n_u_cuMemUnmap);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemUnmap);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2825, __pyx_L1668_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2825, __pyx_L1668_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemUnmap = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2823
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemUnmap
 *             __cuMemUnmap = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemUnmap')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1673_try_end;
            __pyx_L1668_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2826
 *             global __cuMemUnmap
 *             __cuMemUnmap = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemUnmap')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1669_exception_handled;
            }
            __pyx_L1669_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1673_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2828
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemSetAccess
 *             __cuMemSetAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemSetAccess')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2830
 *         try:
 *             global __cuMemSetAccess
 *             __cuMemSetAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemSetAccess')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2830, __pyx_L1674_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2830, __pyx_L1674_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemSetAccess};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2830, __pyx_L1674_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemSetAccess};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2830, __pyx_L1674_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2830, __pyx_L1674_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemSetAccess);
                __Pyx_GIVEREF(__pyx_n_u_cuMemSetAccess);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemSetAccess);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2830, __pyx_L1674_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2830, __pyx_L1674_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemSetAccess = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2828
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemSetAccess
 *             __cuMemSetAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemSetAccess')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1679_try_end;
            __pyx_L1674_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2831
 *             global __cuMemSetAccess
 *             __cuMemSetAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemSetAccess')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1675_exception_handled;
            }
            __pyx_L1675_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1679_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2833
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemGetAccess
 *             __cuMemGetAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetAccess')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2835
 *         try:
 *             global __cuMemGetAccess
 *             __cuMemGetAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetAccess')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2835, __pyx_L1680_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2835, __pyx_L1680_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemGetAccess};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2835, __pyx_L1680_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemGetAccess};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2835, __pyx_L1680_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2835, __pyx_L1680_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemGetAccess);
                __Pyx_GIVEREF(__pyx_n_u_cuMemGetAccess);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemGetAccess);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2835, __pyx_L1680_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2835, __pyx_L1680_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAccess = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2833
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemGetAccess
 *             __cuMemGetAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetAccess')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1685_try_end;
            __pyx_L1680_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2836
 *             global __cuMemGetAccess
 *             __cuMemGetAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetAccess')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1681_exception_handled;
            }
            __pyx_L1681_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1685_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2838
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemExportToShareableHandle
 *             __cuMemExportToShareableHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemExportToShareableHandle')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2840
 *         try:
 *             global __cuMemExportToShareableHandle
 *             __cuMemExportToShareableHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemExportToShareableHandle')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2840, __pyx_L1686_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2840, __pyx_L1686_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemExportToShareableHandle};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2840, __pyx_L1686_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemExportToShareableHandle};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2840, __pyx_L1686_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2840, __pyx_L1686_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemExportToShareableHandle);
                __Pyx_GIVEREF(__pyx_n_u_cuMemExportToShareableHandle);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemExportToShareableHandle);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2840, __pyx_L1686_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2840, __pyx_L1686_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemExportToShareableHandle = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2838
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemExportToShareableHandle
 *             __cuMemExportToShareableHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemExportToShareableHandle')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1691_try_end;
            __pyx_L1686_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2841
 *             global __cuMemExportToShareableHandle
 *             __cuMemExportToShareableHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemExportToShareableHandle')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1687_exception_handled;
            }
            __pyx_L1687_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1691_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2843
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemImportFromShareableHandle
 *             __cuMemImportFromShareableHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemImportFromShareableHandle')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2845
 *         try:
 *             global __cuMemImportFromShareableHandle
 *             __cuMemImportFromShareableHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemImportFromShareableHandle')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2845, __pyx_L1692_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2845, __pyx_L1692_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemImportFromShareableHandle};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2845, __pyx_L1692_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemImportFromShareableHandle};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2845, __pyx_L1692_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2845, __pyx_L1692_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemImportFromShareableHandle);
                __Pyx_GIVEREF(__pyx_n_u_cuMemImportFromShareableHandle);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemImportFromShareableHandle);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2845, __pyx_L1692_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2845, __pyx_L1692_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemImportFromShareableHandle = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2843
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemImportFromShareableHandle
 *             __cuMemImportFromShareableHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemImportFromShareableHandle')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1697_try_end;
            __pyx_L1692_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2846
 *             global __cuMemImportFromShareableHandle
 *             __cuMemImportFromShareableHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemImportFromShareableHandle')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1693_exception_handled;
            }
            __pyx_L1693_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1697_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2848
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemGetAllocationGranularity
 *             __cuMemGetAllocationGranularity = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetAllocationGranularity')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2850
 *         try:
 *             global __cuMemGetAllocationGranularity
 *             __cuMemGetAllocationGranularity = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetAllocationGranularity')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2850, __pyx_L1698_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2850, __pyx_L1698_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemGetAllocationGranularity};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2850, __pyx_L1698_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemGetAllocationGranularity};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2850, __pyx_L1698_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2850, __pyx_L1698_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemGetAllocationGranularity);
                __Pyx_GIVEREF(__pyx_n_u_cuMemGetAllocationGranularity);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemGetAllocationGranularity);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2850, __pyx_L1698_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2850, __pyx_L1698_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAllocationGranularity = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2848
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemGetAllocationGranularity
 *             __cuMemGetAllocationGranularity = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetAllocationGranularity')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1703_try_end;
            __pyx_L1698_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2851
 *             global __cuMemGetAllocationGranularity
 *             __cuMemGetAllocationGranularity = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetAllocationGranularity')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1699_exception_handled;
            }
            __pyx_L1699_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1703_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2853
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemGetAllocationPropertiesFromHandle
 *             __cuMemGetAllocationPropertiesFromHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetAllocationPropertiesFromHandle')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2855
 *         try:
 *             global __cuMemGetAllocationPropertiesFromHandle
 *             __cuMemGetAllocationPropertiesFromHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetAllocationPropertiesFromHandle')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2855, __pyx_L1704_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2855, __pyx_L1704_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemGetAllocationPropertiesFrom};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2855, __pyx_L1704_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemGetAllocationPropertiesFrom};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2855, __pyx_L1704_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2855, __pyx_L1704_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemGetAllocationPropertiesFrom);
                __Pyx_GIVEREF(__pyx_n_u_cuMemGetAllocationPropertiesFrom);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemGetAllocationPropertiesFrom);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2855, __pyx_L1704_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2855, __pyx_L1704_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAllocationPropertiesFromHandle = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2853
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemGetAllocationPropertiesFromHandle
 *             __cuMemGetAllocationPropertiesFromHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetAllocationPropertiesFromHandle')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1709_try_end;
            __pyx_L1704_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2856
 *             global __cuMemGetAllocationPropertiesFromHandle
 *             __cuMemGetAllocationPropertiesFromHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetAllocationPropertiesFromHandle')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1705_exception_handled;
            }
            __pyx_L1705_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1709_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2858
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemRetainAllocationHandle
 *             __cuMemRetainAllocationHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemRetainAllocationHandle')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2860
 *         try:
 *             global __cuMemRetainAllocationHandle
 *             __cuMemRetainAllocationHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemRetainAllocationHandle')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2860, __pyx_L1710_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2860, __pyx_L1710_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemRetainAllocationHandle};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2860, __pyx_L1710_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemRetainAllocationHandle};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2860, __pyx_L1710_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2860, __pyx_L1710_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemRetainAllocationHandle);
                __Pyx_GIVEREF(__pyx_n_u_cuMemRetainAllocationHandle);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemRetainAllocationHandle);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2860, __pyx_L1710_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2860, __pyx_L1710_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemRetainAllocationHandle = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2858
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemRetainAllocationHandle
 *             __cuMemRetainAllocationHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemRetainAllocationHandle')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1715_try_end;
            __pyx_L1710_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2861
 *             global __cuMemRetainAllocationHandle
 *             __cuMemRetainAllocationHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemRetainAllocationHandle')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1711_exception_handled;
            }
            __pyx_L1711_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1715_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2863
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemPoolTrimTo
 *             __cuMemPoolTrimTo = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolTrimTo')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2865
 *         try:
 *             global __cuMemPoolTrimTo
 *             __cuMemPoolTrimTo = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolTrimTo')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2865, __pyx_L1716_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2865, __pyx_L1716_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemPoolTrimTo};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2865, __pyx_L1716_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemPoolTrimTo};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2865, __pyx_L1716_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2865, __pyx_L1716_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemPoolTrimTo);
                __Pyx_GIVEREF(__pyx_n_u_cuMemPoolTrimTo);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemPoolTrimTo);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2865, __pyx_L1716_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2865, __pyx_L1716_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolTrimTo = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2863
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemPoolTrimTo
 *             __cuMemPoolTrimTo = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolTrimTo')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1721_try_end;
            __pyx_L1716_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2866
 *             global __cuMemPoolTrimTo
 *             __cuMemPoolTrimTo = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolTrimTo')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1717_exception_handled;
            }
            __pyx_L1717_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1721_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2868
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemPoolSetAttribute
 *             __cuMemPoolSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolSetAttribute')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2870
 *         try:
 *             global __cuMemPoolSetAttribute
 *             __cuMemPoolSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolSetAttribute')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2870, __pyx_L1722_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2870, __pyx_L1722_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemPoolSetAttribute};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2870, __pyx_L1722_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemPoolSetAttribute};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2870, __pyx_L1722_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2870, __pyx_L1722_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemPoolSetAttribute);
                __Pyx_GIVEREF(__pyx_n_u_cuMemPoolSetAttribute);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemPoolSetAttribute);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2870, __pyx_L1722_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2870, __pyx_L1722_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolSetAttribute = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2868
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemPoolSetAttribute
 *             __cuMemPoolSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolSetAttribute')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1727_try_end;
            __pyx_L1722_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2871
 *             global __cuMemPoolSetAttribute
 *             __cuMemPoolSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolSetAttribute')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1723_exception_handled;
            }
            __pyx_L1723_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1727_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2873
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemPoolGetAttribute
 *             __cuMemPoolGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolGetAttribute')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2875
 *         try:
 *             global __cuMemPoolGetAttribute
 *             __cuMemPoolGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolGetAttribute')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2875, __pyx_L1728_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2875, __pyx_L1728_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemPoolGetAttribute};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2875, __pyx_L1728_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemPoolGetAttribute};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2875, __pyx_L1728_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2875, __pyx_L1728_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemPoolGetAttribute);
                __Pyx_GIVEREF(__pyx_n_u_cuMemPoolGetAttribute);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemPoolGetAttribute);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2875, __pyx_L1728_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2875, __pyx_L1728_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolGetAttribute = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2873
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemPoolGetAttribute
 *             __cuMemPoolGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolGetAttribute')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1733_try_end;
            __pyx_L1728_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2876
 *             global __cuMemPoolGetAttribute
 *             __cuMemPoolGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolGetAttribute')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1729_exception_handled;
            }
            __pyx_L1729_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1733_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2878
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemPoolSetAccess
 *             __cuMemPoolSetAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolSetAccess')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2880
 *         try:
 *             global __cuMemPoolSetAccess
 *             __cuMemPoolSetAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolSetAccess')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2880, __pyx_L1734_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2880, __pyx_L1734_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemPoolSetAccess};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2880, __pyx_L1734_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemPoolSetAccess};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2880, __pyx_L1734_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2880, __pyx_L1734_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemPoolSetAccess);
                __Pyx_GIVEREF(__pyx_n_u_cuMemPoolSetAccess);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemPoolSetAccess);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2880, __pyx_L1734_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2880, __pyx_L1734_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolSetAccess = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2878
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemPoolSetAccess
 *             __cuMemPoolSetAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolSetAccess')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1739_try_end;
            __pyx_L1734_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2881
 *             global __cuMemPoolSetAccess
 *             __cuMemPoolSetAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolSetAccess')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1735_exception_handled;
            }
            __pyx_L1735_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1739_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2883
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemPoolGetAccess
 *             __cuMemPoolGetAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolGetAccess')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2885
 *         try:
 *             global __cuMemPoolGetAccess
 *             __cuMemPoolGetAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolGetAccess')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2885, __pyx_L1740_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2885, __pyx_L1740_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemPoolGetAccess};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2885, __pyx_L1740_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemPoolGetAccess};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2885, __pyx_L1740_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2885, __pyx_L1740_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemPoolGetAccess);
                __Pyx_GIVEREF(__pyx_n_u_cuMemPoolGetAccess);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemPoolGetAccess);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2885, __pyx_L1740_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2885, __pyx_L1740_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolGetAccess = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2883
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemPoolGetAccess
 *             __cuMemPoolGetAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolGetAccess')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1745_try_end;
            __pyx_L1740_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2886
 *             global __cuMemPoolGetAccess
 *             __cuMemPoolGetAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolGetAccess')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1741_exception_handled;
            }
            __pyx_L1741_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1745_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2888
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemPoolCreate
 *             __cuMemPoolCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolCreate')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2890
 *         try:
 *             global __cuMemPoolCreate
 *             __cuMemPoolCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolCreate')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2890, __pyx_L1746_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2890, __pyx_L1746_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemPoolCreate};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2890, __pyx_L1746_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemPoolCreate};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2890, __pyx_L1746_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2890, __pyx_L1746_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemPoolCreate);
                __Pyx_GIVEREF(__pyx_n_u_cuMemPoolCreate);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemPoolCreate);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2890, __pyx_L1746_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2890, __pyx_L1746_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolCreate = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2888
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemPoolCreate
 *             __cuMemPoolCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolCreate')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1751_try_end;
            __pyx_L1746_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2891
 *             global __cuMemPoolCreate
 *             __cuMemPoolCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolCreate')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1747_exception_handled;
            }
            __pyx_L1747_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1751_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2893
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemPoolDestroy
 *             __cuMemPoolDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolDestroy')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2895
 *         try:
 *             global __cuMemPoolDestroy
 *             __cuMemPoolDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolDestroy')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2895, __pyx_L1752_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2895, __pyx_L1752_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemPoolDestroy};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2895, __pyx_L1752_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemPoolDestroy};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2895, __pyx_L1752_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2895, __pyx_L1752_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemPoolDestroy);
                __Pyx_GIVEREF(__pyx_n_u_cuMemPoolDestroy);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemPoolDestroy);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2895, __pyx_L1752_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2895, __pyx_L1752_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolDestroy = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2893
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemPoolDestroy
 *             __cuMemPoolDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolDestroy')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1757_try_end;
            __pyx_L1752_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2896
 *             global __cuMemPoolDestroy
 *             __cuMemPoolDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolDestroy')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1753_exception_handled;
            }
            __pyx_L1753_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1757_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2898
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemPoolExportToShareableHandle
 *             __cuMemPoolExportToShareableHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolExportToShareableHandle')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2900
 *         try:
 *             global __cuMemPoolExportToShareableHandle
 *             __cuMemPoolExportToShareableHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolExportToShareableHandle')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2900, __pyx_L1758_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2900, __pyx_L1758_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemPoolExportToShareableHandle};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2900, __pyx_L1758_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemPoolExportToShareableHandle};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2900, __pyx_L1758_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2900, __pyx_L1758_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemPoolExportToShareableHandle);
                __Pyx_GIVEREF(__pyx_n_u_cuMemPoolExportToShareableHandle);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemPoolExportToShareableHandle);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2900, __pyx_L1758_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2900, __pyx_L1758_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolExportToShareableHandle = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2898
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemPoolExportToShareableHandle
 *             __cuMemPoolExportToShareableHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolExportToShareableHandle')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1763_try_end;
            __pyx_L1758_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2901
 *             global __cuMemPoolExportToShareableHandle
 *             __cuMemPoolExportToShareableHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolExportToShareableHandle')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1759_exception_handled;
            }
            __pyx_L1759_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1763_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2903
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemPoolImportFromShareableHandle
 *             __cuMemPoolImportFromShareableHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolImportFromShareableHandle')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2905
 *         try:
 *             global __cuMemPoolImportFromShareableHandle
 *             __cuMemPoolImportFromShareableHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolImportFromShareableHandle')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2905, __pyx_L1764_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2905, __pyx_L1764_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemPoolImportFromShareableHand};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2905, __pyx_L1764_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemPoolImportFromShareableHand};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2905, __pyx_L1764_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2905, __pyx_L1764_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemPoolImportFromShareableHand);
                __Pyx_GIVEREF(__pyx_n_u_cuMemPoolImportFromShareableHand);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemPoolImportFromShareableHand);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2905, __pyx_L1764_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2905, __pyx_L1764_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolImportFromShareableHandle = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2903
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemPoolImportFromShareableHandle
 *             __cuMemPoolImportFromShareableHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolImportFromShareableHandle')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1769_try_end;
            __pyx_L1764_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2906
 *             global __cuMemPoolImportFromShareableHandle
 *             __cuMemPoolImportFromShareableHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolImportFromShareableHandle')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1765_exception_handled;
            }
            __pyx_L1765_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1769_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2908
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemPoolExportPointer
 *             __cuMemPoolExportPointer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolExportPointer')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2910
 *         try:
 *             global __cuMemPoolExportPointer
 *             __cuMemPoolExportPointer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolExportPointer')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2910, __pyx_L1770_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2910, __pyx_L1770_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemPoolExportPointer};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2910, __pyx_L1770_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemPoolExportPointer};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2910, __pyx_L1770_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2910, __pyx_L1770_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemPoolExportPointer);
                __Pyx_GIVEREF(__pyx_n_u_cuMemPoolExportPointer);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemPoolExportPointer);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2910, __pyx_L1770_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2910, __pyx_L1770_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolExportPointer = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2908
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemPoolExportPointer
 *             __cuMemPoolExportPointer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolExportPointer')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1775_try_end;
            __pyx_L1770_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2911
 *             global __cuMemPoolExportPointer
 *             __cuMemPoolExportPointer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolExportPointer')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1771_exception_handled;
            }
            __pyx_L1771_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1775_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2913
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemPoolImportPointer
 *             __cuMemPoolImportPointer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolImportPointer')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2915
 *         try:
 *             global __cuMemPoolImportPointer
 *             __cuMemPoolImportPointer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolImportPointer')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2915, __pyx_L1776_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2915, __pyx_L1776_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemPoolImportPointer};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2915, __pyx_L1776_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemPoolImportPointer};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2915, __pyx_L1776_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2915, __pyx_L1776_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemPoolImportPointer);
                __Pyx_GIVEREF(__pyx_n_u_cuMemPoolImportPointer);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemPoolImportPointer);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2915, __pyx_L1776_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2915, __pyx_L1776_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolImportPointer = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2913
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemPoolImportPointer
 *             __cuMemPoolImportPointer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolImportPointer')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1781_try_end;
            __pyx_L1776_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2916
 *             global __cuMemPoolImportPointer
 *             __cuMemPoolImportPointer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolImportPointer')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1777_exception_handled;
            }
            __pyx_L1777_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1781_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2918
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMulticastCreate
 *             __cuMulticastCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMulticastCreate')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2920
 *         try:
 *             global __cuMulticastCreate
 *             __cuMulticastCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMulticastCreate')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2920, __pyx_L1782_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2920, __pyx_L1782_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMulticastCreate};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2920, __pyx_L1782_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMulticastCreate};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2920, __pyx_L1782_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2920, __pyx_L1782_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMulticastCreate);
                __Pyx_GIVEREF(__pyx_n_u_cuMulticastCreate);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMulticastCreate);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2920, __pyx_L1782_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2920, __pyx_L1782_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMulticastCreate = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2918
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMulticastCreate
 *             __cuMulticastCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMulticastCreate')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1787_try_end;
            __pyx_L1782_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2921
 *             global __cuMulticastCreate
 *             __cuMulticastCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMulticastCreate')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1783_exception_handled;
            }
            __pyx_L1783_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1787_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2923
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMulticastAddDevice
 *             __cuMulticastAddDevice = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMulticastAddDevice')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2925
 *         try:
 *             global __cuMulticastAddDevice
 *             __cuMulticastAddDevice = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMulticastAddDevice')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2925, __pyx_L1788_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2925, __pyx_L1788_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMulticastAddDevice};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2925, __pyx_L1788_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMulticastAddDevice};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2925, __pyx_L1788_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2925, __pyx_L1788_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMulticastAddDevice);
                __Pyx_GIVEREF(__pyx_n_u_cuMulticastAddDevice);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMulticastAddDevice);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2925, __pyx_L1788_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2925, __pyx_L1788_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMulticastAddDevice = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2923
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMulticastAddDevice
 *             __cuMulticastAddDevice = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMulticastAddDevice')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1793_try_end;
            __pyx_L1788_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2926
 *             global __cuMulticastAddDevice
 *             __cuMulticastAddDevice = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMulticastAddDevice')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1789_exception_handled;
            }
            __pyx_L1789_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1793_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2928
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMulticastBindMem
 *             __cuMulticastBindMem = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMulticastBindMem')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2930
 *         try:
 *             global __cuMulticastBindMem
 *             __cuMulticastBindMem = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMulticastBindMem')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2930, __pyx_L1794_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2930, __pyx_L1794_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMulticastBindMem};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2930, __pyx_L1794_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMulticastBindMem};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2930, __pyx_L1794_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2930, __pyx_L1794_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMulticastBindMem);
                __Pyx_GIVEREF(__pyx_n_u_cuMulticastBindMem);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMulticastBindMem);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2930, __pyx_L1794_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2930, __pyx_L1794_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMulticastBindMem = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2928
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMulticastBindMem
 *             __cuMulticastBindMem = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMulticastBindMem')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1799_try_end;
            __pyx_L1794_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2931
 *             global __cuMulticastBindMem
 *             __cuMulticastBindMem = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMulticastBindMem')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1795_exception_handled;
            }
            __pyx_L1795_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1799_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2933
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMulticastBindAddr
 *             __cuMulticastBindAddr = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMulticastBindAddr')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2935
 *         try:
 *             global __cuMulticastBindAddr
 *             __cuMulticastBindAddr = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMulticastBindAddr')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2935, __pyx_L1800_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2935, __pyx_L1800_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMulticastBindAddr};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2935, __pyx_L1800_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMulticastBindAddr};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2935, __pyx_L1800_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2935, __pyx_L1800_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMulticastBindAddr);
                __Pyx_GIVEREF(__pyx_n_u_cuMulticastBindAddr);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMulticastBindAddr);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2935, __pyx_L1800_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2935, __pyx_L1800_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMulticastBindAddr = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2933
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMulticastBindAddr
 *             __cuMulticastBindAddr = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMulticastBindAddr')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1805_try_end;
            __pyx_L1800_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2936
 *             global __cuMulticastBindAddr
 *             __cuMulticastBindAddr = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMulticastBindAddr')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1801_exception_handled;
            }
            __pyx_L1801_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1805_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2938
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMulticastUnbind
 *             __cuMulticastUnbind = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMulticastUnbind')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2940
 *         try:
 *             global __cuMulticastUnbind
 *             __cuMulticastUnbind = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMulticastUnbind')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2940, __pyx_L1806_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2940, __pyx_L1806_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMulticastUnbind};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2940, __pyx_L1806_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMulticastUnbind};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2940, __pyx_L1806_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2940, __pyx_L1806_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMulticastUnbind);
                __Pyx_GIVEREF(__pyx_n_u_cuMulticastUnbind);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMulticastUnbind);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2940, __pyx_L1806_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2940, __pyx_L1806_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMulticastUnbind = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2938
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMulticastUnbind
 *             __cuMulticastUnbind = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMulticastUnbind')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1811_try_end;
            __pyx_L1806_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2941
 *             global __cuMulticastUnbind
 *             __cuMulticastUnbind = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMulticastUnbind')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1807_exception_handled;
            }
            __pyx_L1807_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1811_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2943
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMulticastGetGranularity
 *             __cuMulticastGetGranularity = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMulticastGetGranularity')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2945
 *         try:
 *             global __cuMulticastGetGranularity
 *             __cuMulticastGetGranularity = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMulticastGetGranularity')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2945, __pyx_L1812_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2945, __pyx_L1812_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMulticastGetGranularity};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2945, __pyx_L1812_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMulticastGetGranularity};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2945, __pyx_L1812_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2945, __pyx_L1812_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMulticastGetGranularity);
                __Pyx_GIVEREF(__pyx_n_u_cuMulticastGetGranularity);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMulticastGetGranularity);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2945, __pyx_L1812_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2945, __pyx_L1812_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMulticastGetGranularity = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2943
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMulticastGetGranularity
 *             __cuMulticastGetGranularity = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMulticastGetGranularity')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1817_try_end;
            __pyx_L1812_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2946
 *             global __cuMulticastGetGranularity
 *             __cuMulticastGetGranularity = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMulticastGetGranularity')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1813_exception_handled;
            }
            __pyx_L1813_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1817_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2948
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuPointerGetAttribute
 *             __cuPointerGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuPointerGetAttribute')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2950
 *         try:
 *             global __cuPointerGetAttribute
 *             __cuPointerGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuPointerGetAttribute')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2950, __pyx_L1818_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2950, __pyx_L1818_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuPointerGetAttribute};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2950, __pyx_L1818_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuPointerGetAttribute};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2950, __pyx_L1818_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2950, __pyx_L1818_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuPointerGetAttribute);
                __Pyx_GIVEREF(__pyx_n_u_cuPointerGetAttribute);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuPointerGetAttribute);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2950, __pyx_L1818_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2950, __pyx_L1818_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuPointerGetAttribute = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2948
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuPointerGetAttribute
 *             __cuPointerGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuPointerGetAttribute')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1823_try_end;
            __pyx_L1818_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2951
 *             global __cuPointerGetAttribute
 *             __cuPointerGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuPointerGetAttribute')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1819_exception_handled;
            }
            __pyx_L1819_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1823_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2953
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemAdvise
 *             __cuMemAdvise = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAdvise')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2955
 *         try:
 *             global __cuMemAdvise
 *             __cuMemAdvise = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAdvise')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2955, __pyx_L1824_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2955, __pyx_L1824_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemAdvise};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2955, __pyx_L1824_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemAdvise};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2955, __pyx_L1824_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2955, __pyx_L1824_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemAdvise);
                __Pyx_GIVEREF(__pyx_n_u_cuMemAdvise);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemAdvise);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2955, __pyx_L1824_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2955, __pyx_L1824_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemAdvise = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2953
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemAdvise
 *             __cuMemAdvise = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAdvise')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1829_try_end;
            __pyx_L1824_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2956
 *             global __cuMemAdvise
 *             __cuMemAdvise = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAdvise')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1825_exception_handled;
            }
            __pyx_L1825_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1829_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2958
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemAdvise_v2
 *             __cuMemAdvise_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAdvise_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2960
 *         try:
 *             global __cuMemAdvise_v2
 *             __cuMemAdvise_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAdvise_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2960, __pyx_L1830_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2960, __pyx_L1830_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemAdvise_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2960, __pyx_L1830_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuMemAdvise_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2960, __pyx_L1830_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2960, __pyx_L1830_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemAdvise_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuMemAdvise_v2);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemAdvise_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2960, __pyx_L1830_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2960, __pyx_L1830_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemAdvise_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2958
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemAdvise_v2
 *             __cuMemAdvise_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAdvise_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1835_try_end;
            __pyx_L1830_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2961
 *             global __cuMemAdvise_v2
 *             __cuMemAdvise_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAdvise_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1831_exception_handled;
            }
            __pyx_L1831_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1835_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2963
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemRangeGetAttribute
 *             __cuMemRangeGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemRangeGetAttribute')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2965
 *         try:
 *             global __cuMemRangeGetAttribute
 *             __cuMemRangeGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemRangeGetAttribute')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2965, __pyx_L1836_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2965, __pyx_L1836_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemRangeGetAttribute};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2965, __pyx_L1836_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuMemRangeGetAttribute};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2965, __pyx_L1836_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2965, __pyx_L1836_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemRangeGetAttribute);
                __Pyx_GIVEREF(__pyx_n_u_cuMemRangeGetAttribute);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemRangeGetAttribute);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2965, __pyx_L1836_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2965, __pyx_L1836_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemRangeGetAttribute = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2963
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemRangeGetAttribute
 *             __cuMemRangeGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemRangeGetAttribute')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1841_try_end;
            __pyx_L1836_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2966
 *             global __cuMemRangeGetAttribute
 *             __cuMemRangeGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemRangeGetAttribute')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1837_exception_handled;
            }
            __pyx_L1837_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1841_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2968
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemRangeGetAttributes
 *             __cuMemRangeGetAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemRangeGetAttributes')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2970
 *         try:
 *             global __cuMemRangeGetAttributes
 *             __cuMemRangeGetAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemRangeGetAttributes')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2970, __pyx_L1842_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2970, __pyx_L1842_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemRangeGetAttributes};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2970, __pyx_L1842_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuMemRangeGetAttributes};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2970, __pyx_L1842_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2970, __pyx_L1842_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuMemRangeGetAttributes);
                __Pyx_GIVEREF(__pyx_n_u_cuMemRangeGetAttributes);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemRangeGetAttributes);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2970, __pyx_L1842_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2970, __pyx_L1842_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuMemRangeGetAttributes = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2968
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemRangeGetAttributes
 *             __cuMemRangeGetAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemRangeGetAttributes')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1847_try_end;
            __pyx_L1842_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2971
 *             global __cuMemRangeGetAttributes
 *             __cuMemRangeGetAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemRangeGetAttributes')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1843_exception_handled;
            }
            __pyx_L1843_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1847_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2973
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuPointerSetAttribute
 *             __cuPointerSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuPointerSetAttribute')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2975
 *         try:
 *             global __cuPointerSetAttribute
 *             __cuPointerSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuPointerSetAttribute')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2975, __pyx_L1848_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2975, __pyx_L1848_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuPointerSetAttribute};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2975, __pyx_L1848_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuPointerSetAttribute};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2975, __pyx_L1848_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2975, __pyx_L1848_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuPointerSetAttribute);
                __Pyx_GIVEREF(__pyx_n_u_cuPointerSetAttribute);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuPointerSetAttribute);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2975, __pyx_L1848_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2975, __pyx_L1848_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuPointerSetAttribute = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2973
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuPointerSetAttribute
 *             __cuPointerSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuPointerSetAttribute')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1853_try_end;
            __pyx_L1848_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2976
 *             global __cuPointerSetAttribute
 *             __cuPointerSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuPointerSetAttribute')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1849_exception_handled;
            }
            __pyx_L1849_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1853_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2978
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuPointerGetAttributes
 *             __cuPointerGetAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuPointerGetAttributes')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2980
 *         try:
 *             global __cuPointerGetAttributes
 *             __cuPointerGetAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuPointerGetAttributes')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2980, __pyx_L1854_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2980, __pyx_L1854_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuPointerGetAttributes};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2980, __pyx_L1854_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuPointerGetAttributes};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2980, __pyx_L1854_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2980, __pyx_L1854_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuPointerGetAttributes);
                __Pyx_GIVEREF(__pyx_n_u_cuPointerGetAttributes);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuPointerGetAttributes);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2980, __pyx_L1854_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2980, __pyx_L1854_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuPointerGetAttributes = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2978
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuPointerGetAttributes
 *             __cuPointerGetAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuPointerGetAttributes')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1859_try_end;
            __pyx_L1854_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2981
 *             global __cuPointerGetAttributes
 *             __cuPointerGetAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuPointerGetAttributes')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1855_exception_handled;
            }
            __pyx_L1855_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1859_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2983
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuStreamCreate
 *             __cuStreamCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamCreate')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2985
 *         try:
 *             global __cuStreamCreate
 *             __cuStreamCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamCreate')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2985, __pyx_L1860_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2985, __pyx_L1860_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamCreate};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2985, __pyx_L1860_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamCreate};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2985, __pyx_L1860_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2985, __pyx_L1860_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuStreamCreate);
                __Pyx_GIVEREF(__pyx_n_u_cuStreamCreate);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamCreate);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2985, __pyx_L1860_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2985, __pyx_L1860_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuStreamCreate = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2983
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuStreamCreate
 *             __cuStreamCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamCreate')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1865_try_end;
            __pyx_L1860_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2986
 *             global __cuStreamCreate
 *             __cuStreamCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamCreate')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1861_exception_handled;
            }
            __pyx_L1861_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1865_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2988
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuStreamCreateWithPriority
 *             __cuStreamCreateWithPriority = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamCreateWithPriority')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2990
 *         try:
 *             global __cuStreamCreateWithPriority
 *             __cuStreamCreateWithPriority = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamCreateWithPriority')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2990, __pyx_L1866_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2990, __pyx_L1866_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamCreateWithPriority};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2990, __pyx_L1866_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuStreamCreateWithPriority};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2990, __pyx_L1866_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2990, __pyx_L1866_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuStreamCreateWithPriority);
                __Pyx_GIVEREF(__pyx_n_u_cuStreamCreateWithPriority);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamCreateWithPriority);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2990, __pyx_L1866_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2990, __pyx_L1866_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuStreamCreateWithPriority = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2988
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuStreamCreateWithPriority
 *             __cuStreamCreateWithPriority = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamCreateWithPriority')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1871_try_end;
            __pyx_L1866_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2991
 *             global __cuStreamCreateWithPriority
 *             __cuStreamCreateWithPriority = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamCreateWithPriority')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1867_exception_handled;
            }
            __pyx_L1867_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1871_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2993
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuThreadExchangeStreamCaptureMode
 *             __cuThreadExchangeStreamCaptureMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuThreadExchangeStreamCaptureMode')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":2995
 *         try:
 *             global __cuThreadExchangeStreamCaptureMode
 *             __cuThreadExchangeStreamCaptureMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuThreadExchangeStreamCaptureMode')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2995, __pyx_L1872_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2995, __pyx_L1872_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuThreadExchangeStreamCaptureMod};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2995, __pyx_L1872_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuThreadExchangeStreamCaptureMod};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2995, __pyx_L1872_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2995, __pyx_L1872_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuThreadExchangeStreamCaptureMod);
                __Pyx_GIVEREF(__pyx_n_u_cuThreadExchangeStreamCaptureMod);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuThreadExchangeStreamCaptureMod);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2995, __pyx_L1872_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 2995, __pyx_L1872_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuThreadExchangeStreamCaptureMode = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2993
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuThreadExchangeStreamCaptureMode
 *             __cuThreadExchangeStreamCaptureMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuThreadExchangeStreamCaptureMode')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1877_try_end;
            __pyx_L1872_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":2996
 *             global __cuThreadExchangeStreamCaptureMode
 *             __cuThreadExchangeStreamCaptureMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuThreadExchangeStreamCaptureMode')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1873_exception_handled;
            }
            __pyx_L1873_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1877_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":2998
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuStreamDestroy_v2
 *             __cuStreamDestroy_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamDestroy_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3000
 *         try:
 *             global __cuStreamDestroy_v2
 *             __cuStreamDestroy_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamDestroy_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3000, __pyx_L1878_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3000, __pyx_L1878_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamDestroy_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3000, __pyx_L1878_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuStreamDestroy_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3000, __pyx_L1878_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3000, __pyx_L1878_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuStreamDestroy_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuStreamDestroy_v2);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamDestroy_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3000, __pyx_L1878_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3000, __pyx_L1878_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuStreamDestroy_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2998
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuStreamDestroy_v2
 *             __cuStreamDestroy_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamDestroy_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1883_try_end;
            __pyx_L1878_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3001
 *             global __cuStreamDestroy_v2
 *             __cuStreamDestroy_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamDestroy_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1879_exception_handled;
            }
            __pyx_L1879_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1883_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3003
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEventCreate
 *             __cuEventCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventCreate')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3005
 *         try:
 *             global __cuEventCreate
 *             __cuEventCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventCreate')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3005, __pyx_L1884_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3005, __pyx_L1884_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuEventCreate};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3005, __pyx_L1884_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuEventCreate};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3005, __pyx_L1884_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3005, __pyx_L1884_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuEventCreate);
                __Pyx_GIVEREF(__pyx_n_u_cuEventCreate);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuEventCreate);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3005, __pyx_L1884_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3005, __pyx_L1884_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuEventCreate = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3003
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEventCreate
 *             __cuEventCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventCreate')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1889_try_end;
            __pyx_L1884_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3006
 *             global __cuEventCreate
 *             __cuEventCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventCreate')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1885_exception_handled;
            }
            __pyx_L1885_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1889_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3008
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEventQuery
 *             __cuEventQuery = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventQuery')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3010
 *         try:
 *             global __cuEventQuery
 *             __cuEventQuery = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventQuery')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3010, __pyx_L1890_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3010, __pyx_L1890_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuEventQuery};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3010, __pyx_L1890_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuEventQuery};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3010, __pyx_L1890_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3010, __pyx_L1890_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuEventQuery);
                __Pyx_GIVEREF(__pyx_n_u_cuEventQuery);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuEventQuery);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3010, __pyx_L1890_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3010, __pyx_L1890_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuEventQuery = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3008
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEventQuery
 *             __cuEventQuery = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventQuery')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1895_try_end;
            __pyx_L1890_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3011
 *             global __cuEventQuery
 *             __cuEventQuery = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventQuery')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1891_exception_handled;
            }
            __pyx_L1891_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1895_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3013
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEventSynchronize
 *             __cuEventSynchronize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventSynchronize')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3015
 *         try:
 *             global __cuEventSynchronize
 *             __cuEventSynchronize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventSynchronize')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3015, __pyx_L1896_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3015, __pyx_L1896_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuEventSynchronize};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3015, __pyx_L1896_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuEventSynchronize};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3015, __pyx_L1896_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3015, __pyx_L1896_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuEventSynchronize);
                __Pyx_GIVEREF(__pyx_n_u_cuEventSynchronize);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuEventSynchronize);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3015, __pyx_L1896_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3015, __pyx_L1896_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuEventSynchronize = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3013
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEventSynchronize
 *             __cuEventSynchronize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventSynchronize')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1901_try_end;
            __pyx_L1896_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3016
 *             global __cuEventSynchronize
 *             __cuEventSynchronize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventSynchronize')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1897_exception_handled;
            }
            __pyx_L1897_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1901_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3018
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEventDestroy_v2
 *             __cuEventDestroy_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventDestroy_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3020
 *         try:
 *             global __cuEventDestroy_v2
 *             __cuEventDestroy_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventDestroy_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3020, __pyx_L1902_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3020, __pyx_L1902_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuEventDestroy_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3020, __pyx_L1902_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuEventDestroy_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3020, __pyx_L1902_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3020, __pyx_L1902_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuEventDestroy_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuEventDestroy_v2);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuEventDestroy_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3020, __pyx_L1902_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3020, __pyx_L1902_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuEventDestroy_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3018
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEventDestroy_v2
 *             __cuEventDestroy_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventDestroy_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1907_try_end;
            __pyx_L1902_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3021
 *             global __cuEventDestroy_v2
 *             __cuEventDestroy_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventDestroy_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1903_exception_handled;
            }
            __pyx_L1903_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1907_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3023
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEventElapsedTime
 *             __cuEventElapsedTime = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventElapsedTime')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3025
 *         try:
 *             global __cuEventElapsedTime
 *             __cuEventElapsedTime = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventElapsedTime')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3025, __pyx_L1908_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3025, __pyx_L1908_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuEventElapsedTime};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3025, __pyx_L1908_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuEventElapsedTime};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3025, __pyx_L1908_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3025, __pyx_L1908_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuEventElapsedTime);
                __Pyx_GIVEREF(__pyx_n_u_cuEventElapsedTime);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuEventElapsedTime);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3025, __pyx_L1908_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3025, __pyx_L1908_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuEventElapsedTime = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3023
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEventElapsedTime
 *             __cuEventElapsedTime = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventElapsedTime')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1913_try_end;
            __pyx_L1908_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3026
 *             global __cuEventElapsedTime
 *             __cuEventElapsedTime = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventElapsedTime')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1909_exception_handled;
            }
            __pyx_L1909_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1913_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3028
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuImportExternalMemory
 *             __cuImportExternalMemory = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuImportExternalMemory')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3030
 *         try:
 *             global __cuImportExternalMemory
 *             __cuImportExternalMemory = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuImportExternalMemory')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3030, __pyx_L1914_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3030, __pyx_L1914_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuImportExternalMemory};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3030, __pyx_L1914_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuImportExternalMemory};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3030, __pyx_L1914_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3030, __pyx_L1914_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuImportExternalMemory);
                __Pyx_GIVEREF(__pyx_n_u_cuImportExternalMemory);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuImportExternalMemory);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3030, __pyx_L1914_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3030, __pyx_L1914_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuImportExternalMemory = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3028
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuImportExternalMemory
 *             __cuImportExternalMemory = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuImportExternalMemory')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1919_try_end;
            __pyx_L1914_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3031
 *             global __cuImportExternalMemory
 *             __cuImportExternalMemory = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuImportExternalMemory')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1915_exception_handled;
            }
            __pyx_L1915_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1919_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3033
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuExternalMemoryGetMappedBuffer
 *             __cuExternalMemoryGetMappedBuffer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuExternalMemoryGetMappedBuffer')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3035
 *         try:
 *             global __cuExternalMemoryGetMappedBuffer
 *             __cuExternalMemoryGetMappedBuffer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuExternalMemoryGetMappedBuffer')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3035, __pyx_L1920_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3035, __pyx_L1920_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuExternalMemoryGetMappedBuffer};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3035, __pyx_L1920_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuExternalMemoryGetMappedBuffer};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3035, __pyx_L1920_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3035, __pyx_L1920_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuExternalMemoryGetMappedBuffer);
                __Pyx_GIVEREF(__pyx_n_u_cuExternalMemoryGetMappedBuffer);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuExternalMemoryGetMappedBuffer);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3035, __pyx_L1920_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3035, __pyx_L1920_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuExternalMemoryGetMappedBuffer = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3033
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuExternalMemoryGetMappedBuffer
 *             __cuExternalMemoryGetMappedBuffer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuExternalMemoryGetMappedBuffer')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1925_try_end;
            __pyx_L1920_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3036
 *             global __cuExternalMemoryGetMappedBuffer
 *             __cuExternalMemoryGetMappedBuffer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuExternalMemoryGetMappedBuffer')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1921_exception_handled;
            }
            __pyx_L1921_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1925_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3038
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuExternalMemoryGetMappedMipmappedArray
 *             __cuExternalMemoryGetMappedMipmappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuExternalMemoryGetMappedMipmappedArray')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3040
 *         try:
 *             global __cuExternalMemoryGetMappedMipmappedArray
 *             __cuExternalMemoryGetMappedMipmappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuExternalMemoryGetMappedMipmappedArray')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3040, __pyx_L1926_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3040, __pyx_L1926_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuExternalMemoryGetMappedMipmapp};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3040, __pyx_L1926_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuExternalMemoryGetMappedMipmapp};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3040, __pyx_L1926_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3040, __pyx_L1926_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuExternalMemoryGetMappedMipmapp);
                __Pyx_GIVEREF(__pyx_n_u_cuExternalMemoryGetMappedMipmapp);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuExternalMemoryGetMappedMipmapp);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3040, __pyx_L1926_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3040, __pyx_L1926_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuExternalMemoryGetMappedMipmappedArray = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3038
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuExternalMemoryGetMappedMipmappedArray
 *             __cuExternalMemoryGetMappedMipmappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuExternalMemoryGetMappedMipmappedArray')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1931_try_end;
            __pyx_L1926_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3041
 *             global __cuExternalMemoryGetMappedMipmappedArray
 *             __cuExternalMemoryGetMappedMipmappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuExternalMemoryGetMappedMipmappedArray')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1927_exception_handled;
            }
            __pyx_L1927_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1931_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3043
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDestroyExternalMemory
 *             __cuDestroyExternalMemory = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDestroyExternalMemory')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3045
 *         try:
 *             global __cuDestroyExternalMemory
 *             __cuDestroyExternalMemory = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDestroyExternalMemory')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3045, __pyx_L1932_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3045, __pyx_L1932_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuDestroyExternalMemory};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3045, __pyx_L1932_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuDestroyExternalMemory};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3045, __pyx_L1932_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3045, __pyx_L1932_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDestroyExternalMemory);
                __Pyx_GIVEREF(__pyx_n_u_cuDestroyExternalMemory);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuDestroyExternalMemory);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3045, __pyx_L1932_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3045, __pyx_L1932_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDestroyExternalMemory = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3043
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDestroyExternalMemory
 *             __cuDestroyExternalMemory = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDestroyExternalMemory')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1937_try_end;
            __pyx_L1932_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3046
 *             global __cuDestroyExternalMemory
 *             __cuDestroyExternalMemory = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDestroyExternalMemory')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1933_exception_handled;
            }
            __pyx_L1933_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1937_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3048
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuImportExternalSemaphore
 *             __cuImportExternalSemaphore = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuImportExternalSemaphore')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3050
 *         try:
 *             global __cuImportExternalSemaphore
 *             __cuImportExternalSemaphore = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuImportExternalSemaphore')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3050, __pyx_L1938_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3050, __pyx_L1938_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuImportExternalSemaphore};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3050, __pyx_L1938_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuImportExternalSemaphore};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3050, __pyx_L1938_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3050, __pyx_L1938_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuImportExternalSemaphore);
                __Pyx_GIVEREF(__pyx_n_u_cuImportExternalSemaphore);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuImportExternalSemaphore);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3050, __pyx_L1938_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3050, __pyx_L1938_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuImportExternalSemaphore = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3048
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuImportExternalSemaphore
 *             __cuImportExternalSemaphore = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuImportExternalSemaphore')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1943_try_end;
            __pyx_L1938_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3051
 *             global __cuImportExternalSemaphore
 *             __cuImportExternalSemaphore = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuImportExternalSemaphore')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1939_exception_handled;
            }
            __pyx_L1939_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1943_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3053
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDestroyExternalSemaphore
 *             __cuDestroyExternalSemaphore = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDestroyExternalSemaphore')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3055
 *         try:
 *             global __cuDestroyExternalSemaphore
 *             __cuDestroyExternalSemaphore = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDestroyExternalSemaphore')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3055, __pyx_L1944_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3055, __pyx_L1944_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuDestroyExternalSemaphore};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3055, __pyx_L1944_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuDestroyExternalSemaphore};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3055, __pyx_L1944_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3055, __pyx_L1944_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDestroyExternalSemaphore);
                __Pyx_GIVEREF(__pyx_n_u_cuDestroyExternalSemaphore);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuDestroyExternalSemaphore);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3055, __pyx_L1944_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3055, __pyx_L1944_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDestroyExternalSemaphore = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3053
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDestroyExternalSemaphore
 *             __cuDestroyExternalSemaphore = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDestroyExternalSemaphore')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1949_try_end;
            __pyx_L1944_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3056
 *             global __cuDestroyExternalSemaphore
 *             __cuDestroyExternalSemaphore = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDestroyExternalSemaphore')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1945_exception_handled;
            }
            __pyx_L1945_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1949_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3058
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFuncGetAttribute
 *             __cuFuncGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncGetAttribute')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3060
 *         try:
 *             global __cuFuncGetAttribute
 *             __cuFuncGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncGetAttribute')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3060, __pyx_L1950_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3060, __pyx_L1950_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuFuncGetAttribute};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3060, __pyx_L1950_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuFuncGetAttribute};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3060, __pyx_L1950_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3060, __pyx_L1950_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuFuncGetAttribute);
                __Pyx_GIVEREF(__pyx_n_u_cuFuncGetAttribute);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuFuncGetAttribute);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3060, __pyx_L1950_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3060, __pyx_L1950_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuFuncGetAttribute = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3058
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFuncGetAttribute
 *             __cuFuncGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncGetAttribute')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1955_try_end;
            __pyx_L1950_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3061
 *             global __cuFuncGetAttribute
 *             __cuFuncGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncGetAttribute')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1951_exception_handled;
            }
            __pyx_L1951_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1955_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3063
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFuncSetAttribute
 *             __cuFuncSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetAttribute')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3065
 *         try:
 *             global __cuFuncSetAttribute
 *             __cuFuncSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetAttribute')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3065, __pyx_L1956_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3065, __pyx_L1956_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuFuncSetAttribute};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3065, __pyx_L1956_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuFuncSetAttribute};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3065, __pyx_L1956_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3065, __pyx_L1956_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuFuncSetAttribute);
                __Pyx_GIVEREF(__pyx_n_u_cuFuncSetAttribute);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuFuncSetAttribute);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3065, __pyx_L1956_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3065, __pyx_L1956_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetAttribute = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3063
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFuncSetAttribute
 *             __cuFuncSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetAttribute')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1961_try_end;
            __pyx_L1956_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3066
 *             global __cuFuncSetAttribute
 *             __cuFuncSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetAttribute')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1957_exception_handled;
            }
            __pyx_L1957_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1961_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3068
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFuncSetCacheConfig
 *             __cuFuncSetCacheConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetCacheConfig')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3070
 *         try:
 *             global __cuFuncSetCacheConfig
 *             __cuFuncSetCacheConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetCacheConfig')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3070, __pyx_L1962_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3070, __pyx_L1962_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuFuncSetCacheConfig};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3070, __pyx_L1962_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuFuncSetCacheConfig};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3070, __pyx_L1962_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3070, __pyx_L1962_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuFuncSetCacheConfig);
                __Pyx_GIVEREF(__pyx_n_u_cuFuncSetCacheConfig);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuFuncSetCacheConfig);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3070, __pyx_L1962_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3070, __pyx_L1962_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetCacheConfig = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3068
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFuncSetCacheConfig
 *             __cuFuncSetCacheConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetCacheConfig')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1967_try_end;
            __pyx_L1962_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3071
 *             global __cuFuncSetCacheConfig
 *             __cuFuncSetCacheConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetCacheConfig')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1963_exception_handled;
            }
            __pyx_L1963_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1967_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3073
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFuncSetSharedMemConfig
 *             __cuFuncSetSharedMemConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetSharedMemConfig')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3075
 *         try:
 *             global __cuFuncSetSharedMemConfig
 *             __cuFuncSetSharedMemConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetSharedMemConfig')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3075, __pyx_L1968_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3075, __pyx_L1968_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuFuncSetSharedMemConfig};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3075, __pyx_L1968_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuFuncSetSharedMemConfig};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3075, __pyx_L1968_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3075, __pyx_L1968_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuFuncSetSharedMemConfig);
                __Pyx_GIVEREF(__pyx_n_u_cuFuncSetSharedMemConfig);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuFuncSetSharedMemConfig);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3075, __pyx_L1968_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3075, __pyx_L1968_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetSharedMemConfig = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3073
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFuncSetSharedMemConfig
 *             __cuFuncSetSharedMemConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetSharedMemConfig')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1973_try_end;
            __pyx_L1968_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3076
 *             global __cuFuncSetSharedMemConfig
 *             __cuFuncSetSharedMemConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetSharedMemConfig')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1969_exception_handled;
            }
            __pyx_L1969_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1973_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3078
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFuncGetModule
 *             __cuFuncGetModule = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncGetModule')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3080
 *         try:
 *             global __cuFuncGetModule
 *             __cuFuncGetModule = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncGetModule')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3080, __pyx_L1974_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3080, __pyx_L1974_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuFuncGetModule};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3080, __pyx_L1974_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuFuncGetModule};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3080, __pyx_L1974_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3080, __pyx_L1974_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuFuncGetModule);
                __Pyx_GIVEREF(__pyx_n_u_cuFuncGetModule);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuFuncGetModule);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3080, __pyx_L1974_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3080, __pyx_L1974_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuFuncGetModule = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3078
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFuncGetModule
 *             __cuFuncGetModule = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncGetModule')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1979_try_end;
            __pyx_L1974_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3081
 *             global __cuFuncGetModule
 *             __cuFuncGetModule = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncGetModule')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1975_exception_handled;
            }
            __pyx_L1975_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1979_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3083
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLaunchCooperativeKernelMultiDevice
 *             __cuLaunchCooperativeKernelMultiDevice = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchCooperativeKernelMultiDevice')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3085
 *         try:
 *             global __cuLaunchCooperativeKernelMultiDevice
 *             __cuLaunchCooperativeKernelMultiDevice = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchCooperativeKernelMultiDevice')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3085, __pyx_L1980_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3085, __pyx_L1980_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuLaunchCooperativeKernelMultiDe};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3085, __pyx_L1980_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuLaunchCooperativeKernelMultiDe};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3085, __pyx_L1980_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3085, __pyx_L1980_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuLaunchCooperativeKernelMultiDe);
                __Pyx_GIVEREF(__pyx_n_u_cuLaunchCooperativeKernelMultiDe);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuLaunchCooperativeKernelMultiDe);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3085, __pyx_L1980_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3085, __pyx_L1980_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchCooperativeKernelMultiDevice = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3083
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLaunchCooperativeKernelMultiDevice
 *             __cuLaunchCooperativeKernelMultiDevice = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchCooperativeKernelMultiDevice')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1985_try_end;
            __pyx_L1980_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3086
 *             global __cuLaunchCooperativeKernelMultiDevice
 *             __cuLaunchCooperativeKernelMultiDevice = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchCooperativeKernelMultiDevice')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1981_exception_handled;
            }
            __pyx_L1981_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1985_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3088
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFuncSetBlockShape
 *             __cuFuncSetBlockShape = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetBlockShape')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3090
 *         try:
 *             global __cuFuncSetBlockShape
 *             __cuFuncSetBlockShape = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetBlockShape')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3090, __pyx_L1986_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3090, __pyx_L1986_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuFuncSetBlockShape};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3090, __pyx_L1986_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuFuncSetBlockShape};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3090, __pyx_L1986_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3090, __pyx_L1986_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuFuncSetBlockShape);
                __Pyx_GIVEREF(__pyx_n_u_cuFuncSetBlockShape);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuFuncSetBlockShape);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3090, __pyx_L1986_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3090, __pyx_L1986_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetBlockShape = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3088
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFuncSetBlockShape
 *             __cuFuncSetBlockShape = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetBlockShape')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L1991_try_end;
            __pyx_L1986_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3091
 *             global __cuFuncSetBlockShape
 *             __cuFuncSetBlockShape = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetBlockShape')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1987_exception_handled;
            }
            __pyx_L1987_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L1991_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3093
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFuncSetSharedSize
 *             __cuFuncSetSharedSize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetSharedSize')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3095
 *         try:
 *             global __cuFuncSetSharedSize
 *             __cuFuncSetSharedSize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetSharedSize')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3095, __pyx_L1992_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3095, __pyx_L1992_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuFuncSetSharedSize};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3095, __pyx_L1992_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuFuncSetSharedSize};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3095, __pyx_L1992_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3095, __pyx_L1992_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuFuncSetSharedSize);
                __Pyx_GIVEREF(__pyx_n_u_cuFuncSetSharedSize);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuFuncSetSharedSize);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3095, __pyx_L1992_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3095, __pyx_L1992_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetSharedSize = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3093
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFuncSetSharedSize
 *             __cuFuncSetSharedSize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetSharedSize')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L1997_try_end;
            __pyx_L1992_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3096
 *             global __cuFuncSetSharedSize
 *             __cuFuncSetSharedSize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetSharedSize')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1993_exception_handled;
            }
            __pyx_L1993_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L1997_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3098
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuParamSetSize
 *             __cuParamSetSize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSetSize')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3100
 *         try:
 *             global __cuParamSetSize
 *             __cuParamSetSize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSetSize')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3100, __pyx_L1998_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3100, __pyx_L1998_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuParamSetSize};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3100, __pyx_L1998_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuParamSetSize};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3100, __pyx_L1998_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3100, __pyx_L1998_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuParamSetSize);
                __Pyx_GIVEREF(__pyx_n_u_cuParamSetSize);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuParamSetSize);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3100, __pyx_L1998_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3100, __pyx_L1998_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuParamSetSize = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3098
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuParamSetSize
 *             __cuParamSetSize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSetSize')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2003_try_end;
            __pyx_L1998_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3101
 *             global __cuParamSetSize
 *             __cuParamSetSize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSetSize')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L1999_exception_handled;
            }
            __pyx_L1999_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2003_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3103
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuParamSeti
 *             __cuParamSeti = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSeti')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3105
 *         try:
 *             global __cuParamSeti
 *             __cuParamSeti = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSeti')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3105, __pyx_L2004_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3105, __pyx_L2004_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuParamSeti};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3105, __pyx_L2004_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuParamSeti};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3105, __pyx_L2004_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3105, __pyx_L2004_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuParamSeti);
                __Pyx_GIVEREF(__pyx_n_u_cuParamSeti);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuParamSeti);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3105, __pyx_L2004_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3105, __pyx_L2004_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuParamSeti = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3103
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuParamSeti
 *             __cuParamSeti = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSeti')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2009_try_end;
            __pyx_L2004_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3106
 *             global __cuParamSeti
 *             __cuParamSeti = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSeti')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2005_exception_handled;
            }
            __pyx_L2005_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2009_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3108
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuParamSetf
 *             __cuParamSetf = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSetf')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3110
 *         try:
 *             global __cuParamSetf
 *             __cuParamSetf = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSetf')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3110, __pyx_L2010_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3110, __pyx_L2010_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuParamSetf};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3110, __pyx_L2010_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuParamSetf};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3110, __pyx_L2010_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3110, __pyx_L2010_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuParamSetf);
                __Pyx_GIVEREF(__pyx_n_u_cuParamSetf);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuParamSetf);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3110, __pyx_L2010_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3110, __pyx_L2010_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuParamSetf = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3108
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuParamSetf
 *             __cuParamSetf = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSetf')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2015_try_end;
            __pyx_L2010_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3111
 *             global __cuParamSetf
 *             __cuParamSetf = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSetf')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2011_exception_handled;
            }
            __pyx_L2011_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2015_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3113
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuParamSetv
 *             __cuParamSetv = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSetv')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3115
 *         try:
 *             global __cuParamSetv
 *             __cuParamSetv = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSetv')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3115, __pyx_L2016_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3115, __pyx_L2016_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuParamSetv};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3115, __pyx_L2016_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuParamSetv};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3115, __pyx_L2016_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3115, __pyx_L2016_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuParamSetv);
                __Pyx_GIVEREF(__pyx_n_u_cuParamSetv);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuParamSetv);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3115, __pyx_L2016_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3115, __pyx_L2016_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuParamSetv = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3113
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuParamSetv
 *             __cuParamSetv = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSetv')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2021_try_end;
            __pyx_L2016_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3116
 *             global __cuParamSetv
 *             __cuParamSetv = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSetv')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2017_exception_handled;
            }
            __pyx_L2017_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2021_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3118
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLaunch
 *             __cuLaunch = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunch')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3120
 *         try:
 *             global __cuLaunch
 *             __cuLaunch = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunch')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3120, __pyx_L2022_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3120, __pyx_L2022_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuLaunch};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3120, __pyx_L2022_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuLaunch};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3120, __pyx_L2022_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3120, __pyx_L2022_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuLaunch);
                __Pyx_GIVEREF(__pyx_n_u_cuLaunch);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuLaunch);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3120, __pyx_L2022_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3120, __pyx_L2022_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuLaunch = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3118
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLaunch
 *             __cuLaunch = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunch')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2027_try_end;
            __pyx_L2022_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3121
 *             global __cuLaunch
 *             __cuLaunch = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunch')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2023_exception_handled;
            }
            __pyx_L2023_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2027_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3123
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLaunchGrid
 *             __cuLaunchGrid = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchGrid')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3125
 *         try:
 *             global __cuLaunchGrid
 *             __cuLaunchGrid = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchGrid')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3125, __pyx_L2028_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3125, __pyx_L2028_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuLaunchGrid};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3125, __pyx_L2028_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuLaunchGrid};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3125, __pyx_L2028_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3125, __pyx_L2028_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuLaunchGrid);
                __Pyx_GIVEREF(__pyx_n_u_cuLaunchGrid);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuLaunchGrid);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3125, __pyx_L2028_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3125, __pyx_L2028_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchGrid = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3123
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLaunchGrid
 *             __cuLaunchGrid = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchGrid')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2033_try_end;
            __pyx_L2028_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3126
 *             global __cuLaunchGrid
 *             __cuLaunchGrid = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchGrid')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2029_exception_handled;
            }
            __pyx_L2029_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2033_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3128
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLaunchGridAsync
 *             __cuLaunchGridAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchGridAsync')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3130
 *         try:
 *             global __cuLaunchGridAsync
 *             __cuLaunchGridAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchGridAsync')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3130, __pyx_L2034_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3130, __pyx_L2034_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuLaunchGridAsync};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3130, __pyx_L2034_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuLaunchGridAsync};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3130, __pyx_L2034_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3130, __pyx_L2034_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuLaunchGridAsync);
                __Pyx_GIVEREF(__pyx_n_u_cuLaunchGridAsync);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuLaunchGridAsync);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3130, __pyx_L2034_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3130, __pyx_L2034_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchGridAsync = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3128
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLaunchGridAsync
 *             __cuLaunchGridAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchGridAsync')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2039_try_end;
            __pyx_L2034_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3131
 *             global __cuLaunchGridAsync
 *             __cuLaunchGridAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchGridAsync')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2035_exception_handled;
            }
            __pyx_L2035_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2039_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3133
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuParamSetTexRef
 *             __cuParamSetTexRef = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSetTexRef')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3135
 *         try:
 *             global __cuParamSetTexRef
 *             __cuParamSetTexRef = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSetTexRef')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3135, __pyx_L2040_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3135, __pyx_L2040_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuParamSetTexRef};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3135, __pyx_L2040_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuParamSetTexRef};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3135, __pyx_L2040_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3135, __pyx_L2040_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuParamSetTexRef);
                __Pyx_GIVEREF(__pyx_n_u_cuParamSetTexRef);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuParamSetTexRef);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3135, __pyx_L2040_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3135, __pyx_L2040_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuParamSetTexRef = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3133
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuParamSetTexRef
 *             __cuParamSetTexRef = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSetTexRef')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2045_try_end;
            __pyx_L2040_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3136
 *             global __cuParamSetTexRef
 *             __cuParamSetTexRef = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSetTexRef')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2041_exception_handled;
            }
            __pyx_L2041_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2045_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3138
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphCreate
 *             __cuGraphCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphCreate')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3140
 *         try:
 *             global __cuGraphCreate
 *             __cuGraphCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphCreate')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3140, __pyx_L2046_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3140, __pyx_L2046_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphCreate};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3140, __pyx_L2046_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphCreate};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3140, __pyx_L2046_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3140, __pyx_L2046_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphCreate);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphCreate);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphCreate);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3140, __pyx_L2046_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3140, __pyx_L2046_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphCreate = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3138
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphCreate
 *             __cuGraphCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphCreate')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2051_try_end;
            __pyx_L2046_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3141
 *             global __cuGraphCreate
 *             __cuGraphCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphCreate')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2047_exception_handled;
            }
            __pyx_L2047_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2051_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3143
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddKernelNode_v2
 *             __cuGraphAddKernelNode_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddKernelNode_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3145
 *         try:
 *             global __cuGraphAddKernelNode_v2
 *             __cuGraphAddKernelNode_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddKernelNode_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3145, __pyx_L2052_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3145, __pyx_L2052_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphAddKernelNode_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3145, __pyx_L2052_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphAddKernelNode_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3145, __pyx_L2052_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3145, __pyx_L2052_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphAddKernelNode_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphAddKernelNode_v2);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphAddKernelNode_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3145, __pyx_L2052_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3145, __pyx_L2052_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddKernelNode_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3143
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddKernelNode_v2
 *             __cuGraphAddKernelNode_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddKernelNode_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2057_try_end;
            __pyx_L2052_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3146
 *             global __cuGraphAddKernelNode_v2
 *             __cuGraphAddKernelNode_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddKernelNode_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2053_exception_handled;
            }
            __pyx_L2053_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2057_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3148
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphKernelNodeGetParams_v2
 *             __cuGraphKernelNodeGetParams_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeGetParams_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3150
 *         try:
 *             global __cuGraphKernelNodeGetParams_v2
 *             __cuGraphKernelNodeGetParams_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeGetParams_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3150, __pyx_L2058_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3150, __pyx_L2058_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphKernelNodeGetParams_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3150, __pyx_L2058_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphKernelNodeGetParams_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3150, __pyx_L2058_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3150, __pyx_L2058_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphKernelNodeGetParams_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphKernelNodeGetParams_v2);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphKernelNodeGetParams_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3150, __pyx_L2058_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3150, __pyx_L2058_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeGetParams_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3148
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphKernelNodeGetParams_v2
 *             __cuGraphKernelNodeGetParams_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeGetParams_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2063_try_end;
            __pyx_L2058_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3151
 *             global __cuGraphKernelNodeGetParams_v2
 *             __cuGraphKernelNodeGetParams_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeGetParams_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2059_exception_handled;
            }
            __pyx_L2059_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2063_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3153
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphKernelNodeSetParams_v2
 *             __cuGraphKernelNodeSetParams_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeSetParams_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3155
 *         try:
 *             global __cuGraphKernelNodeSetParams_v2
 *             __cuGraphKernelNodeSetParams_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeSetParams_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3155, __pyx_L2064_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3155, __pyx_L2064_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphKernelNodeSetParams_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3155, __pyx_L2064_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphKernelNodeSetParams_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3155, __pyx_L2064_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3155, __pyx_L2064_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphKernelNodeSetParams_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphKernelNodeSetParams_v2);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphKernelNodeSetParams_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3155, __pyx_L2064_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3155, __pyx_L2064_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeSetParams_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3153
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphKernelNodeSetParams_v2
 *             __cuGraphKernelNodeSetParams_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeSetParams_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2069_try_end;
            __pyx_L2064_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3156
 *             global __cuGraphKernelNodeSetParams_v2
 *             __cuGraphKernelNodeSetParams_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeSetParams_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2065_exception_handled;
            }
            __pyx_L2065_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2069_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3158
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddMemcpyNode
 *             __cuGraphAddMemcpyNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddMemcpyNode')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3160
 *         try:
 *             global __cuGraphAddMemcpyNode
 *             __cuGraphAddMemcpyNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddMemcpyNode')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3160, __pyx_L2070_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3160, __pyx_L2070_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphAddMemcpyNode};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3160, __pyx_L2070_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphAddMemcpyNode};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3160, __pyx_L2070_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3160, __pyx_L2070_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphAddMemcpyNode);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphAddMemcpyNode);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphAddMemcpyNode);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3160, __pyx_L2070_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3160, __pyx_L2070_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemcpyNode = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3158
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddMemcpyNode
 *             __cuGraphAddMemcpyNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddMemcpyNode')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2075_try_end;
            __pyx_L2070_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3161
 *             global __cuGraphAddMemcpyNode
 *             __cuGraphAddMemcpyNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddMemcpyNode')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2071_exception_handled;
            }
            __pyx_L2071_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2075_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3163
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphMemcpyNodeGetParams
 *             __cuGraphMemcpyNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemcpyNodeGetParams')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3165
 *         try:
 *             global __cuGraphMemcpyNodeGetParams
 *             __cuGraphMemcpyNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemcpyNodeGetParams')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3165, __pyx_L2076_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3165, __pyx_L2076_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphMemcpyNodeGetParams};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3165, __pyx_L2076_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphMemcpyNodeGetParams};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3165, __pyx_L2076_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3165, __pyx_L2076_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphMemcpyNodeGetParams);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphMemcpyNodeGetParams);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphMemcpyNodeGetParams);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3165, __pyx_L2076_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3165, __pyx_L2076_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemcpyNodeGetParams = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3163
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphMemcpyNodeGetParams
 *             __cuGraphMemcpyNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemcpyNodeGetParams')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2081_try_end;
            __pyx_L2076_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3166
 *             global __cuGraphMemcpyNodeGetParams
 *             __cuGraphMemcpyNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemcpyNodeGetParams')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2077_exception_handled;
            }
            __pyx_L2077_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2081_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3168
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphMemcpyNodeSetParams
 *             __cuGraphMemcpyNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemcpyNodeSetParams')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3170
 *         try:
 *             global __cuGraphMemcpyNodeSetParams
 *             __cuGraphMemcpyNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemcpyNodeSetParams')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3170, __pyx_L2082_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3170, __pyx_L2082_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphMemcpyNodeSetParams};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3170, __pyx_L2082_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphMemcpyNodeSetParams};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3170, __pyx_L2082_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3170, __pyx_L2082_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphMemcpyNodeSetParams);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphMemcpyNodeSetParams);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphMemcpyNodeSetParams);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3170, __pyx_L2082_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3170, __pyx_L2082_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemcpyNodeSetParams = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3168
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphMemcpyNodeSetParams
 *             __cuGraphMemcpyNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemcpyNodeSetParams')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2087_try_end;
            __pyx_L2082_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3171
 *             global __cuGraphMemcpyNodeSetParams
 *             __cuGraphMemcpyNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemcpyNodeSetParams')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2083_exception_handled;
            }
            __pyx_L2083_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2087_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3173
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddMemsetNode
 *             __cuGraphAddMemsetNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddMemsetNode')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3175
 *         try:
 *             global __cuGraphAddMemsetNode
 *             __cuGraphAddMemsetNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddMemsetNode')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3175, __pyx_L2088_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3175, __pyx_L2088_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphAddMemsetNode};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3175, __pyx_L2088_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphAddMemsetNode};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3175, __pyx_L2088_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3175, __pyx_L2088_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphAddMemsetNode);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphAddMemsetNode);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphAddMemsetNode);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3175, __pyx_L2088_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3175, __pyx_L2088_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemsetNode = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3173
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddMemsetNode
 *             __cuGraphAddMemsetNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddMemsetNode')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2093_try_end;
            __pyx_L2088_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3176
 *             global __cuGraphAddMemsetNode
 *             __cuGraphAddMemsetNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddMemsetNode')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2089_exception_handled;
            }
            __pyx_L2089_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2093_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3178
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphMemsetNodeGetParams
 *             __cuGraphMemsetNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemsetNodeGetParams')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3180
 *         try:
 *             global __cuGraphMemsetNodeGetParams
 *             __cuGraphMemsetNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemsetNodeGetParams')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3180, __pyx_L2094_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3180, __pyx_L2094_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphMemsetNodeGetParams};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3180, __pyx_L2094_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphMemsetNodeGetParams};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3180, __pyx_L2094_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3180, __pyx_L2094_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphMemsetNodeGetParams);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphMemsetNodeGetParams);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphMemsetNodeGetParams);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3180, __pyx_L2094_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3180, __pyx_L2094_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemsetNodeGetParams = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3178
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphMemsetNodeGetParams
 *             __cuGraphMemsetNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemsetNodeGetParams')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2099_try_end;
            __pyx_L2094_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3181
 *             global __cuGraphMemsetNodeGetParams
 *             __cuGraphMemsetNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemsetNodeGetParams')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2095_exception_handled;
            }
            __pyx_L2095_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2099_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3183
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphMemsetNodeSetParams
 *             __cuGraphMemsetNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemsetNodeSetParams')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3185
 *         try:
 *             global __cuGraphMemsetNodeSetParams
 *             __cuGraphMemsetNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemsetNodeSetParams')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3185, __pyx_L2100_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3185, __pyx_L2100_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphMemsetNodeSetParams};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3185, __pyx_L2100_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphMemsetNodeSetParams};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3185, __pyx_L2100_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3185, __pyx_L2100_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphMemsetNodeSetParams);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphMemsetNodeSetParams);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphMemsetNodeSetParams);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3185, __pyx_L2100_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3185, __pyx_L2100_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemsetNodeSetParams = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3183
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphMemsetNodeSetParams
 *             __cuGraphMemsetNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemsetNodeSetParams')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2105_try_end;
            __pyx_L2100_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3186
 *             global __cuGraphMemsetNodeSetParams
 *             __cuGraphMemsetNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemsetNodeSetParams')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2101_exception_handled;
            }
            __pyx_L2101_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2105_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3188
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddHostNode
 *             __cuGraphAddHostNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddHostNode')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3190
 *         try:
 *             global __cuGraphAddHostNode
 *             __cuGraphAddHostNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddHostNode')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3190, __pyx_L2106_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3190, __pyx_L2106_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphAddHostNode};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3190, __pyx_L2106_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphAddHostNode};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3190, __pyx_L2106_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3190, __pyx_L2106_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphAddHostNode);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphAddHostNode);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphAddHostNode);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3190, __pyx_L2106_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3190, __pyx_L2106_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddHostNode = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3188
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddHostNode
 *             __cuGraphAddHostNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddHostNode')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2111_try_end;
            __pyx_L2106_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3191
 *             global __cuGraphAddHostNode
 *             __cuGraphAddHostNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddHostNode')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2107_exception_handled;
            }
            __pyx_L2107_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2111_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3193
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphHostNodeGetParams
 *             __cuGraphHostNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphHostNodeGetParams')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3195
 *         try:
 *             global __cuGraphHostNodeGetParams
 *             __cuGraphHostNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphHostNodeGetParams')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3195, __pyx_L2112_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3195, __pyx_L2112_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphHostNodeGetParams};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3195, __pyx_L2112_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphHostNodeGetParams};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3195, __pyx_L2112_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3195, __pyx_L2112_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphHostNodeGetParams);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphHostNodeGetParams);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphHostNodeGetParams);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3195, __pyx_L2112_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3195, __pyx_L2112_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphHostNodeGetParams = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3193
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphHostNodeGetParams
 *             __cuGraphHostNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphHostNodeGetParams')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2117_try_end;
            __pyx_L2112_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3196
 *             global __cuGraphHostNodeGetParams
 *             __cuGraphHostNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphHostNodeGetParams')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2113_exception_handled;
            }
            __pyx_L2113_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2117_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3198
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphHostNodeSetParams
 *             __cuGraphHostNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphHostNodeSetParams')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3200
 *         try:
 *             global __cuGraphHostNodeSetParams
 *             __cuGraphHostNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphHostNodeSetParams')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3200, __pyx_L2118_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3200, __pyx_L2118_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphHostNodeSetParams};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3200, __pyx_L2118_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphHostNodeSetParams};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3200, __pyx_L2118_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3200, __pyx_L2118_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphHostNodeSetParams);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphHostNodeSetParams);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphHostNodeSetParams);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3200, __pyx_L2118_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3200, __pyx_L2118_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphHostNodeSetParams = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3198
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphHostNodeSetParams
 *             __cuGraphHostNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphHostNodeSetParams')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2123_try_end;
            __pyx_L2118_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3201
 *             global __cuGraphHostNodeSetParams
 *             __cuGraphHostNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphHostNodeSetParams')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2119_exception_handled;
            }
            __pyx_L2119_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2123_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3203
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddChildGraphNode
 *             __cuGraphAddChildGraphNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddChildGraphNode')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3205
 *         try:
 *             global __cuGraphAddChildGraphNode
 *             __cuGraphAddChildGraphNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddChildGraphNode')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3205, __pyx_L2124_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3205, __pyx_L2124_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphAddChildGraphNode};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3205, __pyx_L2124_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphAddChildGraphNode};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3205, __pyx_L2124_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3205, __pyx_L2124_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphAddChildGraphNode);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphAddChildGraphNode);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphAddChildGraphNode);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3205, __pyx_L2124_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3205, __pyx_L2124_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddChildGraphNode = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3203
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddChildGraphNode
 *             __cuGraphAddChildGraphNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddChildGraphNode')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2129_try_end;
            __pyx_L2124_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3206
 *             global __cuGraphAddChildGraphNode
 *             __cuGraphAddChildGraphNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddChildGraphNode')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2125_exception_handled;
            }
            __pyx_L2125_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2129_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3208
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphChildGraphNodeGetGraph
 *             __cuGraphChildGraphNodeGetGraph = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphChildGraphNodeGetGraph')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3210
 *         try:
 *             global __cuGraphChildGraphNodeGetGraph
 *             __cuGraphChildGraphNodeGetGraph = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphChildGraphNodeGetGraph')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3210, __pyx_L2130_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3210, __pyx_L2130_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphChildGraphNodeGetGraph};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3210, __pyx_L2130_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphChildGraphNodeGetGraph};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3210, __pyx_L2130_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3210, __pyx_L2130_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphChildGraphNodeGetGraph);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphChildGraphNodeGetGraph);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphChildGraphNodeGetGraph);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3210, __pyx_L2130_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3210, __pyx_L2130_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphChildGraphNodeGetGraph = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3208
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphChildGraphNodeGetGraph
 *             __cuGraphChildGraphNodeGetGraph = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphChildGraphNodeGetGraph')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2135_try_end;
            __pyx_L2130_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3211
 *             global __cuGraphChildGraphNodeGetGraph
 *             __cuGraphChildGraphNodeGetGraph = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphChildGraphNodeGetGraph')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2131_exception_handled;
            }
            __pyx_L2131_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2135_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3213
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddEmptyNode
 *             __cuGraphAddEmptyNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddEmptyNode')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3215
 *         try:
 *             global __cuGraphAddEmptyNode
 *             __cuGraphAddEmptyNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddEmptyNode')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3215, __pyx_L2136_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3215, __pyx_L2136_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphAddEmptyNode};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3215, __pyx_L2136_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphAddEmptyNode};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3215, __pyx_L2136_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3215, __pyx_L2136_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphAddEmptyNode);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphAddEmptyNode);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphAddEmptyNode);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3215, __pyx_L2136_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3215, __pyx_L2136_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddEmptyNode = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3213
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddEmptyNode
 *             __cuGraphAddEmptyNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddEmptyNode')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2141_try_end;
            __pyx_L2136_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3216
 *             global __cuGraphAddEmptyNode
 *             __cuGraphAddEmptyNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddEmptyNode')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2137_exception_handled;
            }
            __pyx_L2137_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2141_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3218
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddEventRecordNode
 *             __cuGraphAddEventRecordNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddEventRecordNode')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3220
 *         try:
 *             global __cuGraphAddEventRecordNode
 *             __cuGraphAddEventRecordNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddEventRecordNode')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3220, __pyx_L2142_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3220, __pyx_L2142_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphAddEventRecordNode};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3220, __pyx_L2142_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphAddEventRecordNode};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3220, __pyx_L2142_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3220, __pyx_L2142_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphAddEventRecordNode);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphAddEventRecordNode);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphAddEventRecordNode);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3220, __pyx_L2142_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3220, __pyx_L2142_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddEventRecordNode = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3218
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddEventRecordNode
 *             __cuGraphAddEventRecordNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddEventRecordNode')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2147_try_end;
            __pyx_L2142_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3221
 *             global __cuGraphAddEventRecordNode
 *             __cuGraphAddEventRecordNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddEventRecordNode')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2143_exception_handled;
            }
            __pyx_L2143_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2147_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3223
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphEventRecordNodeGetEvent
 *             __cuGraphEventRecordNodeGetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphEventRecordNodeGetEvent')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3225
 *         try:
 *             global __cuGraphEventRecordNodeGetEvent
 *             __cuGraphEventRecordNodeGetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphEventRecordNodeGetEvent')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3225, __pyx_L2148_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3225, __pyx_L2148_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphEventRecordNodeGetEvent};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3225, __pyx_L2148_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphEventRecordNodeGetEvent};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3225, __pyx_L2148_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3225, __pyx_L2148_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphEventRecordNodeGetEvent);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphEventRecordNodeGetEvent);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphEventRecordNodeGetEvent);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3225, __pyx_L2148_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3225, __pyx_L2148_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventRecordNodeGetEvent = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3223
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphEventRecordNodeGetEvent
 *             __cuGraphEventRecordNodeGetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphEventRecordNodeGetEvent')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2153_try_end;
            __pyx_L2148_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3226
 *             global __cuGraphEventRecordNodeGetEvent
 *             __cuGraphEventRecordNodeGetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphEventRecordNodeGetEvent')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2149_exception_handled;
            }
            __pyx_L2149_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2153_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3228
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphEventRecordNodeSetEvent
 *             __cuGraphEventRecordNodeSetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphEventRecordNodeSetEvent')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3230
 *         try:
 *             global __cuGraphEventRecordNodeSetEvent
 *             __cuGraphEventRecordNodeSetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphEventRecordNodeSetEvent')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3230, __pyx_L2154_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3230, __pyx_L2154_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphEventRecordNodeSetEvent};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3230, __pyx_L2154_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphEventRecordNodeSetEvent};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3230, __pyx_L2154_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3230, __pyx_L2154_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphEventRecordNodeSetEvent);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphEventRecordNodeSetEvent);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphEventRecordNodeSetEvent);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3230, __pyx_L2154_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3230, __pyx_L2154_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventRecordNodeSetEvent = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3228
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphEventRecordNodeSetEvent
 *             __cuGraphEventRecordNodeSetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphEventRecordNodeSetEvent')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2159_try_end;
            __pyx_L2154_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3231
 *             global __cuGraphEventRecordNodeSetEvent
 *             __cuGraphEventRecordNodeSetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphEventRecordNodeSetEvent')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2155_exception_handled;
            }
            __pyx_L2155_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2159_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3233
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddEventWaitNode
 *             __cuGraphAddEventWaitNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddEventWaitNode')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3235
 *         try:
 *             global __cuGraphAddEventWaitNode
 *             __cuGraphAddEventWaitNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddEventWaitNode')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3235, __pyx_L2160_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3235, __pyx_L2160_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphAddEventWaitNode};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3235, __pyx_L2160_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphAddEventWaitNode};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3235, __pyx_L2160_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3235, __pyx_L2160_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphAddEventWaitNode);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphAddEventWaitNode);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphAddEventWaitNode);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3235, __pyx_L2160_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3235, __pyx_L2160_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddEventWaitNode = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3233
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddEventWaitNode
 *             __cuGraphAddEventWaitNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddEventWaitNode')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2165_try_end;
            __pyx_L2160_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3236
 *             global __cuGraphAddEventWaitNode
 *             __cuGraphAddEventWaitNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddEventWaitNode')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2161_exception_handled;
            }
            __pyx_L2161_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2165_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3238
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphEventWaitNodeGetEvent
 *             __cuGraphEventWaitNodeGetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphEventWaitNodeGetEvent')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3240
 *         try:
 *             global __cuGraphEventWaitNodeGetEvent
 *             __cuGraphEventWaitNodeGetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphEventWaitNodeGetEvent')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3240, __pyx_L2166_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3240, __pyx_L2166_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphEventWaitNodeGetEvent};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3240, __pyx_L2166_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphEventWaitNodeGetEvent};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3240, __pyx_L2166_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3240, __pyx_L2166_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphEventWaitNodeGetEvent);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphEventWaitNodeGetEvent);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphEventWaitNodeGetEvent);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3240, __pyx_L2166_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3240, __pyx_L2166_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventWaitNodeGetEvent = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3238
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphEventWaitNodeGetEvent
 *             __cuGraphEventWaitNodeGetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphEventWaitNodeGetEvent')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2171_try_end;
            __pyx_L2166_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3241
 *             global __cuGraphEventWaitNodeGetEvent
 *             __cuGraphEventWaitNodeGetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphEventWaitNodeGetEvent')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2167_exception_handled;
            }
            __pyx_L2167_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2171_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3243
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphEventWaitNodeSetEvent
 *             __cuGraphEventWaitNodeSetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphEventWaitNodeSetEvent')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3245
 *         try:
 *             global __cuGraphEventWaitNodeSetEvent
 *             __cuGraphEventWaitNodeSetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphEventWaitNodeSetEvent')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3245, __pyx_L2172_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3245, __pyx_L2172_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphEventWaitNodeSetEvent};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3245, __pyx_L2172_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphEventWaitNodeSetEvent};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3245, __pyx_L2172_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3245, __pyx_L2172_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphEventWaitNodeSetEvent);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphEventWaitNodeSetEvent);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphEventWaitNodeSetEvent);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3245, __pyx_L2172_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3245, __pyx_L2172_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventWaitNodeSetEvent = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3243
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphEventWaitNodeSetEvent
 *             __cuGraphEventWaitNodeSetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphEventWaitNodeSetEvent')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2177_try_end;
            __pyx_L2172_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3246
 *             global __cuGraphEventWaitNodeSetEvent
 *             __cuGraphEventWaitNodeSetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphEventWaitNodeSetEvent')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2173_exception_handled;
            }
            __pyx_L2173_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2177_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3248
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddExternalSemaphoresSignalNode
 *             __cuGraphAddExternalSemaphoresSignalNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddExternalSemaphoresSignalNode')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3250
 *         try:
 *             global __cuGraphAddExternalSemaphoresSignalNode
 *             __cuGraphAddExternalSemaphoresSignalNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddExternalSemaphoresSignalNode')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3250, __pyx_L2178_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3250, __pyx_L2178_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphAddExternalSemaphoresSign};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3250, __pyx_L2178_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphAddExternalSemaphoresSign};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3250, __pyx_L2178_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3250, __pyx_L2178_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphAddExternalSemaphoresSign);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphAddExternalSemaphoresSign);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphAddExternalSemaphoresSign);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3250, __pyx_L2178_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3250, __pyx_L2178_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddExternalSemaphoresSignalNode = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3248
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddExternalSemaphoresSignalNode
 *             __cuGraphAddExternalSemaphoresSignalNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddExternalSemaphoresSignalNode')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2183_try_end;
            __pyx_L2178_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3251
 *             global __cuGraphAddExternalSemaphoresSignalNode
 *             __cuGraphAddExternalSemaphoresSignalNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddExternalSemaphoresSignalNode')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2179_exception_handled;
            }
            __pyx_L2179_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2183_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3253
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExternalSemaphoresSignalNodeGetParams
 *             __cuGraphExternalSemaphoresSignalNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresSignalNodeGetParams')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3255
 *         try:
 *             global __cuGraphExternalSemaphoresSignalNodeGetParams
 *             __cuGraphExternalSemaphoresSignalNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresSignalNodeGetParams')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3255, __pyx_L2184_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3255, __pyx_L2184_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphExternalSemaphoresSignalN};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3255, __pyx_L2184_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphExternalSemaphoresSignalN};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3255, __pyx_L2184_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3255, __pyx_L2184_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphExternalSemaphoresSignalN);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphExternalSemaphoresSignalN);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphExternalSemaphoresSignalN);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3255, __pyx_L2184_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3255, __pyx_L2184_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresSignalNodeGetParams = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3253
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExternalSemaphoresSignalNodeGetParams
 *             __cuGraphExternalSemaphoresSignalNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresSignalNodeGetParams')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2189_try_end;
            __pyx_L2184_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3256
 *             global __cuGraphExternalSemaphoresSignalNodeGetParams
 *             __cuGraphExternalSemaphoresSignalNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresSignalNodeGetParams')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2185_exception_handled;
            }
            __pyx_L2185_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2189_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3258
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExternalSemaphoresSignalNodeSetParams
 *             __cuGraphExternalSemaphoresSignalNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresSignalNodeSetParams')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3260
 *         try:
 *             global __cuGraphExternalSemaphoresSignalNodeSetParams
 *             __cuGraphExternalSemaphoresSignalNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresSignalNodeSetParams')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3260, __pyx_L2190_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3260, __pyx_L2190_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphExternalSemaphoresSignalN_2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3260, __pyx_L2190_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphExternalSemaphoresSignalN_2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3260, __pyx_L2190_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3260, __pyx_L2190_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphExternalSemaphoresSignalN_2);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphExternalSemaphoresSignalN_2);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphExternalSemaphoresSignalN_2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3260, __pyx_L2190_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3260, __pyx_L2190_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresSignalNodeSetParams = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3258
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExternalSemaphoresSignalNodeSetParams
 *             __cuGraphExternalSemaphoresSignalNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresSignalNodeSetParams')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2195_try_end;
            __pyx_L2190_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3261
 *             global __cuGraphExternalSemaphoresSignalNodeSetParams
 *             __cuGraphExternalSemaphoresSignalNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresSignalNodeSetParams')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2191_exception_handled;
            }
            __pyx_L2191_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2195_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3263
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddExternalSemaphoresWaitNode
 *             __cuGraphAddExternalSemaphoresWaitNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddExternalSemaphoresWaitNode')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3265
 *         try:
 *             global __cuGraphAddExternalSemaphoresWaitNode
 *             __cuGraphAddExternalSemaphoresWaitNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddExternalSemaphoresWaitNode')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3265, __pyx_L2196_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3265, __pyx_L2196_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphAddExternalSemaphoresWait};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3265, __pyx_L2196_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphAddExternalSemaphoresWait};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3265, __pyx_L2196_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3265, __pyx_L2196_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphAddExternalSemaphoresWait);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphAddExternalSemaphoresWait);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphAddExternalSemaphoresWait);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3265, __pyx_L2196_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3265, __pyx_L2196_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddExternalSemaphoresWaitNode = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3263
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddExternalSemaphoresWaitNode
 *             __cuGraphAddExternalSemaphoresWaitNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddExternalSemaphoresWaitNode')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2201_try_end;
            __pyx_L2196_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3266
 *             global __cuGraphAddExternalSemaphoresWaitNode
 *             __cuGraphAddExternalSemaphoresWaitNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddExternalSemaphoresWaitNode')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2197_exception_handled;
            }
            __pyx_L2197_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2201_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3268
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExternalSemaphoresWaitNodeGetParams
 *             __cuGraphExternalSemaphoresWaitNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresWaitNodeGetParams')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3270
 *         try:
 *             global __cuGraphExternalSemaphoresWaitNodeGetParams
 *             __cuGraphExternalSemaphoresWaitNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresWaitNodeGetParams')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3270, __pyx_L2202_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3270, __pyx_L2202_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphExternalSemaphoresWaitNod};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3270, __pyx_L2202_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphExternalSemaphoresWaitNod};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3270, __pyx_L2202_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3270, __pyx_L2202_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphExternalSemaphoresWaitNod);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphExternalSemaphoresWaitNod);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphExternalSemaphoresWaitNod);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3270, __pyx_L2202_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3270, __pyx_L2202_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresWaitNodeGetParams = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3268
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExternalSemaphoresWaitNodeGetParams
 *             __cuGraphExternalSemaphoresWaitNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresWaitNodeGetParams')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2207_try_end;
            __pyx_L2202_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3271
 *             global __cuGraphExternalSemaphoresWaitNodeGetParams
 *             __cuGraphExternalSemaphoresWaitNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresWaitNodeGetParams')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2203_exception_handled;
            }
            __pyx_L2203_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2207_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3273
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExternalSemaphoresWaitNodeSetParams
 *             __cuGraphExternalSemaphoresWaitNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresWaitNodeSetParams')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3275
 *         try:
 *             global __cuGraphExternalSemaphoresWaitNodeSetParams
 *             __cuGraphExternalSemaphoresWaitNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresWaitNodeSetParams')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3275, __pyx_L2208_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3275, __pyx_L2208_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphExternalSemaphoresWaitNod_2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3275, __pyx_L2208_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphExternalSemaphoresWaitNod_2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3275, __pyx_L2208_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3275, __pyx_L2208_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphExternalSemaphoresWaitNod_2);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphExternalSemaphoresWaitNod_2);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphExternalSemaphoresWaitNod_2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3275, __pyx_L2208_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3275, __pyx_L2208_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresWaitNodeSetParams = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3273
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExternalSemaphoresWaitNodeSetParams
 *             __cuGraphExternalSemaphoresWaitNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresWaitNodeSetParams')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2213_try_end;
            __pyx_L2208_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3276
 *             global __cuGraphExternalSemaphoresWaitNodeSetParams
 *             __cuGraphExternalSemaphoresWaitNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresWaitNodeSetParams')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2209_exception_handled;
            }
            __pyx_L2209_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2213_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3278
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddBatchMemOpNode
 *             __cuGraphAddBatchMemOpNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddBatchMemOpNode')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3280
 *         try:
 *             global __cuGraphAddBatchMemOpNode
 *             __cuGraphAddBatchMemOpNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddBatchMemOpNode')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3280, __pyx_L2214_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3280, __pyx_L2214_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphAddBatchMemOpNode};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3280, __pyx_L2214_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphAddBatchMemOpNode};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3280, __pyx_L2214_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3280, __pyx_L2214_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphAddBatchMemOpNode);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphAddBatchMemOpNode);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphAddBatchMemOpNode);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3280, __pyx_L2214_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3280, __pyx_L2214_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddBatchMemOpNode = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3278
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddBatchMemOpNode
 *             __cuGraphAddBatchMemOpNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddBatchMemOpNode')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2219_try_end;
            __pyx_L2214_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3281
 *             global __cuGraphAddBatchMemOpNode
 *             __cuGraphAddBatchMemOpNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddBatchMemOpNode')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2215_exception_handled;
            }
            __pyx_L2215_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2219_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3283
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphBatchMemOpNodeGetParams
 *             __cuGraphBatchMemOpNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphBatchMemOpNodeGetParams')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3285
 *         try:
 *             global __cuGraphBatchMemOpNodeGetParams
 *             __cuGraphBatchMemOpNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphBatchMemOpNodeGetParams')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3285, __pyx_L2220_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3285, __pyx_L2220_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphBatchMemOpNodeGetParams};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3285, __pyx_L2220_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphBatchMemOpNodeGetParams};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3285, __pyx_L2220_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3285, __pyx_L2220_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphBatchMemOpNodeGetParams);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphBatchMemOpNodeGetParams);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphBatchMemOpNodeGetParams);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3285, __pyx_L2220_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3285, __pyx_L2220_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphBatchMemOpNodeGetParams = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3283
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphBatchMemOpNodeGetParams
 *             __cuGraphBatchMemOpNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphBatchMemOpNodeGetParams')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2225_try_end;
            __pyx_L2220_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3286
 *             global __cuGraphBatchMemOpNodeGetParams
 *             __cuGraphBatchMemOpNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphBatchMemOpNodeGetParams')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2221_exception_handled;
            }
            __pyx_L2221_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2225_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3288
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphBatchMemOpNodeSetParams
 *             __cuGraphBatchMemOpNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphBatchMemOpNodeSetParams')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3290
 *         try:
 *             global __cuGraphBatchMemOpNodeSetParams
 *             __cuGraphBatchMemOpNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphBatchMemOpNodeSetParams')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3290, __pyx_L2226_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3290, __pyx_L2226_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphBatchMemOpNodeSetParams};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3290, __pyx_L2226_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphBatchMemOpNodeSetParams};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3290, __pyx_L2226_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3290, __pyx_L2226_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphBatchMemOpNodeSetParams);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphBatchMemOpNodeSetParams);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphBatchMemOpNodeSetParams);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3290, __pyx_L2226_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3290, __pyx_L2226_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphBatchMemOpNodeSetParams = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3288
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphBatchMemOpNodeSetParams
 *             __cuGraphBatchMemOpNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphBatchMemOpNodeSetParams')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2231_try_end;
            __pyx_L2226_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3291
 *             global __cuGraphBatchMemOpNodeSetParams
 *             __cuGraphBatchMemOpNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphBatchMemOpNodeSetParams')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2227_exception_handled;
            }
            __pyx_L2227_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2231_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3293
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecBatchMemOpNodeSetParams
 *             __cuGraphExecBatchMemOpNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecBatchMemOpNodeSetParams')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3295
 *         try:
 *             global __cuGraphExecBatchMemOpNodeSetParams
 *             __cuGraphExecBatchMemOpNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecBatchMemOpNodeSetParams')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3295, __pyx_L2232_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3295, __pyx_L2232_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphExecBatchMemOpNodeSetPara};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3295, __pyx_L2232_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphExecBatchMemOpNodeSetPara};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3295, __pyx_L2232_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3295, __pyx_L2232_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphExecBatchMemOpNodeSetPara);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphExecBatchMemOpNodeSetPara);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphExecBatchMemOpNodeSetPara);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3295, __pyx_L2232_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3295, __pyx_L2232_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecBatchMemOpNodeSetParams = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3293
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecBatchMemOpNodeSetParams
 *             __cuGraphExecBatchMemOpNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecBatchMemOpNodeSetParams')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2237_try_end;
            __pyx_L2232_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3296
 *             global __cuGraphExecBatchMemOpNodeSetParams
 *             __cuGraphExecBatchMemOpNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecBatchMemOpNodeSetParams')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2233_exception_handled;
            }
            __pyx_L2233_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2237_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3298
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddMemAllocNode
 *             __cuGraphAddMemAllocNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddMemAllocNode')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3300
 *         try:
 *             global __cuGraphAddMemAllocNode
 *             __cuGraphAddMemAllocNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddMemAllocNode')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3300, __pyx_L2238_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3300, __pyx_L2238_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphAddMemAllocNode};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3300, __pyx_L2238_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphAddMemAllocNode};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3300, __pyx_L2238_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3300, __pyx_L2238_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphAddMemAllocNode);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphAddMemAllocNode);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphAddMemAllocNode);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3300, __pyx_L2238_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3300, __pyx_L2238_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemAllocNode = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3298
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddMemAllocNode
 *             __cuGraphAddMemAllocNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddMemAllocNode')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2243_try_end;
            __pyx_L2238_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3301
 *             global __cuGraphAddMemAllocNode
 *             __cuGraphAddMemAllocNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddMemAllocNode')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2239_exception_handled;
            }
            __pyx_L2239_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2243_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3303
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphMemAllocNodeGetParams
 *             __cuGraphMemAllocNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemAllocNodeGetParams')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3305
 *         try:
 *             global __cuGraphMemAllocNodeGetParams
 *             __cuGraphMemAllocNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemAllocNodeGetParams')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3305, __pyx_L2244_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3305, __pyx_L2244_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphMemAllocNodeGetParams};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3305, __pyx_L2244_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphMemAllocNodeGetParams};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3305, __pyx_L2244_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3305, __pyx_L2244_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphMemAllocNodeGetParams);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphMemAllocNodeGetParams);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphMemAllocNodeGetParams);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3305, __pyx_L2244_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3305, __pyx_L2244_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemAllocNodeGetParams = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3303
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphMemAllocNodeGetParams
 *             __cuGraphMemAllocNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemAllocNodeGetParams')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2249_try_end;
            __pyx_L2244_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3306
 *             global __cuGraphMemAllocNodeGetParams
 *             __cuGraphMemAllocNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemAllocNodeGetParams')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2245_exception_handled;
            }
            __pyx_L2245_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2249_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3308
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddMemFreeNode
 *             __cuGraphAddMemFreeNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddMemFreeNode')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3310
 *         try:
 *             global __cuGraphAddMemFreeNode
 *             __cuGraphAddMemFreeNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddMemFreeNode')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3310, __pyx_L2250_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3310, __pyx_L2250_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphAddMemFreeNode};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3310, __pyx_L2250_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphAddMemFreeNode};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3310, __pyx_L2250_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3310, __pyx_L2250_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphAddMemFreeNode);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphAddMemFreeNode);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphAddMemFreeNode);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3310, __pyx_L2250_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3310, __pyx_L2250_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemFreeNode = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3308
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddMemFreeNode
 *             __cuGraphAddMemFreeNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddMemFreeNode')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2255_try_end;
            __pyx_L2250_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3311
 *             global __cuGraphAddMemFreeNode
 *             __cuGraphAddMemFreeNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddMemFreeNode')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2251_exception_handled;
            }
            __pyx_L2251_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2255_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3313
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphMemFreeNodeGetParams
 *             __cuGraphMemFreeNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemFreeNodeGetParams')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3315
 *         try:
 *             global __cuGraphMemFreeNodeGetParams
 *             __cuGraphMemFreeNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemFreeNodeGetParams')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3315, __pyx_L2256_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3315, __pyx_L2256_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphMemFreeNodeGetParams};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3315, __pyx_L2256_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphMemFreeNodeGetParams};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3315, __pyx_L2256_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3315, __pyx_L2256_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphMemFreeNodeGetParams);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphMemFreeNodeGetParams);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphMemFreeNodeGetParams);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3315, __pyx_L2256_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3315, __pyx_L2256_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemFreeNodeGetParams = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3313
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphMemFreeNodeGetParams
 *             __cuGraphMemFreeNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemFreeNodeGetParams')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2261_try_end;
            __pyx_L2256_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3316
 *             global __cuGraphMemFreeNodeGetParams
 *             __cuGraphMemFreeNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemFreeNodeGetParams')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2257_exception_handled;
            }
            __pyx_L2257_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2261_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3318
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGraphMemTrim
 *             __cuDeviceGraphMemTrim = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGraphMemTrim')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3320
 *         try:
 *             global __cuDeviceGraphMemTrim
 *             __cuDeviceGraphMemTrim = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGraphMemTrim')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3320, __pyx_L2262_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3320, __pyx_L2262_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuDeviceGraphMemTrim};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3320, __pyx_L2262_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuDeviceGraphMemTrim};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3320, __pyx_L2262_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3320, __pyx_L2262_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDeviceGraphMemTrim);
                __Pyx_GIVEREF(__pyx_n_u_cuDeviceGraphMemTrim);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuDeviceGraphMemTrim);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3320, __pyx_L2262_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3320, __pyx_L2262_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGraphMemTrim = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3318
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGraphMemTrim
 *             __cuDeviceGraphMemTrim = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGraphMemTrim')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2267_try_end;
            __pyx_L2262_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3321
 *             global __cuDeviceGraphMemTrim
 *             __cuDeviceGraphMemTrim = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGraphMemTrim')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2263_exception_handled;
            }
            __pyx_L2263_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2267_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3323
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetGraphMemAttribute
 *             __cuDeviceGetGraphMemAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetGraphMemAttribute')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3325
 *         try:
 *             global __cuDeviceGetGraphMemAttribute
 *             __cuDeviceGetGraphMemAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetGraphMemAttribute')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3325, __pyx_L2268_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3325, __pyx_L2268_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuDeviceGetGraphMemAttribute};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3325, __pyx_L2268_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuDeviceGetGraphMemAttribute};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3325, __pyx_L2268_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3325, __pyx_L2268_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDeviceGetGraphMemAttribute);
                __Pyx_GIVEREF(__pyx_n_u_cuDeviceGetGraphMemAttribute);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuDeviceGetGraphMemAttribute);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3325, __pyx_L2268_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3325, __pyx_L2268_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetGraphMemAttribute = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3323
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetGraphMemAttribute
 *             __cuDeviceGetGraphMemAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetGraphMemAttribute')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2273_try_end;
            __pyx_L2268_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3326
 *             global __cuDeviceGetGraphMemAttribute
 *             __cuDeviceGetGraphMemAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetGraphMemAttribute')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2269_exception_handled;
            }
            __pyx_L2269_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2273_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3328
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceSetGraphMemAttribute
 *             __cuDeviceSetGraphMemAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceSetGraphMemAttribute')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3330
 *         try:
 *             global __cuDeviceSetGraphMemAttribute
 *             __cuDeviceSetGraphMemAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceSetGraphMemAttribute')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3330, __pyx_L2274_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3330, __pyx_L2274_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuDeviceSetGraphMemAttribute};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3330, __pyx_L2274_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuDeviceSetGraphMemAttribute};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3330, __pyx_L2274_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3330, __pyx_L2274_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDeviceSetGraphMemAttribute);
                __Pyx_GIVEREF(__pyx_n_u_cuDeviceSetGraphMemAttribute);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuDeviceSetGraphMemAttribute);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3330, __pyx_L2274_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3330, __pyx_L2274_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceSetGraphMemAttribute = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3328
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceSetGraphMemAttribute
 *             __cuDeviceSetGraphMemAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceSetGraphMemAttribute')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2279_try_end;
            __pyx_L2274_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3331
 *             global __cuDeviceSetGraphMemAttribute
 *             __cuDeviceSetGraphMemAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceSetGraphMemAttribute')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2275_exception_handled;
            }
            __pyx_L2275_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2279_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3333
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphClone
 *             __cuGraphClone = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphClone')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3335
 *         try:
 *             global __cuGraphClone
 *             __cuGraphClone = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphClone')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3335, __pyx_L2280_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3335, __pyx_L2280_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphClone};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3335, __pyx_L2280_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphClone};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3335, __pyx_L2280_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3335, __pyx_L2280_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphClone);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphClone);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphClone);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3335, __pyx_L2280_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3335, __pyx_L2280_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphClone = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3333
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphClone
 *             __cuGraphClone = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphClone')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2285_try_end;
            __pyx_L2280_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3336
 *             global __cuGraphClone
 *             __cuGraphClone = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphClone')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2281_exception_handled;
            }
            __pyx_L2281_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2285_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3338
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphNodeFindInClone
 *             __cuGraphNodeFindInClone = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeFindInClone')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3340
 *         try:
 *             global __cuGraphNodeFindInClone
 *             __cuGraphNodeFindInClone = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeFindInClone')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3340, __pyx_L2286_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3340, __pyx_L2286_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphNodeFindInClone};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3340, __pyx_L2286_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphNodeFindInClone};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3340, __pyx_L2286_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3340, __pyx_L2286_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphNodeFindInClone);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphNodeFindInClone);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphNodeFindInClone);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3340, __pyx_L2286_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3340, __pyx_L2286_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeFindInClone = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3338
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphNodeFindInClone
 *             __cuGraphNodeFindInClone = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeFindInClone')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2291_try_end;
            __pyx_L2286_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3341
 *             global __cuGraphNodeFindInClone
 *             __cuGraphNodeFindInClone = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeFindInClone')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2287_exception_handled;
            }
            __pyx_L2287_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2291_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3343
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphNodeGetType
 *             __cuGraphNodeGetType = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeGetType')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3345
 *         try:
 *             global __cuGraphNodeGetType
 *             __cuGraphNodeGetType = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeGetType')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3345, __pyx_L2292_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3345, __pyx_L2292_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphNodeGetType};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3345, __pyx_L2292_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphNodeGetType};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3345, __pyx_L2292_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3345, __pyx_L2292_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphNodeGetType);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphNodeGetType);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphNodeGetType);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3345, __pyx_L2292_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3345, __pyx_L2292_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetType = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3343
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphNodeGetType
 *             __cuGraphNodeGetType = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeGetType')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2297_try_end;
            __pyx_L2292_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3346
 *             global __cuGraphNodeGetType
 *             __cuGraphNodeGetType = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeGetType')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2293_exception_handled;
            }
            __pyx_L2293_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2297_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3348
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphGetNodes
 *             __cuGraphGetNodes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphGetNodes')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3350
 *         try:
 *             global __cuGraphGetNodes
 *             __cuGraphGetNodes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphGetNodes')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3350, __pyx_L2298_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3350, __pyx_L2298_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphGetNodes};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3350, __pyx_L2298_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphGetNodes};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3350, __pyx_L2298_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3350, __pyx_L2298_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphGetNodes);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphGetNodes);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphGetNodes);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3350, __pyx_L2298_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3350, __pyx_L2298_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphGetNodes = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3348
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphGetNodes
 *             __cuGraphGetNodes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphGetNodes')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2303_try_end;
            __pyx_L2298_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3351
 *             global __cuGraphGetNodes
 *             __cuGraphGetNodes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphGetNodes')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2299_exception_handled;
            }
            __pyx_L2299_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2303_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3353
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphGetRootNodes
 *             __cuGraphGetRootNodes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphGetRootNodes')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3355
 *         try:
 *             global __cuGraphGetRootNodes
 *             __cuGraphGetRootNodes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphGetRootNodes')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3355, __pyx_L2304_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3355, __pyx_L2304_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphGetRootNodes};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3355, __pyx_L2304_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphGetRootNodes};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3355, __pyx_L2304_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3355, __pyx_L2304_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphGetRootNodes);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphGetRootNodes);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphGetRootNodes);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3355, __pyx_L2304_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3355, __pyx_L2304_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphGetRootNodes = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3353
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphGetRootNodes
 *             __cuGraphGetRootNodes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphGetRootNodes')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2309_try_end;
            __pyx_L2304_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3356
 *             global __cuGraphGetRootNodes
 *             __cuGraphGetRootNodes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphGetRootNodes')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2305_exception_handled;
            }
            __pyx_L2305_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2309_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3358
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphGetEdges
 *             __cuGraphGetEdges = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphGetEdges')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3360
 *         try:
 *             global __cuGraphGetEdges
 *             __cuGraphGetEdges = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphGetEdges')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3360, __pyx_L2310_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3360, __pyx_L2310_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphGetEdges};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3360, __pyx_L2310_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphGetEdges};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3360, __pyx_L2310_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3360, __pyx_L2310_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphGetEdges);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphGetEdges);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphGetEdges);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3360, __pyx_L2310_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3360, __pyx_L2310_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphGetEdges = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3358
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphGetEdges
 *             __cuGraphGetEdges = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphGetEdges')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2315_try_end;
            __pyx_L2310_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3361
 *             global __cuGraphGetEdges
 *             __cuGraphGetEdges = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphGetEdges')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2311_exception_handled;
            }
            __pyx_L2311_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2315_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3363
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphNodeGetDependencies
 *             __cuGraphNodeGetDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeGetDependencies')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3365
 *         try:
 *             global __cuGraphNodeGetDependencies
 *             __cuGraphNodeGetDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeGetDependencies')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3365, __pyx_L2316_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3365, __pyx_L2316_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphNodeGetDependencies};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3365, __pyx_L2316_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphNodeGetDependencies};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3365, __pyx_L2316_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3365, __pyx_L2316_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphNodeGetDependencies);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphNodeGetDependencies);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphNodeGetDependencies);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3365, __pyx_L2316_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3365, __pyx_L2316_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetDependencies = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3363
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphNodeGetDependencies
 *             __cuGraphNodeGetDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeGetDependencies')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2321_try_end;
            __pyx_L2316_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3366
 *             global __cuGraphNodeGetDependencies
 *             __cuGraphNodeGetDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeGetDependencies')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2317_exception_handled;
            }
            __pyx_L2317_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2321_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3368
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphNodeGetDependentNodes
 *             __cuGraphNodeGetDependentNodes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeGetDependentNodes')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3370
 *         try:
 *             global __cuGraphNodeGetDependentNodes
 *             __cuGraphNodeGetDependentNodes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeGetDependentNodes')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3370, __pyx_L2322_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3370, __pyx_L2322_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphNodeGetDependentNodes};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3370, __pyx_L2322_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphNodeGetDependentNodes};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3370, __pyx_L2322_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3370, __pyx_L2322_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphNodeGetDependentNodes);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphNodeGetDependentNodes);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphNodeGetDependentNodes);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3370, __pyx_L2322_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3370, __pyx_L2322_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetDependentNodes = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3368
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphNodeGetDependentNodes
 *             __cuGraphNodeGetDependentNodes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeGetDependentNodes')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2327_try_end;
            __pyx_L2322_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3371
 *             global __cuGraphNodeGetDependentNodes
 *             __cuGraphNodeGetDependentNodes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeGetDependentNodes')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2323_exception_handled;
            }
            __pyx_L2323_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2327_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3373
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddDependencies
 *             __cuGraphAddDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddDependencies')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3375
 *         try:
 *             global __cuGraphAddDependencies
 *             __cuGraphAddDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddDependencies')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3375, __pyx_L2328_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3375, __pyx_L2328_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphAddDependencies};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3375, __pyx_L2328_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphAddDependencies};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3375, __pyx_L2328_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3375, __pyx_L2328_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphAddDependencies);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphAddDependencies);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphAddDependencies);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3375, __pyx_L2328_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3375, __pyx_L2328_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddDependencies = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3373
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddDependencies
 *             __cuGraphAddDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddDependencies')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2333_try_end;
            __pyx_L2328_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3376
 *             global __cuGraphAddDependencies
 *             __cuGraphAddDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddDependencies')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2329_exception_handled;
            }
            __pyx_L2329_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2333_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3378
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphRemoveDependencies
 *             __cuGraphRemoveDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphRemoveDependencies')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3380
 *         try:
 *             global __cuGraphRemoveDependencies
 *             __cuGraphRemoveDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphRemoveDependencies')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3380, __pyx_L2334_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3380, __pyx_L2334_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphRemoveDependencies};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3380, __pyx_L2334_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphRemoveDependencies};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3380, __pyx_L2334_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3380, __pyx_L2334_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphRemoveDependencies);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphRemoveDependencies);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphRemoveDependencies);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3380, __pyx_L2334_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3380, __pyx_L2334_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphRemoveDependencies = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3378
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphRemoveDependencies
 *             __cuGraphRemoveDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphRemoveDependencies')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2339_try_end;
            __pyx_L2334_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3381
 *             global __cuGraphRemoveDependencies
 *             __cuGraphRemoveDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphRemoveDependencies')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2335_exception_handled;
            }
            __pyx_L2335_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2339_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3383
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphDestroyNode
 *             __cuGraphDestroyNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphDestroyNode')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3385
 *         try:
 *             global __cuGraphDestroyNode
 *             __cuGraphDestroyNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphDestroyNode')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3385, __pyx_L2340_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3385, __pyx_L2340_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphDestroyNode};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3385, __pyx_L2340_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphDestroyNode};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3385, __pyx_L2340_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3385, __pyx_L2340_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphDestroyNode);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphDestroyNode);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphDestroyNode);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3385, __pyx_L2340_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3385, __pyx_L2340_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphDestroyNode = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3383
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphDestroyNode
 *             __cuGraphDestroyNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphDestroyNode')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2345_try_end;
            __pyx_L2340_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3386
 *             global __cuGraphDestroyNode
 *             __cuGraphDestroyNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphDestroyNode')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2341_exception_handled;
            }
            __pyx_L2341_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2345_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3388
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphInstantiateWithFlags
 *             __cuGraphInstantiateWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphInstantiateWithFlags')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3390
 *         try:
 *             global __cuGraphInstantiateWithFlags
 *             __cuGraphInstantiateWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphInstantiateWithFlags')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3390, __pyx_L2346_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3390, __pyx_L2346_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphInstantiateWithFlags};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3390, __pyx_L2346_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphInstantiateWithFlags};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3390, __pyx_L2346_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3390, __pyx_L2346_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphInstantiateWithFlags);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphInstantiateWithFlags);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphInstantiateWithFlags);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3390, __pyx_L2346_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3390, __pyx_L2346_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphInstantiateWithFlags = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3388
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphInstantiateWithFlags
 *             __cuGraphInstantiateWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphInstantiateWithFlags')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2351_try_end;
            __pyx_L2346_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3391
 *             global __cuGraphInstantiateWithFlags
 *             __cuGraphInstantiateWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphInstantiateWithFlags')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2347_exception_handled;
            }
            __pyx_L2347_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2351_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3393
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecGetFlags
 *             __cuGraphExecGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecGetFlags')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3395
 *         try:
 *             global __cuGraphExecGetFlags
 *             __cuGraphExecGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecGetFlags')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3395, __pyx_L2352_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3395, __pyx_L2352_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphExecGetFlags};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3395, __pyx_L2352_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphExecGetFlags};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3395, __pyx_L2352_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3395, __pyx_L2352_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphExecGetFlags);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphExecGetFlags);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphExecGetFlags);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3395, __pyx_L2352_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3395, __pyx_L2352_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecGetFlags = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3393
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecGetFlags
 *             __cuGraphExecGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecGetFlags')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2357_try_end;
            __pyx_L2352_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3396
 *             global __cuGraphExecGetFlags
 *             __cuGraphExecGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecGetFlags')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2353_exception_handled;
            }
            __pyx_L2353_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2357_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3398
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecKernelNodeSetParams_v2
 *             __cuGraphExecKernelNodeSetParams_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecKernelNodeSetParams_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3400
 *         try:
 *             global __cuGraphExecKernelNodeSetParams_v2
 *             __cuGraphExecKernelNodeSetParams_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecKernelNodeSetParams_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3400, __pyx_L2358_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3400, __pyx_L2358_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphExecKernelNodeSetParams_v};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3400, __pyx_L2358_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphExecKernelNodeSetParams_v};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3400, __pyx_L2358_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3400, __pyx_L2358_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphExecKernelNodeSetParams_v);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphExecKernelNodeSetParams_v);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphExecKernelNodeSetParams_v);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3400, __pyx_L2358_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3400, __pyx_L2358_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecKernelNodeSetParams_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3398
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecKernelNodeSetParams_v2
 *             __cuGraphExecKernelNodeSetParams_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecKernelNodeSetParams_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2363_try_end;
            __pyx_L2358_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3401
 *             global __cuGraphExecKernelNodeSetParams_v2
 *             __cuGraphExecKernelNodeSetParams_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecKernelNodeSetParams_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2359_exception_handled;
            }
            __pyx_L2359_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2363_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3403
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecMemcpyNodeSetParams
 *             __cuGraphExecMemcpyNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecMemcpyNodeSetParams')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3405
 *         try:
 *             global __cuGraphExecMemcpyNodeSetParams
 *             __cuGraphExecMemcpyNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecMemcpyNodeSetParams')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3405, __pyx_L2364_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3405, __pyx_L2364_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphExecMemcpyNodeSetParams};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3405, __pyx_L2364_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphExecMemcpyNodeSetParams};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3405, __pyx_L2364_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3405, __pyx_L2364_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphExecMemcpyNodeSetParams);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphExecMemcpyNodeSetParams);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphExecMemcpyNodeSetParams);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3405, __pyx_L2364_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3405, __pyx_L2364_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecMemcpyNodeSetParams = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3403
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecMemcpyNodeSetParams
 *             __cuGraphExecMemcpyNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecMemcpyNodeSetParams')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2369_try_end;
            __pyx_L2364_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3406
 *             global __cuGraphExecMemcpyNodeSetParams
 *             __cuGraphExecMemcpyNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecMemcpyNodeSetParams')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2365_exception_handled;
            }
            __pyx_L2365_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2369_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3408
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecMemsetNodeSetParams
 *             __cuGraphExecMemsetNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecMemsetNodeSetParams')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3410
 *         try:
 *             global __cuGraphExecMemsetNodeSetParams
 *             __cuGraphExecMemsetNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecMemsetNodeSetParams')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3410, __pyx_L2370_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3410, __pyx_L2370_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphExecMemsetNodeSetParams};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3410, __pyx_L2370_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphExecMemsetNodeSetParams};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3410, __pyx_L2370_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3410, __pyx_L2370_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphExecMemsetNodeSetParams);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphExecMemsetNodeSetParams);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphExecMemsetNodeSetParams);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3410, __pyx_L2370_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3410, __pyx_L2370_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecMemsetNodeSetParams = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3408
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecMemsetNodeSetParams
 *             __cuGraphExecMemsetNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecMemsetNodeSetParams')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2375_try_end;
            __pyx_L2370_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3411
 *             global __cuGraphExecMemsetNodeSetParams
 *             __cuGraphExecMemsetNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecMemsetNodeSetParams')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2371_exception_handled;
            }
            __pyx_L2371_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2375_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3413
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecHostNodeSetParams
 *             __cuGraphExecHostNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecHostNodeSetParams')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3415
 *         try:
 *             global __cuGraphExecHostNodeSetParams
 *             __cuGraphExecHostNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecHostNodeSetParams')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3415, __pyx_L2376_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3415, __pyx_L2376_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphExecHostNodeSetParams};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3415, __pyx_L2376_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphExecHostNodeSetParams};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3415, __pyx_L2376_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3415, __pyx_L2376_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphExecHostNodeSetParams);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphExecHostNodeSetParams);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphExecHostNodeSetParams);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3415, __pyx_L2376_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3415, __pyx_L2376_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecHostNodeSetParams = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3413
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecHostNodeSetParams
 *             __cuGraphExecHostNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecHostNodeSetParams')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2381_try_end;
            __pyx_L2376_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3416
 *             global __cuGraphExecHostNodeSetParams
 *             __cuGraphExecHostNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecHostNodeSetParams')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2377_exception_handled;
            }
            __pyx_L2377_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2381_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3418
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecChildGraphNodeSetParams
 *             __cuGraphExecChildGraphNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecChildGraphNodeSetParams')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3420
 *         try:
 *             global __cuGraphExecChildGraphNodeSetParams
 *             __cuGraphExecChildGraphNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecChildGraphNodeSetParams')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3420, __pyx_L2382_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3420, __pyx_L2382_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphExecChildGraphNodeSetPara};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3420, __pyx_L2382_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphExecChildGraphNodeSetPara};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3420, __pyx_L2382_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3420, __pyx_L2382_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphExecChildGraphNodeSetPara);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphExecChildGraphNodeSetPara);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphExecChildGraphNodeSetPara);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3420, __pyx_L2382_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3420, __pyx_L2382_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecChildGraphNodeSetParams = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3418
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecChildGraphNodeSetParams
 *             __cuGraphExecChildGraphNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecChildGraphNodeSetParams')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2387_try_end;
            __pyx_L2382_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3421
 *             global __cuGraphExecChildGraphNodeSetParams
 *             __cuGraphExecChildGraphNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecChildGraphNodeSetParams')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2383_exception_handled;
            }
            __pyx_L2383_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2387_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3423
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecEventRecordNodeSetEvent
 *             __cuGraphExecEventRecordNodeSetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecEventRecordNodeSetEvent')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3425
 *         try:
 *             global __cuGraphExecEventRecordNodeSetEvent
 *             __cuGraphExecEventRecordNodeSetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecEventRecordNodeSetEvent')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3425, __pyx_L2388_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3425, __pyx_L2388_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphExecEventRecordNodeSetEve};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3425, __pyx_L2388_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphExecEventRecordNodeSetEve};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3425, __pyx_L2388_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3425, __pyx_L2388_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphExecEventRecordNodeSetEve);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphExecEventRecordNodeSetEve);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphExecEventRecordNodeSetEve);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3425, __pyx_L2388_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3425, __pyx_L2388_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecEventRecordNodeSetEvent = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3423
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecEventRecordNodeSetEvent
 *             __cuGraphExecEventRecordNodeSetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecEventRecordNodeSetEvent')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2393_try_end;
            __pyx_L2388_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3426
 *             global __cuGraphExecEventRecordNodeSetEvent
 *             __cuGraphExecEventRecordNodeSetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecEventRecordNodeSetEvent')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2389_exception_handled;
            }
            __pyx_L2389_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2393_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3428
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecEventWaitNodeSetEvent
 *             __cuGraphExecEventWaitNodeSetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecEventWaitNodeSetEvent')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3430
 *         try:
 *             global __cuGraphExecEventWaitNodeSetEvent
 *             __cuGraphExecEventWaitNodeSetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecEventWaitNodeSetEvent')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3430, __pyx_L2394_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3430, __pyx_L2394_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphExecEventWaitNodeSetEvent};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3430, __pyx_L2394_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphExecEventWaitNodeSetEvent};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3430, __pyx_L2394_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3430, __pyx_L2394_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphExecEventWaitNodeSetEvent);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphExecEventWaitNodeSetEvent);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphExecEventWaitNodeSetEvent);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3430, __pyx_L2394_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3430, __pyx_L2394_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecEventWaitNodeSetEvent = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3428
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecEventWaitNodeSetEvent
 *             __cuGraphExecEventWaitNodeSetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecEventWaitNodeSetEvent')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2399_try_end;
            __pyx_L2394_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3431
 *             global __cuGraphExecEventWaitNodeSetEvent
 *             __cuGraphExecEventWaitNodeSetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecEventWaitNodeSetEvent')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2395_exception_handled;
            }
            __pyx_L2395_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2399_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3433
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecExternalSemaphoresSignalNodeSetParams
 *             __cuGraphExecExternalSemaphoresSignalNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecExternalSemaphoresSignalNodeSetParams')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3435
 *         try:
 *             global __cuGraphExecExternalSemaphoresSignalNodeSetParams
 *             __cuGraphExecExternalSemaphoresSignalNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecExternalSemaphoresSignalNodeSetParams')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3435, __pyx_L2400_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3435, __pyx_L2400_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphExecExternalSemaphoresSig};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3435, __pyx_L2400_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphExecExternalSemaphoresSig};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3435, __pyx_L2400_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3435, __pyx_L2400_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphExecExternalSemaphoresSig);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphExecExternalSemaphoresSig);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphExecExternalSemaphoresSig);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3435, __pyx_L2400_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3435, __pyx_L2400_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecExternalSemaphoresSignalNodeSetParams = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3433
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecExternalSemaphoresSignalNodeSetParams
 *             __cuGraphExecExternalSemaphoresSignalNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecExternalSemaphoresSignalNodeSetParams')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2405_try_end;
            __pyx_L2400_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3436
 *             global __cuGraphExecExternalSemaphoresSignalNodeSetParams
 *             __cuGraphExecExternalSemaphoresSignalNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecExternalSemaphoresSignalNodeSetParams')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2401_exception_handled;
            }
            __pyx_L2401_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2405_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3438
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecExternalSemaphoresWaitNodeSetParams
 *             __cuGraphExecExternalSemaphoresWaitNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecExternalSemaphoresWaitNodeSetParams')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3440
 *         try:
 *             global __cuGraphExecExternalSemaphoresWaitNodeSetParams
 *             __cuGraphExecExternalSemaphoresWaitNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecExternalSemaphoresWaitNodeSetParams')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3440, __pyx_L2406_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3440, __pyx_L2406_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphExecExternalSemaphoresWai};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3440, __pyx_L2406_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphExecExternalSemaphoresWai};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3440, __pyx_L2406_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3440, __pyx_L2406_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphExecExternalSemaphoresWai);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphExecExternalSemaphoresWai);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphExecExternalSemaphoresWai);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3440, __pyx_L2406_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3440, __pyx_L2406_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecExternalSemaphoresWaitNodeSetParams = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3438
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecExternalSemaphoresWaitNodeSetParams
 *             __cuGraphExecExternalSemaphoresWaitNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecExternalSemaphoresWaitNodeSetParams')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2411_try_end;
            __pyx_L2406_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3441
 *             global __cuGraphExecExternalSemaphoresWaitNodeSetParams
 *             __cuGraphExecExternalSemaphoresWaitNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecExternalSemaphoresWaitNodeSetParams')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2407_exception_handled;
            }
            __pyx_L2407_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2411_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3443
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphNodeSetEnabled
 *             __cuGraphNodeSetEnabled = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeSetEnabled')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3445
 *         try:
 *             global __cuGraphNodeSetEnabled
 *             __cuGraphNodeSetEnabled = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeSetEnabled')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3445, __pyx_L2412_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3445, __pyx_L2412_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphNodeSetEnabled};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3445, __pyx_L2412_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphNodeSetEnabled};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3445, __pyx_L2412_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3445, __pyx_L2412_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphNodeSetEnabled);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphNodeSetEnabled);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphNodeSetEnabled);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3445, __pyx_L2412_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3445, __pyx_L2412_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeSetEnabled = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3443
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphNodeSetEnabled
 *             __cuGraphNodeSetEnabled = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeSetEnabled')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2417_try_end;
            __pyx_L2412_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3446
 *             global __cuGraphNodeSetEnabled
 *             __cuGraphNodeSetEnabled = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeSetEnabled')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2413_exception_handled;
            }
            __pyx_L2413_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2417_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3448
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphNodeGetEnabled
 *             __cuGraphNodeGetEnabled = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeGetEnabled')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3450
 *         try:
 *             global __cuGraphNodeGetEnabled
 *             __cuGraphNodeGetEnabled = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeGetEnabled')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3450, __pyx_L2418_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3450, __pyx_L2418_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphNodeGetEnabled};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3450, __pyx_L2418_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphNodeGetEnabled};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3450, __pyx_L2418_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3450, __pyx_L2418_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphNodeGetEnabled);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphNodeGetEnabled);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphNodeGetEnabled);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3450, __pyx_L2418_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3450, __pyx_L2418_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetEnabled = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3448
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphNodeGetEnabled
 *             __cuGraphNodeGetEnabled = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeGetEnabled')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2423_try_end;
            __pyx_L2418_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3451
 *             global __cuGraphNodeGetEnabled
 *             __cuGraphNodeGetEnabled = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeGetEnabled')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2419_exception_handled;
            }
            __pyx_L2419_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2423_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3453
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecDestroy
 *             __cuGraphExecDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecDestroy')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3455
 *         try:
 *             global __cuGraphExecDestroy
 *             __cuGraphExecDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecDestroy')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3455, __pyx_L2424_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3455, __pyx_L2424_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphExecDestroy};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3455, __pyx_L2424_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphExecDestroy};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3455, __pyx_L2424_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3455, __pyx_L2424_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphExecDestroy);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphExecDestroy);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphExecDestroy);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3455, __pyx_L2424_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3455, __pyx_L2424_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecDestroy = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3453
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecDestroy
 *             __cuGraphExecDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecDestroy')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2429_try_end;
            __pyx_L2424_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3456
 *             global __cuGraphExecDestroy
 *             __cuGraphExecDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecDestroy')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2425_exception_handled;
            }
            __pyx_L2425_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2429_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3458
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphDestroy
 *             __cuGraphDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphDestroy')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3460
 *         try:
 *             global __cuGraphDestroy
 *             __cuGraphDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphDestroy')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3460, __pyx_L2430_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3460, __pyx_L2430_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphDestroy};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3460, __pyx_L2430_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphDestroy};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3460, __pyx_L2430_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3460, __pyx_L2430_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphDestroy);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphDestroy);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphDestroy);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3460, __pyx_L2430_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3460, __pyx_L2430_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphDestroy = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3458
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphDestroy
 *             __cuGraphDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphDestroy')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2435_try_end;
            __pyx_L2430_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3461
 *             global __cuGraphDestroy
 *             __cuGraphDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphDestroy')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2431_exception_handled;
            }
            __pyx_L2431_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2435_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3463
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecUpdate_v2
 *             __cuGraphExecUpdate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecUpdate_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3465
 *         try:
 *             global __cuGraphExecUpdate_v2
 *             __cuGraphExecUpdate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecUpdate_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3465, __pyx_L2436_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3465, __pyx_L2436_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphExecUpdate_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3465, __pyx_L2436_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphExecUpdate_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3465, __pyx_L2436_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3465, __pyx_L2436_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphExecUpdate_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphExecUpdate_v2);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphExecUpdate_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3465, __pyx_L2436_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3465, __pyx_L2436_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecUpdate_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3463
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecUpdate_v2
 *             __cuGraphExecUpdate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecUpdate_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2441_try_end;
            __pyx_L2436_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3466
 *             global __cuGraphExecUpdate_v2
 *             __cuGraphExecUpdate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecUpdate_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2437_exception_handled;
            }
            __pyx_L2437_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2441_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3468
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphKernelNodeCopyAttributes
 *             __cuGraphKernelNodeCopyAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeCopyAttributes')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3470
 *         try:
 *             global __cuGraphKernelNodeCopyAttributes
 *             __cuGraphKernelNodeCopyAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeCopyAttributes')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3470, __pyx_L2442_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3470, __pyx_L2442_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphKernelNodeCopyAttributes};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3470, __pyx_L2442_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphKernelNodeCopyAttributes};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3470, __pyx_L2442_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3470, __pyx_L2442_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphKernelNodeCopyAttributes);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphKernelNodeCopyAttributes);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphKernelNodeCopyAttributes);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3470, __pyx_L2442_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3470, __pyx_L2442_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeCopyAttributes = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3468
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphKernelNodeCopyAttributes
 *             __cuGraphKernelNodeCopyAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeCopyAttributes')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2447_try_end;
            __pyx_L2442_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3471
 *             global __cuGraphKernelNodeCopyAttributes
 *             __cuGraphKernelNodeCopyAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeCopyAttributes')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2443_exception_handled;
            }
            __pyx_L2443_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2447_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3473
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphKernelNodeGetAttribute
 *             __cuGraphKernelNodeGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeGetAttribute')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3475
 *         try:
 *             global __cuGraphKernelNodeGetAttribute
 *             __cuGraphKernelNodeGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeGetAttribute')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3475, __pyx_L2448_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3475, __pyx_L2448_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphKernelNodeGetAttribute};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3475, __pyx_L2448_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphKernelNodeGetAttribute};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3475, __pyx_L2448_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3475, __pyx_L2448_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphKernelNodeGetAttribute);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphKernelNodeGetAttribute);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphKernelNodeGetAttribute);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3475, __pyx_L2448_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3475, __pyx_L2448_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeGetAttribute = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3473
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphKernelNodeGetAttribute
 *             __cuGraphKernelNodeGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeGetAttribute')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2453_try_end;
            __pyx_L2448_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3476
 *             global __cuGraphKernelNodeGetAttribute
 *             __cuGraphKernelNodeGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeGetAttribute')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2449_exception_handled;
            }
            __pyx_L2449_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2453_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3478
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphKernelNodeSetAttribute
 *             __cuGraphKernelNodeSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeSetAttribute')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3480
 *         try:
 *             global __cuGraphKernelNodeSetAttribute
 *             __cuGraphKernelNodeSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeSetAttribute')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3480, __pyx_L2454_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3480, __pyx_L2454_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphKernelNodeSetAttribute};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3480, __pyx_L2454_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphKernelNodeSetAttribute};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3480, __pyx_L2454_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3480, __pyx_L2454_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphKernelNodeSetAttribute);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphKernelNodeSetAttribute);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphKernelNodeSetAttribute);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3480, __pyx_L2454_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3480, __pyx_L2454_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeSetAttribute = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3478
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphKernelNodeSetAttribute
 *             __cuGraphKernelNodeSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeSetAttribute')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2459_try_end;
            __pyx_L2454_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3481
 *             global __cuGraphKernelNodeSetAttribute
 *             __cuGraphKernelNodeSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeSetAttribute')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2455_exception_handled;
            }
            __pyx_L2455_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2459_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3483
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphDebugDotPrint
 *             __cuGraphDebugDotPrint = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphDebugDotPrint')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3485
 *         try:
 *             global __cuGraphDebugDotPrint
 *             __cuGraphDebugDotPrint = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphDebugDotPrint')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3485, __pyx_L2460_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3485, __pyx_L2460_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphDebugDotPrint};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3485, __pyx_L2460_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphDebugDotPrint};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3485, __pyx_L2460_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3485, __pyx_L2460_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphDebugDotPrint);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphDebugDotPrint);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphDebugDotPrint);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3485, __pyx_L2460_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3485, __pyx_L2460_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphDebugDotPrint = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3483
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphDebugDotPrint
 *             __cuGraphDebugDotPrint = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphDebugDotPrint')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2465_try_end;
            __pyx_L2460_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3486
 *             global __cuGraphDebugDotPrint
 *             __cuGraphDebugDotPrint = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphDebugDotPrint')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2461_exception_handled;
            }
            __pyx_L2461_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2465_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3488
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuUserObjectCreate
 *             __cuUserObjectCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuUserObjectCreate')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3490
 *         try:
 *             global __cuUserObjectCreate
 *             __cuUserObjectCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuUserObjectCreate')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3490, __pyx_L2466_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3490, __pyx_L2466_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuUserObjectCreate};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3490, __pyx_L2466_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuUserObjectCreate};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3490, __pyx_L2466_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3490, __pyx_L2466_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuUserObjectCreate);
                __Pyx_GIVEREF(__pyx_n_u_cuUserObjectCreate);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuUserObjectCreate);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3490, __pyx_L2466_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3490, __pyx_L2466_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuUserObjectCreate = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3488
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuUserObjectCreate
 *             __cuUserObjectCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuUserObjectCreate')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2471_try_end;
            __pyx_L2466_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3491
 *             global __cuUserObjectCreate
 *             __cuUserObjectCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuUserObjectCreate')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2467_exception_handled;
            }
            __pyx_L2467_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2471_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3493
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuUserObjectRetain
 *             __cuUserObjectRetain = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuUserObjectRetain')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3495
 *         try:
 *             global __cuUserObjectRetain
 *             __cuUserObjectRetain = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuUserObjectRetain')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3495, __pyx_L2472_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3495, __pyx_L2472_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuUserObjectRetain};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3495, __pyx_L2472_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuUserObjectRetain};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3495, __pyx_L2472_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3495, __pyx_L2472_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuUserObjectRetain);
                __Pyx_GIVEREF(__pyx_n_u_cuUserObjectRetain);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuUserObjectRetain);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3495, __pyx_L2472_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3495, __pyx_L2472_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuUserObjectRetain = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3493
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuUserObjectRetain
 *             __cuUserObjectRetain = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuUserObjectRetain')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2477_try_end;
            __pyx_L2472_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3496
 *             global __cuUserObjectRetain
 *             __cuUserObjectRetain = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuUserObjectRetain')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2473_exception_handled;
            }
            __pyx_L2473_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2477_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3498
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuUserObjectRelease
 *             __cuUserObjectRelease = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuUserObjectRelease')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3500
 *         try:
 *             global __cuUserObjectRelease
 *             __cuUserObjectRelease = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuUserObjectRelease')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3500, __pyx_L2478_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3500, __pyx_L2478_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuUserObjectRelease};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3500, __pyx_L2478_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuUserObjectRelease};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3500, __pyx_L2478_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3500, __pyx_L2478_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuUserObjectRelease);
                __Pyx_GIVEREF(__pyx_n_u_cuUserObjectRelease);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuUserObjectRelease);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3500, __pyx_L2478_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3500, __pyx_L2478_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuUserObjectRelease = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3498
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuUserObjectRelease
 *             __cuUserObjectRelease = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuUserObjectRelease')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2483_try_end;
            __pyx_L2478_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3501
 *             global __cuUserObjectRelease
 *             __cuUserObjectRelease = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuUserObjectRelease')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2479_exception_handled;
            }
            __pyx_L2479_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2483_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3503
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphRetainUserObject
 *             __cuGraphRetainUserObject = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphRetainUserObject')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3505
 *         try:
 *             global __cuGraphRetainUserObject
 *             __cuGraphRetainUserObject = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphRetainUserObject')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3505, __pyx_L2484_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3505, __pyx_L2484_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphRetainUserObject};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3505, __pyx_L2484_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphRetainUserObject};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3505, __pyx_L2484_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3505, __pyx_L2484_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphRetainUserObject);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphRetainUserObject);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphRetainUserObject);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3505, __pyx_L2484_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3505, __pyx_L2484_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphRetainUserObject = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3503
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphRetainUserObject
 *             __cuGraphRetainUserObject = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphRetainUserObject')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2489_try_end;
            __pyx_L2484_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3506
 *             global __cuGraphRetainUserObject
 *             __cuGraphRetainUserObject = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphRetainUserObject')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2485_exception_handled;
            }
            __pyx_L2485_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2489_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3508
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphReleaseUserObject
 *             __cuGraphReleaseUserObject = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphReleaseUserObject')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3510
 *         try:
 *             global __cuGraphReleaseUserObject
 *             __cuGraphReleaseUserObject = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphReleaseUserObject')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3510, __pyx_L2490_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3510, __pyx_L2490_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphReleaseUserObject};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3510, __pyx_L2490_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphReleaseUserObject};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3510, __pyx_L2490_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3510, __pyx_L2490_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphReleaseUserObject);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphReleaseUserObject);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphReleaseUserObject);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3510, __pyx_L2490_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3510, __pyx_L2490_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphReleaseUserObject = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3508
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphReleaseUserObject
 *             __cuGraphReleaseUserObject = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphReleaseUserObject')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2495_try_end;
            __pyx_L2490_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3511
 *             global __cuGraphReleaseUserObject
 *             __cuGraphReleaseUserObject = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphReleaseUserObject')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2491_exception_handled;
            }
            __pyx_L2491_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2495_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3513
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddNode
 *             __cuGraphAddNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddNode')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3515
 *         try:
 *             global __cuGraphAddNode
 *             __cuGraphAddNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddNode')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3515, __pyx_L2496_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3515, __pyx_L2496_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphAddNode};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3515, __pyx_L2496_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphAddNode};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3515, __pyx_L2496_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3515, __pyx_L2496_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphAddNode);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphAddNode);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphAddNode);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3515, __pyx_L2496_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3515, __pyx_L2496_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddNode = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3513
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddNode
 *             __cuGraphAddNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddNode')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2501_try_end;
            __pyx_L2496_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3516
 *             global __cuGraphAddNode
 *             __cuGraphAddNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddNode')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2497_exception_handled;
            }
            __pyx_L2497_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2501_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3518
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphNodeSetParams
 *             __cuGraphNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeSetParams')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3520
 *         try:
 *             global __cuGraphNodeSetParams
 *             __cuGraphNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeSetParams')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3520, __pyx_L2502_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3520, __pyx_L2502_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphNodeSetParams};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3520, __pyx_L2502_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphNodeSetParams};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3520, __pyx_L2502_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3520, __pyx_L2502_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphNodeSetParams);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphNodeSetParams);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphNodeSetParams);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3520, __pyx_L2502_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3520, __pyx_L2502_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeSetParams = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3518
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphNodeSetParams
 *             __cuGraphNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeSetParams')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2507_try_end;
            __pyx_L2502_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3521
 *             global __cuGraphNodeSetParams
 *             __cuGraphNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeSetParams')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2503_exception_handled;
            }
            __pyx_L2503_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2507_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3523
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecNodeSetParams
 *             __cuGraphExecNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecNodeSetParams')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3525
 *         try:
 *             global __cuGraphExecNodeSetParams
 *             __cuGraphExecNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecNodeSetParams')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3525, __pyx_L2508_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3525, __pyx_L2508_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphExecNodeSetParams};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3525, __pyx_L2508_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphExecNodeSetParams};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3525, __pyx_L2508_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3525, __pyx_L2508_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphExecNodeSetParams);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphExecNodeSetParams);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphExecNodeSetParams);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3525, __pyx_L2508_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3525, __pyx_L2508_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecNodeSetParams = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3523
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecNodeSetParams
 *             __cuGraphExecNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecNodeSetParams')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2513_try_end;
            __pyx_L2508_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3526
 *             global __cuGraphExecNodeSetParams
 *             __cuGraphExecNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecNodeSetParams')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2509_exception_handled;
            }
            __pyx_L2509_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2513_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3528
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuOccupancyMaxActiveBlocksPerMultiprocessor
 *             __cuOccupancyMaxActiveBlocksPerMultiprocessor = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessor')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3530
 *         try:
 *             global __cuOccupancyMaxActiveBlocksPerMultiprocessor
 *             __cuOccupancyMaxActiveBlocksPerMultiprocessor = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessor')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3530, __pyx_L2514_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3530, __pyx_L2514_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuOccupancyMaxActiveBlocksPerMul};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3530, __pyx_L2514_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuOccupancyMaxActiveBlocksPerMul};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3530, __pyx_L2514_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3530, __pyx_L2514_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuOccupancyMaxActiveBlocksPerMul);
                __Pyx_GIVEREF(__pyx_n_u_cuOccupancyMaxActiveBlocksPerMul);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuOccupancyMaxActiveBlocksPerMul);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3530, __pyx_L2514_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3530, __pyx_L2514_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxActiveBlocksPerMultiprocessor = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3528
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuOccupancyMaxActiveBlocksPerMultiprocessor
 *             __cuOccupancyMaxActiveBlocksPerMultiprocessor = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessor')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2519_try_end;
            __pyx_L2514_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3531
 *             global __cuOccupancyMaxActiveBlocksPerMultiprocessor
 *             __cuOccupancyMaxActiveBlocksPerMultiprocessor = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessor')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2515_exception_handled;
            }
            __pyx_L2515_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2519_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3533
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags
 *             __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3535
 *         try:
 *             global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags
 *             __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3535, __pyx_L2520_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3535, __pyx_L2520_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuOccupancyMaxActiveBlocksPerMul_2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3535, __pyx_L2520_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuOccupancyMaxActiveBlocksPerMul_2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3535, __pyx_L2520_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3535, __pyx_L2520_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuOccupancyMaxActiveBlocksPerMul_2);
                __Pyx_GIVEREF(__pyx_n_u_cuOccupancyMaxActiveBlocksPerMul_2);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuOccupancyMaxActiveBlocksPerMul_2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3535, __pyx_L2520_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3535, __pyx_L2520_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3533
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags
 *             __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2525_try_end;
            __pyx_L2520_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3536
 *             global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags
 *             __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2521_exception_handled;
            }
            __pyx_L2521_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2525_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3538
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuOccupancyMaxPotentialBlockSize
 *             __cuOccupancyMaxPotentialBlockSize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxPotentialBlockSize')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3540
 *         try:
 *             global __cuOccupancyMaxPotentialBlockSize
 *             __cuOccupancyMaxPotentialBlockSize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxPotentialBlockSize')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3540, __pyx_L2526_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3540, __pyx_L2526_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuOccupancyMaxPotentialBlockSize};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3540, __pyx_L2526_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuOccupancyMaxPotentialBlockSize};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3540, __pyx_L2526_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3540, __pyx_L2526_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuOccupancyMaxPotentialBlockSize);
                __Pyx_GIVEREF(__pyx_n_u_cuOccupancyMaxPotentialBlockSize);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuOccupancyMaxPotentialBlockSize);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3540, __pyx_L2526_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3540, __pyx_L2526_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxPotentialBlockSize = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3538
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuOccupancyMaxPotentialBlockSize
 *             __cuOccupancyMaxPotentialBlockSize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxPotentialBlockSize')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2531_try_end;
            __pyx_L2526_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3541
 *             global __cuOccupancyMaxPotentialBlockSize
 *             __cuOccupancyMaxPotentialBlockSize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxPotentialBlockSize')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2527_exception_handled;
            }
            __pyx_L2527_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2531_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3543
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuOccupancyMaxPotentialBlockSizeWithFlags
 *             __cuOccupancyMaxPotentialBlockSizeWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxPotentialBlockSizeWithFlags')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3545
 *         try:
 *             global __cuOccupancyMaxPotentialBlockSizeWithFlags
 *             __cuOccupancyMaxPotentialBlockSizeWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxPotentialBlockSizeWithFlags')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3545, __pyx_L2532_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3545, __pyx_L2532_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuOccupancyMaxPotentialBlockSize_2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3545, __pyx_L2532_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuOccupancyMaxPotentialBlockSize_2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3545, __pyx_L2532_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3545, __pyx_L2532_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuOccupancyMaxPotentialBlockSize_2);
                __Pyx_GIVEREF(__pyx_n_u_cuOccupancyMaxPotentialBlockSize_2);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuOccupancyMaxPotentialBlockSize_2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3545, __pyx_L2532_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3545, __pyx_L2532_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxPotentialBlockSizeWithFlags = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3543
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuOccupancyMaxPotentialBlockSizeWithFlags
 *             __cuOccupancyMaxPotentialBlockSizeWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxPotentialBlockSizeWithFlags')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2537_try_end;
            __pyx_L2532_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3546
 *             global __cuOccupancyMaxPotentialBlockSizeWithFlags
 *             __cuOccupancyMaxPotentialBlockSizeWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxPotentialBlockSizeWithFlags')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2533_exception_handled;
            }
            __pyx_L2533_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2537_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3548
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuOccupancyAvailableDynamicSMemPerBlock
 *             __cuOccupancyAvailableDynamicSMemPerBlock = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyAvailableDynamicSMemPerBlock')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3550
 *         try:
 *             global __cuOccupancyAvailableDynamicSMemPerBlock
 *             __cuOccupancyAvailableDynamicSMemPerBlock = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyAvailableDynamicSMemPerBlock')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3550, __pyx_L2538_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3550, __pyx_L2538_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuOccupancyAvailableDynamicSMemP};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3550, __pyx_L2538_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuOccupancyAvailableDynamicSMemP};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3550, __pyx_L2538_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3550, __pyx_L2538_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuOccupancyAvailableDynamicSMemP);
                __Pyx_GIVEREF(__pyx_n_u_cuOccupancyAvailableDynamicSMemP);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuOccupancyAvailableDynamicSMemP);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3550, __pyx_L2538_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3550, __pyx_L2538_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyAvailableDynamicSMemPerBlock = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3548
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuOccupancyAvailableDynamicSMemPerBlock
 *             __cuOccupancyAvailableDynamicSMemPerBlock = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyAvailableDynamicSMemPerBlock')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2543_try_end;
            __pyx_L2538_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3551
 *             global __cuOccupancyAvailableDynamicSMemPerBlock
 *             __cuOccupancyAvailableDynamicSMemPerBlock = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyAvailableDynamicSMemPerBlock')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2539_exception_handled;
            }
            __pyx_L2539_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2543_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3553
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuOccupancyMaxPotentialClusterSize
 *             __cuOccupancyMaxPotentialClusterSize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxPotentialClusterSize')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3555
 *         try:
 *             global __cuOccupancyMaxPotentialClusterSize
 *             __cuOccupancyMaxPotentialClusterSize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxPotentialClusterSize')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3555, __pyx_L2544_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3555, __pyx_L2544_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuOccupancyMaxPotentialClusterSi};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3555, __pyx_L2544_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuOccupancyMaxPotentialClusterSi};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3555, __pyx_L2544_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3555, __pyx_L2544_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuOccupancyMaxPotentialClusterSi);
                __Pyx_GIVEREF(__pyx_n_u_cuOccupancyMaxPotentialClusterSi);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuOccupancyMaxPotentialClusterSi);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3555, __pyx_L2544_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3555, __pyx_L2544_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxPotentialClusterSize = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3553
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuOccupancyMaxPotentialClusterSize
 *             __cuOccupancyMaxPotentialClusterSize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxPotentialClusterSize')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2549_try_end;
            __pyx_L2544_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3556
 *             global __cuOccupancyMaxPotentialClusterSize
 *             __cuOccupancyMaxPotentialClusterSize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxPotentialClusterSize')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2545_exception_handled;
            }
            __pyx_L2545_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2549_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3558
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuOccupancyMaxActiveClusters
 *             __cuOccupancyMaxActiveClusters = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxActiveClusters')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3560
 *         try:
 *             global __cuOccupancyMaxActiveClusters
 *             __cuOccupancyMaxActiveClusters = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxActiveClusters')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3560, __pyx_L2550_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3560, __pyx_L2550_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuOccupancyMaxActiveClusters};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3560, __pyx_L2550_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuOccupancyMaxActiveClusters};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3560, __pyx_L2550_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3560, __pyx_L2550_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuOccupancyMaxActiveClusters);
                __Pyx_GIVEREF(__pyx_n_u_cuOccupancyMaxActiveClusters);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuOccupancyMaxActiveClusters);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3560, __pyx_L2550_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3560, __pyx_L2550_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxActiveClusters = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3558
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuOccupancyMaxActiveClusters
 *             __cuOccupancyMaxActiveClusters = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxActiveClusters')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2555_try_end;
            __pyx_L2550_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3561
 *             global __cuOccupancyMaxActiveClusters
 *             __cuOccupancyMaxActiveClusters = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxActiveClusters')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2551_exception_handled;
            }
            __pyx_L2551_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2555_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3563
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefSetArray
 *             __cuTexRefSetArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetArray')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3565
 *         try:
 *             global __cuTexRefSetArray
 *             __cuTexRefSetArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetArray')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3565, __pyx_L2556_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3565, __pyx_L2556_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuTexRefSetArray};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3565, __pyx_L2556_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuTexRefSetArray};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3565, __pyx_L2556_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3565, __pyx_L2556_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexRefSetArray);
                __Pyx_GIVEREF(__pyx_n_u_cuTexRefSetArray);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuTexRefSetArray);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3565, __pyx_L2556_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3565, __pyx_L2556_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetArray = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3563
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefSetArray
 *             __cuTexRefSetArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetArray')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2561_try_end;
            __pyx_L2556_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3566
 *             global __cuTexRefSetArray
 *             __cuTexRefSetArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetArray')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2557_exception_handled;
            }
            __pyx_L2557_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2561_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3568
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefSetMipmappedArray
 *             __cuTexRefSetMipmappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetMipmappedArray')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3570
 *         try:
 *             global __cuTexRefSetMipmappedArray
 *             __cuTexRefSetMipmappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetMipmappedArray')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3570, __pyx_L2562_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3570, __pyx_L2562_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuTexRefSetMipmappedArray};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3570, __pyx_L2562_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuTexRefSetMipmappedArray};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3570, __pyx_L2562_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3570, __pyx_L2562_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexRefSetMipmappedArray);
                __Pyx_GIVEREF(__pyx_n_u_cuTexRefSetMipmappedArray);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuTexRefSetMipmappedArray);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3570, __pyx_L2562_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3570, __pyx_L2562_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmappedArray = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3568
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefSetMipmappedArray
 *             __cuTexRefSetMipmappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetMipmappedArray')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2567_try_end;
            __pyx_L2562_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3571
 *             global __cuTexRefSetMipmappedArray
 *             __cuTexRefSetMipmappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetMipmappedArray')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2563_exception_handled;
            }
            __pyx_L2563_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2567_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3573
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefSetAddress_v2
 *             __cuTexRefSetAddress_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetAddress_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3575
 *         try:
 *             global __cuTexRefSetAddress_v2
 *             __cuTexRefSetAddress_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetAddress_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3575, __pyx_L2568_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3575, __pyx_L2568_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuTexRefSetAddress_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3575, __pyx_L2568_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuTexRefSetAddress_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3575, __pyx_L2568_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3575, __pyx_L2568_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexRefSetAddress_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuTexRefSetAddress_v2);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuTexRefSetAddress_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3575, __pyx_L2568_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3575, __pyx_L2568_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetAddress_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3573
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefSetAddress_v2
 *             __cuTexRefSetAddress_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetAddress_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2573_try_end;
            __pyx_L2568_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3576
 *             global __cuTexRefSetAddress_v2
 *             __cuTexRefSetAddress_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetAddress_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2569_exception_handled;
            }
            __pyx_L2569_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2573_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3578
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefSetAddress2D_v3
 *             __cuTexRefSetAddress2D_v3 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetAddress2D_v3')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3580
 *         try:
 *             global __cuTexRefSetAddress2D_v3
 *             __cuTexRefSetAddress2D_v3 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetAddress2D_v3')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3580, __pyx_L2574_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3580, __pyx_L2574_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuTexRefSetAddress2D_v3};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3580, __pyx_L2574_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuTexRefSetAddress2D_v3};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3580, __pyx_L2574_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3580, __pyx_L2574_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexRefSetAddress2D_v3);
                __Pyx_GIVEREF(__pyx_n_u_cuTexRefSetAddress2D_v3);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuTexRefSetAddress2D_v3);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3580, __pyx_L2574_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3580, __pyx_L2574_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetAddress2D_v3 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3578
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefSetAddress2D_v3
 *             __cuTexRefSetAddress2D_v3 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetAddress2D_v3')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2579_try_end;
            __pyx_L2574_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3581
 *             global __cuTexRefSetAddress2D_v3
 *             __cuTexRefSetAddress2D_v3 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetAddress2D_v3')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2575_exception_handled;
            }
            __pyx_L2575_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2579_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3583
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefSetFormat
 *             __cuTexRefSetFormat = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetFormat')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3585
 *         try:
 *             global __cuTexRefSetFormat
 *             __cuTexRefSetFormat = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetFormat')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3585, __pyx_L2580_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3585, __pyx_L2580_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuTexRefSetFormat};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3585, __pyx_L2580_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuTexRefSetFormat};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3585, __pyx_L2580_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3585, __pyx_L2580_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexRefSetFormat);
                __Pyx_GIVEREF(__pyx_n_u_cuTexRefSetFormat);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuTexRefSetFormat);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3585, __pyx_L2580_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3585, __pyx_L2580_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFormat = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3583
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefSetFormat
 *             __cuTexRefSetFormat = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetFormat')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2585_try_end;
            __pyx_L2580_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3586
 *             global __cuTexRefSetFormat
 *             __cuTexRefSetFormat = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetFormat')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2581_exception_handled;
            }
            __pyx_L2581_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2585_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3588
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefSetAddressMode
 *             __cuTexRefSetAddressMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetAddressMode')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3590
 *         try:
 *             global __cuTexRefSetAddressMode
 *             __cuTexRefSetAddressMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetAddressMode')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3590, __pyx_L2586_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3590, __pyx_L2586_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuTexRefSetAddressMode};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3590, __pyx_L2586_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuTexRefSetAddressMode};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3590, __pyx_L2586_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3590, __pyx_L2586_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexRefSetAddressMode);
                __Pyx_GIVEREF(__pyx_n_u_cuTexRefSetAddressMode);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuTexRefSetAddressMode);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3590, __pyx_L2586_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3590, __pyx_L2586_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetAddressMode = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3588
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefSetAddressMode
 *             __cuTexRefSetAddressMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetAddressMode')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2591_try_end;
            __pyx_L2586_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3591
 *             global __cuTexRefSetAddressMode
 *             __cuTexRefSetAddressMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetAddressMode')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2587_exception_handled;
            }
            __pyx_L2587_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2591_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3593
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefSetFilterMode
 *             __cuTexRefSetFilterMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetFilterMode')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3595
 *         try:
 *             global __cuTexRefSetFilterMode
 *             __cuTexRefSetFilterMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetFilterMode')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3595, __pyx_L2592_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3595, __pyx_L2592_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuTexRefSetFilterMode};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3595, __pyx_L2592_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuTexRefSetFilterMode};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3595, __pyx_L2592_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3595, __pyx_L2592_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexRefSetFilterMode);
                __Pyx_GIVEREF(__pyx_n_u_cuTexRefSetFilterMode);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuTexRefSetFilterMode);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3595, __pyx_L2592_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3595, __pyx_L2592_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFilterMode = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3593
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefSetFilterMode
 *             __cuTexRefSetFilterMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetFilterMode')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2597_try_end;
            __pyx_L2592_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3596
 *             global __cuTexRefSetFilterMode
 *             __cuTexRefSetFilterMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetFilterMode')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2593_exception_handled;
            }
            __pyx_L2593_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2597_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3598
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefSetMipmapFilterMode
 *             __cuTexRefSetMipmapFilterMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetMipmapFilterMode')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3600
 *         try:
 *             global __cuTexRefSetMipmapFilterMode
 *             __cuTexRefSetMipmapFilterMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetMipmapFilterMode')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3600, __pyx_L2598_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3600, __pyx_L2598_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuTexRefSetMipmapFilterMode};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3600, __pyx_L2598_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuTexRefSetMipmapFilterMode};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3600, __pyx_L2598_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3600, __pyx_L2598_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexRefSetMipmapFilterMode);
                __Pyx_GIVEREF(__pyx_n_u_cuTexRefSetMipmapFilterMode);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuTexRefSetMipmapFilterMode);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3600, __pyx_L2598_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3600, __pyx_L2598_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapFilterMode = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3598
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefSetMipmapFilterMode
 *             __cuTexRefSetMipmapFilterMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetMipmapFilterMode')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2603_try_end;
            __pyx_L2598_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3601
 *             global __cuTexRefSetMipmapFilterMode
 *             __cuTexRefSetMipmapFilterMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetMipmapFilterMode')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2599_exception_handled;
            }
            __pyx_L2599_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2603_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3603
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefSetMipmapLevelBias
 *             __cuTexRefSetMipmapLevelBias = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetMipmapLevelBias')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3605
 *         try:
 *             global __cuTexRefSetMipmapLevelBias
 *             __cuTexRefSetMipmapLevelBias = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetMipmapLevelBias')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3605, __pyx_L2604_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3605, __pyx_L2604_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuTexRefSetMipmapLevelBias};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3605, __pyx_L2604_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuTexRefSetMipmapLevelBias};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3605, __pyx_L2604_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3605, __pyx_L2604_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexRefSetMipmapLevelBias);
                __Pyx_GIVEREF(__pyx_n_u_cuTexRefSetMipmapLevelBias);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuTexRefSetMipmapLevelBias);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3605, __pyx_L2604_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3605, __pyx_L2604_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapLevelBias = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3603
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefSetMipmapLevelBias
 *             __cuTexRefSetMipmapLevelBias = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetMipmapLevelBias')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2609_try_end;
            __pyx_L2604_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3606
 *             global __cuTexRefSetMipmapLevelBias
 *             __cuTexRefSetMipmapLevelBias = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetMipmapLevelBias')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2605_exception_handled;
            }
            __pyx_L2605_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2609_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3608
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefSetMipmapLevelClamp
 *             __cuTexRefSetMipmapLevelClamp = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetMipmapLevelClamp')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3610
 *         try:
 *             global __cuTexRefSetMipmapLevelClamp
 *             __cuTexRefSetMipmapLevelClamp = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetMipmapLevelClamp')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3610, __pyx_L2610_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3610, __pyx_L2610_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuTexRefSetMipmapLevelClamp};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3610, __pyx_L2610_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuTexRefSetMipmapLevelClamp};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3610, __pyx_L2610_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3610, __pyx_L2610_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexRefSetMipmapLevelClamp);
                __Pyx_GIVEREF(__pyx_n_u_cuTexRefSetMipmapLevelClamp);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuTexRefSetMipmapLevelClamp);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3610, __pyx_L2610_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3610, __pyx_L2610_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapLevelClamp = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3608
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefSetMipmapLevelClamp
 *             __cuTexRefSetMipmapLevelClamp = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetMipmapLevelClamp')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2615_try_end;
            __pyx_L2610_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3611
 *             global __cuTexRefSetMipmapLevelClamp
 *             __cuTexRefSetMipmapLevelClamp = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetMipmapLevelClamp')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2611_exception_handled;
            }
            __pyx_L2611_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2615_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3613
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefSetMaxAnisotropy
 *             __cuTexRefSetMaxAnisotropy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetMaxAnisotropy')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3615
 *         try:
 *             global __cuTexRefSetMaxAnisotropy
 *             __cuTexRefSetMaxAnisotropy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetMaxAnisotropy')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3615, __pyx_L2616_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3615, __pyx_L2616_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuTexRefSetMaxAnisotropy};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3615, __pyx_L2616_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuTexRefSetMaxAnisotropy};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3615, __pyx_L2616_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3615, __pyx_L2616_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexRefSetMaxAnisotropy);
                __Pyx_GIVEREF(__pyx_n_u_cuTexRefSetMaxAnisotropy);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuTexRefSetMaxAnisotropy);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3615, __pyx_L2616_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3615, __pyx_L2616_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMaxAnisotropy = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3613
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefSetMaxAnisotropy
 *             __cuTexRefSetMaxAnisotropy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetMaxAnisotropy')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2621_try_end;
            __pyx_L2616_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3616
 *             global __cuTexRefSetMaxAnisotropy
 *             __cuTexRefSetMaxAnisotropy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetMaxAnisotropy')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2617_exception_handled;
            }
            __pyx_L2617_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2621_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3618
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefSetBorderColor
 *             __cuTexRefSetBorderColor = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetBorderColor')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3620
 *         try:
 *             global __cuTexRefSetBorderColor
 *             __cuTexRefSetBorderColor = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetBorderColor')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3620, __pyx_L2622_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3620, __pyx_L2622_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuTexRefSetBorderColor};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3620, __pyx_L2622_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuTexRefSetBorderColor};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3620, __pyx_L2622_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3620, __pyx_L2622_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexRefSetBorderColor);
                __Pyx_GIVEREF(__pyx_n_u_cuTexRefSetBorderColor);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuTexRefSetBorderColor);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3620, __pyx_L2622_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3620, __pyx_L2622_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetBorderColor = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3618
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefSetBorderColor
 *             __cuTexRefSetBorderColor = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetBorderColor')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2627_try_end;
            __pyx_L2622_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3621
 *             global __cuTexRefSetBorderColor
 *             __cuTexRefSetBorderColor = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetBorderColor')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2623_exception_handled;
            }
            __pyx_L2623_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2627_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3623
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefSetFlags
 *             __cuTexRefSetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetFlags')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3625
 *         try:
 *             global __cuTexRefSetFlags
 *             __cuTexRefSetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetFlags')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3625, __pyx_L2628_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3625, __pyx_L2628_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuTexRefSetFlags};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3625, __pyx_L2628_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuTexRefSetFlags};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3625, __pyx_L2628_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3625, __pyx_L2628_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexRefSetFlags);
                __Pyx_GIVEREF(__pyx_n_u_cuTexRefSetFlags);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuTexRefSetFlags);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3625, __pyx_L2628_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3625, __pyx_L2628_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFlags = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3623
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefSetFlags
 *             __cuTexRefSetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetFlags')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2633_try_end;
            __pyx_L2628_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3626
 *             global __cuTexRefSetFlags
 *             __cuTexRefSetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetFlags')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2629_exception_handled;
            }
            __pyx_L2629_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2633_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3628
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefGetAddress_v2
 *             __cuTexRefGetAddress_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetAddress_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3630
 *         try:
 *             global __cuTexRefGetAddress_v2
 *             __cuTexRefGetAddress_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetAddress_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3630, __pyx_L2634_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3630, __pyx_L2634_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuTexRefGetAddress_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3630, __pyx_L2634_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuTexRefGetAddress_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3630, __pyx_L2634_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3630, __pyx_L2634_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexRefGetAddress_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuTexRefGetAddress_v2);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuTexRefGetAddress_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3630, __pyx_L2634_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3630, __pyx_L2634_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetAddress_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3628
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefGetAddress_v2
 *             __cuTexRefGetAddress_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetAddress_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2639_try_end;
            __pyx_L2634_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3631
 *             global __cuTexRefGetAddress_v2
 *             __cuTexRefGetAddress_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetAddress_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2635_exception_handled;
            }
            __pyx_L2635_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2639_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3633
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefGetArray
 *             __cuTexRefGetArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetArray')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3635
 *         try:
 *             global __cuTexRefGetArray
 *             __cuTexRefGetArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetArray')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3635, __pyx_L2640_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3635, __pyx_L2640_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuTexRefGetArray};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3635, __pyx_L2640_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuTexRefGetArray};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3635, __pyx_L2640_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3635, __pyx_L2640_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexRefGetArray);
                __Pyx_GIVEREF(__pyx_n_u_cuTexRefGetArray);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuTexRefGetArray);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3635, __pyx_L2640_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3635, __pyx_L2640_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetArray = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3633
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefGetArray
 *             __cuTexRefGetArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetArray')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2645_try_end;
            __pyx_L2640_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3636
 *             global __cuTexRefGetArray
 *             __cuTexRefGetArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetArray')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2641_exception_handled;
            }
            __pyx_L2641_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2645_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3638
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefGetMipmappedArray
 *             __cuTexRefGetMipmappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetMipmappedArray')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3640
 *         try:
 *             global __cuTexRefGetMipmappedArray
 *             __cuTexRefGetMipmappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetMipmappedArray')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3640, __pyx_L2646_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3640, __pyx_L2646_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuTexRefGetMipmappedArray};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3640, __pyx_L2646_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuTexRefGetMipmappedArray};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3640, __pyx_L2646_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3640, __pyx_L2646_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexRefGetMipmappedArray);
                __Pyx_GIVEREF(__pyx_n_u_cuTexRefGetMipmappedArray);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuTexRefGetMipmappedArray);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3640, __pyx_L2646_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3640, __pyx_L2646_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmappedArray = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3638
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefGetMipmappedArray
 *             __cuTexRefGetMipmappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetMipmappedArray')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2651_try_end;
            __pyx_L2646_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3641
 *             global __cuTexRefGetMipmappedArray
 *             __cuTexRefGetMipmappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetMipmappedArray')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2647_exception_handled;
            }
            __pyx_L2647_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2651_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3643
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefGetAddressMode
 *             __cuTexRefGetAddressMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetAddressMode')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3645
 *         try:
 *             global __cuTexRefGetAddressMode
 *             __cuTexRefGetAddressMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetAddressMode')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3645, __pyx_L2652_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3645, __pyx_L2652_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuTexRefGetAddressMode};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3645, __pyx_L2652_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuTexRefGetAddressMode};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3645, __pyx_L2652_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3645, __pyx_L2652_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexRefGetAddressMode);
                __Pyx_GIVEREF(__pyx_n_u_cuTexRefGetAddressMode);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuTexRefGetAddressMode);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3645, __pyx_L2652_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3645, __pyx_L2652_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetAddressMode = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3643
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefGetAddressMode
 *             __cuTexRefGetAddressMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetAddressMode')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2657_try_end;
            __pyx_L2652_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3646
 *             global __cuTexRefGetAddressMode
 *             __cuTexRefGetAddressMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetAddressMode')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2653_exception_handled;
            }
            __pyx_L2653_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2657_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3648
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefGetFilterMode
 *             __cuTexRefGetFilterMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetFilterMode')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3650
 *         try:
 *             global __cuTexRefGetFilterMode
 *             __cuTexRefGetFilterMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetFilterMode')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3650, __pyx_L2658_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3650, __pyx_L2658_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuTexRefGetFilterMode};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3650, __pyx_L2658_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuTexRefGetFilterMode};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3650, __pyx_L2658_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3650, __pyx_L2658_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexRefGetFilterMode);
                __Pyx_GIVEREF(__pyx_n_u_cuTexRefGetFilterMode);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuTexRefGetFilterMode);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3650, __pyx_L2658_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3650, __pyx_L2658_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFilterMode = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3648
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefGetFilterMode
 *             __cuTexRefGetFilterMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetFilterMode')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2663_try_end;
            __pyx_L2658_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3651
 *             global __cuTexRefGetFilterMode
 *             __cuTexRefGetFilterMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetFilterMode')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2659_exception_handled;
            }
            __pyx_L2659_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2663_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3653
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefGetFormat
 *             __cuTexRefGetFormat = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetFormat')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3655
 *         try:
 *             global __cuTexRefGetFormat
 *             __cuTexRefGetFormat = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetFormat')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3655, __pyx_L2664_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3655, __pyx_L2664_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuTexRefGetFormat};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3655, __pyx_L2664_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuTexRefGetFormat};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3655, __pyx_L2664_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3655, __pyx_L2664_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexRefGetFormat);
                __Pyx_GIVEREF(__pyx_n_u_cuTexRefGetFormat);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuTexRefGetFormat);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3655, __pyx_L2664_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3655, __pyx_L2664_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFormat = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3653
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefGetFormat
 *             __cuTexRefGetFormat = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetFormat')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2669_try_end;
            __pyx_L2664_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3656
 *             global __cuTexRefGetFormat
 *             __cuTexRefGetFormat = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetFormat')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2665_exception_handled;
            }
            __pyx_L2665_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2669_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3658
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefGetMipmapFilterMode
 *             __cuTexRefGetMipmapFilterMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetMipmapFilterMode')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3660
 *         try:
 *             global __cuTexRefGetMipmapFilterMode
 *             __cuTexRefGetMipmapFilterMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetMipmapFilterMode')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3660, __pyx_L2670_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3660, __pyx_L2670_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuTexRefGetMipmapFilterMode};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3660, __pyx_L2670_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuTexRefGetMipmapFilterMode};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3660, __pyx_L2670_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3660, __pyx_L2670_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexRefGetMipmapFilterMode);
                __Pyx_GIVEREF(__pyx_n_u_cuTexRefGetMipmapFilterMode);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuTexRefGetMipmapFilterMode);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3660, __pyx_L2670_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3660, __pyx_L2670_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapFilterMode = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3658
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefGetMipmapFilterMode
 *             __cuTexRefGetMipmapFilterMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetMipmapFilterMode')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2675_try_end;
            __pyx_L2670_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3661
 *             global __cuTexRefGetMipmapFilterMode
 *             __cuTexRefGetMipmapFilterMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetMipmapFilterMode')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2671_exception_handled;
            }
            __pyx_L2671_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2675_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3663
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefGetMipmapLevelBias
 *             __cuTexRefGetMipmapLevelBias = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetMipmapLevelBias')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3665
 *         try:
 *             global __cuTexRefGetMipmapLevelBias
 *             __cuTexRefGetMipmapLevelBias = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetMipmapLevelBias')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3665, __pyx_L2676_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3665, __pyx_L2676_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuTexRefGetMipmapLevelBias};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3665, __pyx_L2676_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuTexRefGetMipmapLevelBias};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3665, __pyx_L2676_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3665, __pyx_L2676_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexRefGetMipmapLevelBias);
                __Pyx_GIVEREF(__pyx_n_u_cuTexRefGetMipmapLevelBias);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuTexRefGetMipmapLevelBias);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3665, __pyx_L2676_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3665, __pyx_L2676_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapLevelBias = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3663
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefGetMipmapLevelBias
 *             __cuTexRefGetMipmapLevelBias = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetMipmapLevelBias')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2681_try_end;
            __pyx_L2676_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3666
 *             global __cuTexRefGetMipmapLevelBias
 *             __cuTexRefGetMipmapLevelBias = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetMipmapLevelBias')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2677_exception_handled;
            }
            __pyx_L2677_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2681_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3668
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefGetMipmapLevelClamp
 *             __cuTexRefGetMipmapLevelClamp = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetMipmapLevelClamp')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3670
 *         try:
 *             global __cuTexRefGetMipmapLevelClamp
 *             __cuTexRefGetMipmapLevelClamp = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetMipmapLevelClamp')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3670, __pyx_L2682_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3670, __pyx_L2682_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuTexRefGetMipmapLevelClamp};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3670, __pyx_L2682_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuTexRefGetMipmapLevelClamp};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3670, __pyx_L2682_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3670, __pyx_L2682_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexRefGetMipmapLevelClamp);
                __Pyx_GIVEREF(__pyx_n_u_cuTexRefGetMipmapLevelClamp);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuTexRefGetMipmapLevelClamp);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3670, __pyx_L2682_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3670, __pyx_L2682_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapLevelClamp = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3668
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefGetMipmapLevelClamp
 *             __cuTexRefGetMipmapLevelClamp = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetMipmapLevelClamp')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2687_try_end;
            __pyx_L2682_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3671
 *             global __cuTexRefGetMipmapLevelClamp
 *             __cuTexRefGetMipmapLevelClamp = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetMipmapLevelClamp')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2683_exception_handled;
            }
            __pyx_L2683_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2687_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3673
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefGetMaxAnisotropy
 *             __cuTexRefGetMaxAnisotropy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetMaxAnisotropy')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3675
 *         try:
 *             global __cuTexRefGetMaxAnisotropy
 *             __cuTexRefGetMaxAnisotropy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetMaxAnisotropy')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3675, __pyx_L2688_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3675, __pyx_L2688_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuTexRefGetMaxAnisotropy};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3675, __pyx_L2688_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuTexRefGetMaxAnisotropy};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3675, __pyx_L2688_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3675, __pyx_L2688_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexRefGetMaxAnisotropy);
                __Pyx_GIVEREF(__pyx_n_u_cuTexRefGetMaxAnisotropy);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuTexRefGetMaxAnisotropy);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3675, __pyx_L2688_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3675, __pyx_L2688_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMaxAnisotropy = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3673
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefGetMaxAnisotropy
 *             __cuTexRefGetMaxAnisotropy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetMaxAnisotropy')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2693_try_end;
            __pyx_L2688_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3676
 *             global __cuTexRefGetMaxAnisotropy
 *             __cuTexRefGetMaxAnisotropy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetMaxAnisotropy')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2689_exception_handled;
            }
            __pyx_L2689_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2693_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3678
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefGetBorderColor
 *             __cuTexRefGetBorderColor = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetBorderColor')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3680
 *         try:
 *             global __cuTexRefGetBorderColor
 *             __cuTexRefGetBorderColor = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetBorderColor')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3680, __pyx_L2694_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3680, __pyx_L2694_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuTexRefGetBorderColor};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3680, __pyx_L2694_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuTexRefGetBorderColor};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3680, __pyx_L2694_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3680, __pyx_L2694_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexRefGetBorderColor);
                __Pyx_GIVEREF(__pyx_n_u_cuTexRefGetBorderColor);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuTexRefGetBorderColor);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3680, __pyx_L2694_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3680, __pyx_L2694_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetBorderColor = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3678
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefGetBorderColor
 *             __cuTexRefGetBorderColor = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetBorderColor')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2699_try_end;
            __pyx_L2694_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3681
 *             global __cuTexRefGetBorderColor
 *             __cuTexRefGetBorderColor = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetBorderColor')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2695_exception_handled;
            }
            __pyx_L2695_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2699_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3683
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefGetFlags
 *             __cuTexRefGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetFlags')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3685
 *         try:
 *             global __cuTexRefGetFlags
 *             __cuTexRefGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetFlags')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3685, __pyx_L2700_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3685, __pyx_L2700_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuTexRefGetFlags};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3685, __pyx_L2700_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuTexRefGetFlags};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3685, __pyx_L2700_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3685, __pyx_L2700_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexRefGetFlags);
                __Pyx_GIVEREF(__pyx_n_u_cuTexRefGetFlags);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuTexRefGetFlags);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3685, __pyx_L2700_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3685, __pyx_L2700_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFlags = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3683
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefGetFlags
 *             __cuTexRefGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetFlags')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2705_try_end;
            __pyx_L2700_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3686
 *             global __cuTexRefGetFlags
 *             __cuTexRefGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetFlags')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2701_exception_handled;
            }
            __pyx_L2701_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2705_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3688
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefCreate
 *             __cuTexRefCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefCreate')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3690
 *         try:
 *             global __cuTexRefCreate
 *             __cuTexRefCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefCreate')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3690, __pyx_L2706_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3690, __pyx_L2706_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuTexRefCreate};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3690, __pyx_L2706_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuTexRefCreate};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3690, __pyx_L2706_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3690, __pyx_L2706_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexRefCreate);
                __Pyx_GIVEREF(__pyx_n_u_cuTexRefCreate);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuTexRefCreate);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3690, __pyx_L2706_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3690, __pyx_L2706_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefCreate = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3688
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefCreate
 *             __cuTexRefCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefCreate')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2711_try_end;
            __pyx_L2706_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3691
 *             global __cuTexRefCreate
 *             __cuTexRefCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefCreate')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2707_exception_handled;
            }
            __pyx_L2707_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2711_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3693
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefDestroy
 *             __cuTexRefDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefDestroy')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3695
 *         try:
 *             global __cuTexRefDestroy
 *             __cuTexRefDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefDestroy')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3695, __pyx_L2712_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3695, __pyx_L2712_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuTexRefDestroy};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3695, __pyx_L2712_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuTexRefDestroy};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3695, __pyx_L2712_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3695, __pyx_L2712_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexRefDestroy);
                __Pyx_GIVEREF(__pyx_n_u_cuTexRefDestroy);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuTexRefDestroy);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3695, __pyx_L2712_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3695, __pyx_L2712_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefDestroy = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3693
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexRefDestroy
 *             __cuTexRefDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefDestroy')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2717_try_end;
            __pyx_L2712_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3696
 *             global __cuTexRefDestroy
 *             __cuTexRefDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefDestroy')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2713_exception_handled;
            }
            __pyx_L2713_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2717_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3698
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuSurfRefSetArray
 *             __cuSurfRefSetArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSurfRefSetArray')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3700
 *         try:
 *             global __cuSurfRefSetArray
 *             __cuSurfRefSetArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSurfRefSetArray')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3700, __pyx_L2718_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3700, __pyx_L2718_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuSurfRefSetArray};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3700, __pyx_L2718_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuSurfRefSetArray};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3700, __pyx_L2718_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3700, __pyx_L2718_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuSurfRefSetArray);
                __Pyx_GIVEREF(__pyx_n_u_cuSurfRefSetArray);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuSurfRefSetArray);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3700, __pyx_L2718_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3700, __pyx_L2718_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuSurfRefSetArray = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3698
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuSurfRefSetArray
 *             __cuSurfRefSetArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSurfRefSetArray')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2723_try_end;
            __pyx_L2718_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3701
 *             global __cuSurfRefSetArray
 *             __cuSurfRefSetArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSurfRefSetArray')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2719_exception_handled;
            }
            __pyx_L2719_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2723_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3703
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuSurfRefGetArray
 *             __cuSurfRefGetArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSurfRefGetArray')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3705
 *         try:
 *             global __cuSurfRefGetArray
 *             __cuSurfRefGetArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSurfRefGetArray')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3705, __pyx_L2724_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3705, __pyx_L2724_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuSurfRefGetArray};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3705, __pyx_L2724_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuSurfRefGetArray};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3705, __pyx_L2724_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3705, __pyx_L2724_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuSurfRefGetArray);
                __Pyx_GIVEREF(__pyx_n_u_cuSurfRefGetArray);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuSurfRefGetArray);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3705, __pyx_L2724_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3705, __pyx_L2724_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuSurfRefGetArray = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3703
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuSurfRefGetArray
 *             __cuSurfRefGetArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSurfRefGetArray')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2729_try_end;
            __pyx_L2724_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3706
 *             global __cuSurfRefGetArray
 *             __cuSurfRefGetArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSurfRefGetArray')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2725_exception_handled;
            }
            __pyx_L2725_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2729_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3708
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexObjectCreate
 *             __cuTexObjectCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexObjectCreate')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3710
 *         try:
 *             global __cuTexObjectCreate
 *             __cuTexObjectCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexObjectCreate')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3710, __pyx_L2730_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3710, __pyx_L2730_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuTexObjectCreate};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3710, __pyx_L2730_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuTexObjectCreate};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3710, __pyx_L2730_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3710, __pyx_L2730_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexObjectCreate);
                __Pyx_GIVEREF(__pyx_n_u_cuTexObjectCreate);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuTexObjectCreate);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3710, __pyx_L2730_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3710, __pyx_L2730_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectCreate = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3708
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexObjectCreate
 *             __cuTexObjectCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexObjectCreate')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2735_try_end;
            __pyx_L2730_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3711
 *             global __cuTexObjectCreate
 *             __cuTexObjectCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexObjectCreate')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2731_exception_handled;
            }
            __pyx_L2731_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2735_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3713
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexObjectDestroy
 *             __cuTexObjectDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexObjectDestroy')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3715
 *         try:
 *             global __cuTexObjectDestroy
 *             __cuTexObjectDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexObjectDestroy')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3715, __pyx_L2736_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3715, __pyx_L2736_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuTexObjectDestroy};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3715, __pyx_L2736_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuTexObjectDestroy};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3715, __pyx_L2736_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3715, __pyx_L2736_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexObjectDestroy);
                __Pyx_GIVEREF(__pyx_n_u_cuTexObjectDestroy);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuTexObjectDestroy);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3715, __pyx_L2736_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3715, __pyx_L2736_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectDestroy = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3713
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexObjectDestroy
 *             __cuTexObjectDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexObjectDestroy')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2741_try_end;
            __pyx_L2736_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3716
 *             global __cuTexObjectDestroy
 *             __cuTexObjectDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexObjectDestroy')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2737_exception_handled;
            }
            __pyx_L2737_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2741_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3718
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexObjectGetResourceDesc
 *             __cuTexObjectGetResourceDesc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexObjectGetResourceDesc')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3720
 *         try:
 *             global __cuTexObjectGetResourceDesc
 *             __cuTexObjectGetResourceDesc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexObjectGetResourceDesc')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3720, __pyx_L2742_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3720, __pyx_L2742_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuTexObjectGetResourceDesc};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3720, __pyx_L2742_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuTexObjectGetResourceDesc};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3720, __pyx_L2742_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3720, __pyx_L2742_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexObjectGetResourceDesc);
                __Pyx_GIVEREF(__pyx_n_u_cuTexObjectGetResourceDesc);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuTexObjectGetResourceDesc);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3720, __pyx_L2742_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3720, __pyx_L2742_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetResourceDesc = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3718
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexObjectGetResourceDesc
 *             __cuTexObjectGetResourceDesc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexObjectGetResourceDesc')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2747_try_end;
            __pyx_L2742_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3721
 *             global __cuTexObjectGetResourceDesc
 *             __cuTexObjectGetResourceDesc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexObjectGetResourceDesc')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2743_exception_handled;
            }
            __pyx_L2743_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2747_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3723
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexObjectGetTextureDesc
 *             __cuTexObjectGetTextureDesc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexObjectGetTextureDesc')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3725
 *         try:
 *             global __cuTexObjectGetTextureDesc
 *             __cuTexObjectGetTextureDesc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexObjectGetTextureDesc')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3725, __pyx_L2748_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3725, __pyx_L2748_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuTexObjectGetTextureDesc};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3725, __pyx_L2748_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuTexObjectGetTextureDesc};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3725, __pyx_L2748_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3725, __pyx_L2748_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexObjectGetTextureDesc);
                __Pyx_GIVEREF(__pyx_n_u_cuTexObjectGetTextureDesc);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuTexObjectGetTextureDesc);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3725, __pyx_L2748_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3725, __pyx_L2748_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetTextureDesc = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3723
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexObjectGetTextureDesc
 *             __cuTexObjectGetTextureDesc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexObjectGetTextureDesc')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2753_try_end;
            __pyx_L2748_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3726
 *             global __cuTexObjectGetTextureDesc
 *             __cuTexObjectGetTextureDesc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexObjectGetTextureDesc')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2749_exception_handled;
            }
            __pyx_L2749_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2753_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3728
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexObjectGetResourceViewDesc
 *             __cuTexObjectGetResourceViewDesc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexObjectGetResourceViewDesc')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3730
 *         try:
 *             global __cuTexObjectGetResourceViewDesc
 *             __cuTexObjectGetResourceViewDesc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexObjectGetResourceViewDesc')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3730, __pyx_L2754_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3730, __pyx_L2754_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuTexObjectGetResourceViewDesc};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3730, __pyx_L2754_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuTexObjectGetResourceViewDesc};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3730, __pyx_L2754_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3730, __pyx_L2754_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTexObjectGetResourceViewDesc);
                __Pyx_GIVEREF(__pyx_n_u_cuTexObjectGetResourceViewDesc);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuTexObjectGetResourceViewDesc);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3730, __pyx_L2754_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3730, __pyx_L2754_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetResourceViewDesc = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3728
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTexObjectGetResourceViewDesc
 *             __cuTexObjectGetResourceViewDesc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexObjectGetResourceViewDesc')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2759_try_end;
            __pyx_L2754_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3731
 *             global __cuTexObjectGetResourceViewDesc
 *             __cuTexObjectGetResourceViewDesc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexObjectGetResourceViewDesc')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2755_exception_handled;
            }
            __pyx_L2755_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2759_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3733
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuSurfObjectCreate
 *             __cuSurfObjectCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSurfObjectCreate')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3735
 *         try:
 *             global __cuSurfObjectCreate
 *             __cuSurfObjectCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSurfObjectCreate')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3735, __pyx_L2760_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3735, __pyx_L2760_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuSurfObjectCreate};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3735, __pyx_L2760_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuSurfObjectCreate};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3735, __pyx_L2760_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3735, __pyx_L2760_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuSurfObjectCreate);
                __Pyx_GIVEREF(__pyx_n_u_cuSurfObjectCreate);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuSurfObjectCreate);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3735, __pyx_L2760_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3735, __pyx_L2760_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectCreate = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3733
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuSurfObjectCreate
 *             __cuSurfObjectCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSurfObjectCreate')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2765_try_end;
            __pyx_L2760_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3736
 *             global __cuSurfObjectCreate
 *             __cuSurfObjectCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSurfObjectCreate')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2761_exception_handled;
            }
            __pyx_L2761_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2765_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3738
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuSurfObjectDestroy
 *             __cuSurfObjectDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSurfObjectDestroy')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3740
 *         try:
 *             global __cuSurfObjectDestroy
 *             __cuSurfObjectDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSurfObjectDestroy')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3740, __pyx_L2766_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3740, __pyx_L2766_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuSurfObjectDestroy};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3740, __pyx_L2766_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuSurfObjectDestroy};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3740, __pyx_L2766_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3740, __pyx_L2766_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuSurfObjectDestroy);
                __Pyx_GIVEREF(__pyx_n_u_cuSurfObjectDestroy);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuSurfObjectDestroy);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3740, __pyx_L2766_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3740, __pyx_L2766_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectDestroy = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3738
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuSurfObjectDestroy
 *             __cuSurfObjectDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSurfObjectDestroy')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2771_try_end;
            __pyx_L2766_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3741
 *             global __cuSurfObjectDestroy
 *             __cuSurfObjectDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSurfObjectDestroy')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2767_exception_handled;
            }
            __pyx_L2767_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2771_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3743
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuSurfObjectGetResourceDesc
 *             __cuSurfObjectGetResourceDesc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSurfObjectGetResourceDesc')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3745
 *         try:
 *             global __cuSurfObjectGetResourceDesc
 *             __cuSurfObjectGetResourceDesc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSurfObjectGetResourceDesc')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3745, __pyx_L2772_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3745, __pyx_L2772_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuSurfObjectGetResourceDesc};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3745, __pyx_L2772_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuSurfObjectGetResourceDesc};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3745, __pyx_L2772_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3745, __pyx_L2772_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuSurfObjectGetResourceDesc);
                __Pyx_GIVEREF(__pyx_n_u_cuSurfObjectGetResourceDesc);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuSurfObjectGetResourceDesc);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3745, __pyx_L2772_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3745, __pyx_L2772_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectGetResourceDesc = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3743
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuSurfObjectGetResourceDesc
 *             __cuSurfObjectGetResourceDesc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSurfObjectGetResourceDesc')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2777_try_end;
            __pyx_L2772_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3746
 *             global __cuSurfObjectGetResourceDesc
 *             __cuSurfObjectGetResourceDesc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSurfObjectGetResourceDesc')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2773_exception_handled;
            }
            __pyx_L2773_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2777_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3748
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTensorMapEncodeTiled
 *             __cuTensorMapEncodeTiled = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTensorMapEncodeTiled')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3750
 *         try:
 *             global __cuTensorMapEncodeTiled
 *             __cuTensorMapEncodeTiled = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTensorMapEncodeTiled')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3750, __pyx_L2778_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3750, __pyx_L2778_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuTensorMapEncodeTiled};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3750, __pyx_L2778_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuTensorMapEncodeTiled};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3750, __pyx_L2778_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3750, __pyx_L2778_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTensorMapEncodeTiled);
                __Pyx_GIVEREF(__pyx_n_u_cuTensorMapEncodeTiled);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuTensorMapEncodeTiled);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3750, __pyx_L2778_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3750, __pyx_L2778_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTensorMapEncodeTiled = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3748
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTensorMapEncodeTiled
 *             __cuTensorMapEncodeTiled = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTensorMapEncodeTiled')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2783_try_end;
            __pyx_L2778_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3751
 *             global __cuTensorMapEncodeTiled
 *             __cuTensorMapEncodeTiled = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTensorMapEncodeTiled')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2779_exception_handled;
            }
            __pyx_L2779_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2783_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3753
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTensorMapEncodeIm2col
 *             __cuTensorMapEncodeIm2col = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTensorMapEncodeIm2col')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3755
 *         try:
 *             global __cuTensorMapEncodeIm2col
 *             __cuTensorMapEncodeIm2col = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTensorMapEncodeIm2col')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3755, __pyx_L2784_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3755, __pyx_L2784_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuTensorMapEncodeIm2col};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3755, __pyx_L2784_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuTensorMapEncodeIm2col};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3755, __pyx_L2784_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3755, __pyx_L2784_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTensorMapEncodeIm2col);
                __Pyx_GIVEREF(__pyx_n_u_cuTensorMapEncodeIm2col);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuTensorMapEncodeIm2col);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3755, __pyx_L2784_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3755, __pyx_L2784_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTensorMapEncodeIm2col = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3753
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTensorMapEncodeIm2col
 *             __cuTensorMapEncodeIm2col = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTensorMapEncodeIm2col')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2789_try_end;
            __pyx_L2784_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3756
 *             global __cuTensorMapEncodeIm2col
 *             __cuTensorMapEncodeIm2col = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTensorMapEncodeIm2col')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2785_exception_handled;
            }
            __pyx_L2785_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2789_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3758
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTensorMapReplaceAddress
 *             __cuTensorMapReplaceAddress = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTensorMapReplaceAddress')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3760
 *         try:
 *             global __cuTensorMapReplaceAddress
 *             __cuTensorMapReplaceAddress = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTensorMapReplaceAddress')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3760, __pyx_L2790_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3760, __pyx_L2790_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuTensorMapReplaceAddress};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3760, __pyx_L2790_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuTensorMapReplaceAddress};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3760, __pyx_L2790_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3760, __pyx_L2790_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuTensorMapReplaceAddress);
                __Pyx_GIVEREF(__pyx_n_u_cuTensorMapReplaceAddress);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuTensorMapReplaceAddress);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3760, __pyx_L2790_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3760, __pyx_L2790_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuTensorMapReplaceAddress = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3758
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuTensorMapReplaceAddress
 *             __cuTensorMapReplaceAddress = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTensorMapReplaceAddress')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2795_try_end;
            __pyx_L2790_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3761
 *             global __cuTensorMapReplaceAddress
 *             __cuTensorMapReplaceAddress = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTensorMapReplaceAddress')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2791_exception_handled;
            }
            __pyx_L2791_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2795_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3763
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceCanAccessPeer
 *             __cuDeviceCanAccessPeer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceCanAccessPeer')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3765
 *         try:
 *             global __cuDeviceCanAccessPeer
 *             __cuDeviceCanAccessPeer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceCanAccessPeer')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3765, __pyx_L2796_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3765, __pyx_L2796_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuDeviceCanAccessPeer};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3765, __pyx_L2796_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuDeviceCanAccessPeer};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3765, __pyx_L2796_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3765, __pyx_L2796_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDeviceCanAccessPeer);
                __Pyx_GIVEREF(__pyx_n_u_cuDeviceCanAccessPeer);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuDeviceCanAccessPeer);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3765, __pyx_L2796_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3765, __pyx_L2796_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceCanAccessPeer = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3763
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceCanAccessPeer
 *             __cuDeviceCanAccessPeer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceCanAccessPeer')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2801_try_end;
            __pyx_L2796_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3766
 *             global __cuDeviceCanAccessPeer
 *             __cuDeviceCanAccessPeer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceCanAccessPeer')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2797_exception_handled;
            }
            __pyx_L2797_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2801_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3768
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxEnablePeerAccess
 *             __cuCtxEnablePeerAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxEnablePeerAccess')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3770
 *         try:
 *             global __cuCtxEnablePeerAccess
 *             __cuCtxEnablePeerAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxEnablePeerAccess')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3770, __pyx_L2802_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3770, __pyx_L2802_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuCtxEnablePeerAccess};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3770, __pyx_L2802_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuCtxEnablePeerAccess};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3770, __pyx_L2802_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3770, __pyx_L2802_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCtxEnablePeerAccess);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxEnablePeerAccess);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuCtxEnablePeerAccess);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3770, __pyx_L2802_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3770, __pyx_L2802_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCtxEnablePeerAccess = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3768
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxEnablePeerAccess
 *             __cuCtxEnablePeerAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxEnablePeerAccess')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2807_try_end;
            __pyx_L2802_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3771
 *             global __cuCtxEnablePeerAccess
 *             __cuCtxEnablePeerAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxEnablePeerAccess')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2803_exception_handled;
            }
            __pyx_L2803_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2807_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3773
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxDisablePeerAccess
 *             __cuCtxDisablePeerAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxDisablePeerAccess')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3775
 *         try:
 *             global __cuCtxDisablePeerAccess
 *             __cuCtxDisablePeerAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxDisablePeerAccess')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3775, __pyx_L2808_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3775, __pyx_L2808_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuCtxDisablePeerAccess};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3775, __pyx_L2808_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuCtxDisablePeerAccess};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3775, __pyx_L2808_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3775, __pyx_L2808_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCtxDisablePeerAccess);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxDisablePeerAccess);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuCtxDisablePeerAccess);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3775, __pyx_L2808_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3775, __pyx_L2808_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCtxDisablePeerAccess = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3773
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxDisablePeerAccess
 *             __cuCtxDisablePeerAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxDisablePeerAccess')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2813_try_end;
            __pyx_L2808_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3776
 *             global __cuCtxDisablePeerAccess
 *             __cuCtxDisablePeerAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxDisablePeerAccess')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2809_exception_handled;
            }
            __pyx_L2809_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2813_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3778
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetP2PAttribute
 *             __cuDeviceGetP2PAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetP2PAttribute')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3780
 *         try:
 *             global __cuDeviceGetP2PAttribute
 *             __cuDeviceGetP2PAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetP2PAttribute')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3780, __pyx_L2814_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3780, __pyx_L2814_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuDeviceGetP2PAttribute};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3780, __pyx_L2814_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuDeviceGetP2PAttribute};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3780, __pyx_L2814_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3780, __pyx_L2814_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuDeviceGetP2PAttribute);
                __Pyx_GIVEREF(__pyx_n_u_cuDeviceGetP2PAttribute);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuDeviceGetP2PAttribute);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3780, __pyx_L2814_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3780, __pyx_L2814_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetP2PAttribute = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3778
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetP2PAttribute
 *             __cuDeviceGetP2PAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetP2PAttribute')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2819_try_end;
            __pyx_L2814_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3781
 *             global __cuDeviceGetP2PAttribute
 *             __cuDeviceGetP2PAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetP2PAttribute')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2815_exception_handled;
            }
            __pyx_L2815_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2819_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3783
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsUnregisterResource
 *             __cuGraphicsUnregisterResource = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsUnregisterResource')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3785
 *         try:
 *             global __cuGraphicsUnregisterResource
 *             __cuGraphicsUnregisterResource = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsUnregisterResource')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3785, __pyx_L2820_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3785, __pyx_L2820_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphicsUnregisterResource};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3785, __pyx_L2820_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphicsUnregisterResource};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3785, __pyx_L2820_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3785, __pyx_L2820_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphicsUnregisterResource);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphicsUnregisterResource);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphicsUnregisterResource);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3785, __pyx_L2820_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3785, __pyx_L2820_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsUnregisterResource = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3783
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsUnregisterResource
 *             __cuGraphicsUnregisterResource = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsUnregisterResource')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2825_try_end;
            __pyx_L2820_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3786
 *             global __cuGraphicsUnregisterResource
 *             __cuGraphicsUnregisterResource = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsUnregisterResource')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2821_exception_handled;
            }
            __pyx_L2821_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2825_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3788
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsSubResourceGetMappedArray
 *             __cuGraphicsSubResourceGetMappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsSubResourceGetMappedArray')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3790
 *         try:
 *             global __cuGraphicsSubResourceGetMappedArray
 *             __cuGraphicsSubResourceGetMappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsSubResourceGetMappedArray')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3790, __pyx_L2826_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3790, __pyx_L2826_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphicsSubResourceGetMappedAr};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3790, __pyx_L2826_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphicsSubResourceGetMappedAr};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3790, __pyx_L2826_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3790, __pyx_L2826_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphicsSubResourceGetMappedAr);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphicsSubResourceGetMappedAr);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphicsSubResourceGetMappedAr);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3790, __pyx_L2826_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3790, __pyx_L2826_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsSubResourceGetMappedArray = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3788
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsSubResourceGetMappedArray
 *             __cuGraphicsSubResourceGetMappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsSubResourceGetMappedArray')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2831_try_end;
            __pyx_L2826_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3791
 *             global __cuGraphicsSubResourceGetMappedArray
 *             __cuGraphicsSubResourceGetMappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsSubResourceGetMappedArray')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2827_exception_handled;
            }
            __pyx_L2827_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2831_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3793
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsResourceGetMappedMipmappedArray
 *             __cuGraphicsResourceGetMappedMipmappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsResourceGetMappedMipmappedArray')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3795
 *         try:
 *             global __cuGraphicsResourceGetMappedMipmappedArray
 *             __cuGraphicsResourceGetMappedMipmappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsResourceGetMappedMipmappedArray')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3795, __pyx_L2832_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3795, __pyx_L2832_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphicsResourceGetMappedMipma};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3795, __pyx_L2832_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphicsResourceGetMappedMipma};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3795, __pyx_L2832_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3795, __pyx_L2832_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphicsResourceGetMappedMipma);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphicsResourceGetMappedMipma);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphicsResourceGetMappedMipma);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3795, __pyx_L2832_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3795, __pyx_L2832_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceGetMappedMipmappedArray = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3793
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsResourceGetMappedMipmappedArray
 *             __cuGraphicsResourceGetMappedMipmappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsResourceGetMappedMipmappedArray')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2837_try_end;
            __pyx_L2832_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3796
 *             global __cuGraphicsResourceGetMappedMipmappedArray
 *             __cuGraphicsResourceGetMappedMipmappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsResourceGetMappedMipmappedArray')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2833_exception_handled;
            }
            __pyx_L2833_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2837_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3798
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsResourceGetMappedPointer_v2
 *             __cuGraphicsResourceGetMappedPointer_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsResourceGetMappedPointer_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3800
 *         try:
 *             global __cuGraphicsResourceGetMappedPointer_v2
 *             __cuGraphicsResourceGetMappedPointer_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsResourceGetMappedPointer_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3800, __pyx_L2838_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3800, __pyx_L2838_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphicsResourceGetMappedPoint};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3800, __pyx_L2838_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphicsResourceGetMappedPoint};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3800, __pyx_L2838_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3800, __pyx_L2838_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphicsResourceGetMappedPoint);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphicsResourceGetMappedPoint);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphicsResourceGetMappedPoint);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3800, __pyx_L2838_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3800, __pyx_L2838_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceGetMappedPointer_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3798
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsResourceGetMappedPointer_v2
 *             __cuGraphicsResourceGetMappedPointer_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsResourceGetMappedPointer_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2843_try_end;
            __pyx_L2838_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3801
 *             global __cuGraphicsResourceGetMappedPointer_v2
 *             __cuGraphicsResourceGetMappedPointer_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsResourceGetMappedPointer_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2839_exception_handled;
            }
            __pyx_L2839_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2843_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3803
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsResourceSetMapFlags_v2
 *             __cuGraphicsResourceSetMapFlags_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsResourceSetMapFlags_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3805
 *         try:
 *             global __cuGraphicsResourceSetMapFlags_v2
 *             __cuGraphicsResourceSetMapFlags_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsResourceSetMapFlags_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3805, __pyx_L2844_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3805, __pyx_L2844_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphicsResourceSetMapFlags_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3805, __pyx_L2844_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphicsResourceSetMapFlags_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3805, __pyx_L2844_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3805, __pyx_L2844_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphicsResourceSetMapFlags_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphicsResourceSetMapFlags_v2);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphicsResourceSetMapFlags_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3805, __pyx_L2844_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3805, __pyx_L2844_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceSetMapFlags_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3803
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsResourceSetMapFlags_v2
 *             __cuGraphicsResourceSetMapFlags_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsResourceSetMapFlags_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2849_try_end;
            __pyx_L2844_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3806
 *             global __cuGraphicsResourceSetMapFlags_v2
 *             __cuGraphicsResourceSetMapFlags_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsResourceSetMapFlags_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2845_exception_handled;
            }
            __pyx_L2845_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2849_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3808
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGetProcAddress_v2
 *             __cuGetProcAddress_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetProcAddress_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3810
 *         try:
 *             global __cuGetProcAddress_v2
 *             __cuGetProcAddress_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetProcAddress_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3810, __pyx_L2850_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3810, __pyx_L2850_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGetProcAddress_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3810, __pyx_L2850_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGetProcAddress_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3810, __pyx_L2850_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3810, __pyx_L2850_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGetProcAddress_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuGetProcAddress_v2);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGetProcAddress_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3810, __pyx_L2850_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3810, __pyx_L2850_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGetProcAddress_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3808
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGetProcAddress_v2
 *             __cuGetProcAddress_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetProcAddress_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2855_try_end;
            __pyx_L2850_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3811
 *             global __cuGetProcAddress_v2
 *             __cuGetProcAddress_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetProcAddress_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2851_exception_handled;
            }
            __pyx_L2851_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2855_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3813
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCoredumpGetAttribute
 *             __cuCoredumpGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCoredumpGetAttribute')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3815
 *         try:
 *             global __cuCoredumpGetAttribute
 *             __cuCoredumpGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCoredumpGetAttribute')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3815, __pyx_L2856_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3815, __pyx_L2856_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuCoredumpGetAttribute};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3815, __pyx_L2856_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuCoredumpGetAttribute};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3815, __pyx_L2856_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3815, __pyx_L2856_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCoredumpGetAttribute);
                __Pyx_GIVEREF(__pyx_n_u_cuCoredumpGetAttribute);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuCoredumpGetAttribute);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3815, __pyx_L2856_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3815, __pyx_L2856_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCoredumpGetAttribute = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3813
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCoredumpGetAttribute
 *             __cuCoredumpGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCoredumpGetAttribute')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2861_try_end;
            __pyx_L2856_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3816
 *             global __cuCoredumpGetAttribute
 *             __cuCoredumpGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCoredumpGetAttribute')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2857_exception_handled;
            }
            __pyx_L2857_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2861_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3818
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCoredumpGetAttributeGlobal
 *             __cuCoredumpGetAttributeGlobal = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCoredumpGetAttributeGlobal')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3820
 *         try:
 *             global __cuCoredumpGetAttributeGlobal
 *             __cuCoredumpGetAttributeGlobal = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCoredumpGetAttributeGlobal')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3820, __pyx_L2862_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3820, __pyx_L2862_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuCoredumpGetAttributeGlobal};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3820, __pyx_L2862_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuCoredumpGetAttributeGlobal};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3820, __pyx_L2862_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3820, __pyx_L2862_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCoredumpGetAttributeGlobal);
                __Pyx_GIVEREF(__pyx_n_u_cuCoredumpGetAttributeGlobal);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuCoredumpGetAttributeGlobal);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3820, __pyx_L2862_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3820, __pyx_L2862_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCoredumpGetAttributeGlobal = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3818
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCoredumpGetAttributeGlobal
 *             __cuCoredumpGetAttributeGlobal = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCoredumpGetAttributeGlobal')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2867_try_end;
            __pyx_L2862_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3821
 *             global __cuCoredumpGetAttributeGlobal
 *             __cuCoredumpGetAttributeGlobal = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCoredumpGetAttributeGlobal')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2863_exception_handled;
            }
            __pyx_L2863_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2867_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3823
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCoredumpSetAttribute
 *             __cuCoredumpSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCoredumpSetAttribute')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3825
 *         try:
 *             global __cuCoredumpSetAttribute
 *             __cuCoredumpSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCoredumpSetAttribute')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3825, __pyx_L2868_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3825, __pyx_L2868_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuCoredumpSetAttribute};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3825, __pyx_L2868_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuCoredumpSetAttribute};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3825, __pyx_L2868_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3825, __pyx_L2868_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCoredumpSetAttribute);
                __Pyx_GIVEREF(__pyx_n_u_cuCoredumpSetAttribute);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuCoredumpSetAttribute);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3825, __pyx_L2868_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3825, __pyx_L2868_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCoredumpSetAttribute = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3823
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCoredumpSetAttribute
 *             __cuCoredumpSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCoredumpSetAttribute')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2873_try_end;
            __pyx_L2868_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3826
 *             global __cuCoredumpSetAttribute
 *             __cuCoredumpSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCoredumpSetAttribute')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2869_exception_handled;
            }
            __pyx_L2869_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2873_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3828
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCoredumpSetAttributeGlobal
 *             __cuCoredumpSetAttributeGlobal = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCoredumpSetAttributeGlobal')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3830
 *         try:
 *             global __cuCoredumpSetAttributeGlobal
 *             __cuCoredumpSetAttributeGlobal = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCoredumpSetAttributeGlobal')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3830, __pyx_L2874_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3830, __pyx_L2874_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuCoredumpSetAttributeGlobal};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3830, __pyx_L2874_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuCoredumpSetAttributeGlobal};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3830, __pyx_L2874_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3830, __pyx_L2874_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuCoredumpSetAttributeGlobal);
                __Pyx_GIVEREF(__pyx_n_u_cuCoredumpSetAttributeGlobal);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuCoredumpSetAttributeGlobal);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3830, __pyx_L2874_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3830, __pyx_L2874_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuCoredumpSetAttributeGlobal = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3828
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCoredumpSetAttributeGlobal
 *             __cuCoredumpSetAttributeGlobal = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCoredumpSetAttributeGlobal')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2879_try_end;
            __pyx_L2874_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3831
 *             global __cuCoredumpSetAttributeGlobal
 *             __cuCoredumpSetAttributeGlobal = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCoredumpSetAttributeGlobal')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2875_exception_handled;
            }
            __pyx_L2875_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2879_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3833
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGetExportTable
 *             __cuGetExportTable = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetExportTable')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3835
 *         try:
 *             global __cuGetExportTable
 *             __cuGetExportTable = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetExportTable')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3835, __pyx_L2880_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3835, __pyx_L2880_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGetExportTable};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3835, __pyx_L2880_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGetExportTable};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3835, __pyx_L2880_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3835, __pyx_L2880_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGetExportTable);
                __Pyx_GIVEREF(__pyx_n_u_cuGetExportTable);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGetExportTable);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3835, __pyx_L2880_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3835, __pyx_L2880_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGetExportTable = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3833
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGetExportTable
 *             __cuGetExportTable = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetExportTable')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2885_try_end;
            __pyx_L2880_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3836
 *             global __cuGetExportTable
 *             __cuGetExportTable = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetExportTable')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2881_exception_handled;
            }
            __pyx_L2881_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2885_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3838
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuProfilerStart
 *             __cuProfilerStart = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuProfilerStart')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3840
 *         try:
 *             global __cuProfilerStart
 *             __cuProfilerStart = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuProfilerStart')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3840, __pyx_L2886_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3840, __pyx_L2886_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuProfilerStart};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3840, __pyx_L2886_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuProfilerStart};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3840, __pyx_L2886_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3840, __pyx_L2886_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuProfilerStart);
                __Pyx_GIVEREF(__pyx_n_u_cuProfilerStart);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuProfilerStart);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3840, __pyx_L2886_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3840, __pyx_L2886_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuProfilerStart = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3838
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuProfilerStart
 *             __cuProfilerStart = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuProfilerStart')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2891_try_end;
            __pyx_L2886_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3841
 *             global __cuProfilerStart
 *             __cuProfilerStart = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuProfilerStart')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2887_exception_handled;
            }
            __pyx_L2887_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2891_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3843
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuProfilerStop
 *             __cuProfilerStop = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuProfilerStop')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3845
 *         try:
 *             global __cuProfilerStop
 *             __cuProfilerStop = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuProfilerStop')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3845, __pyx_L2892_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3845, __pyx_L2892_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuProfilerStop};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3845, __pyx_L2892_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuProfilerStop};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3845, __pyx_L2892_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3845, __pyx_L2892_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuProfilerStop);
                __Pyx_GIVEREF(__pyx_n_u_cuProfilerStop);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuProfilerStop);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3845, __pyx_L2892_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3845, __pyx_L2892_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuProfilerStop = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3843
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuProfilerStop
 *             __cuProfilerStop = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuProfilerStop')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2897_try_end;
            __pyx_L2892_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3846
 *             global __cuProfilerStop
 *             __cuProfilerStop = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuProfilerStop')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2893_exception_handled;
            }
            __pyx_L2893_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2897_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3848
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsEGLRegisterImage
 *             __cuGraphicsEGLRegisterImage = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsEGLRegisterImage')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3850
 *         try:
 *             global __cuGraphicsEGLRegisterImage
 *             __cuGraphicsEGLRegisterImage = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsEGLRegisterImage')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3850, __pyx_L2898_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3850, __pyx_L2898_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphicsEGLRegisterImage};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3850, __pyx_L2898_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphicsEGLRegisterImage};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3850, __pyx_L2898_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3850, __pyx_L2898_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphicsEGLRegisterImage);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphicsEGLRegisterImage);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphicsEGLRegisterImage);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3850, __pyx_L2898_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3850, __pyx_L2898_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsEGLRegisterImage = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3848
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsEGLRegisterImage
 *             __cuGraphicsEGLRegisterImage = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsEGLRegisterImage')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2903_try_end;
            __pyx_L2898_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3851
 *             global __cuGraphicsEGLRegisterImage
 *             __cuGraphicsEGLRegisterImage = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsEGLRegisterImage')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2899_exception_handled;
            }
            __pyx_L2899_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2903_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3853
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEGLStreamConsumerConnect
 *             __cuEGLStreamConsumerConnect = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerConnect')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3855
 *         try:
 *             global __cuEGLStreamConsumerConnect
 *             __cuEGLStreamConsumerConnect = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerConnect')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3855, __pyx_L2904_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3855, __pyx_L2904_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuEGLStreamConsumerConnect};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3855, __pyx_L2904_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuEGLStreamConsumerConnect};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3855, __pyx_L2904_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3855, __pyx_L2904_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuEGLStreamConsumerConnect);
                __Pyx_GIVEREF(__pyx_n_u_cuEGLStreamConsumerConnect);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuEGLStreamConsumerConnect);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3855, __pyx_L2904_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3855, __pyx_L2904_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerConnect = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3853
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEGLStreamConsumerConnect
 *             __cuEGLStreamConsumerConnect = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerConnect')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2909_try_end;
            __pyx_L2904_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3856
 *             global __cuEGLStreamConsumerConnect
 *             __cuEGLStreamConsumerConnect = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerConnect')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2905_exception_handled;
            }
            __pyx_L2905_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2909_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3858
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEGLStreamConsumerConnectWithFlags
 *             __cuEGLStreamConsumerConnectWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerConnectWithFlags')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3860
 *         try:
 *             global __cuEGLStreamConsumerConnectWithFlags
 *             __cuEGLStreamConsumerConnectWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerConnectWithFlags')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3860, __pyx_L2910_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3860, __pyx_L2910_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuEGLStreamConsumerConnectWithFl};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3860, __pyx_L2910_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuEGLStreamConsumerConnectWithFl};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3860, __pyx_L2910_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3860, __pyx_L2910_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuEGLStreamConsumerConnectWithFl);
                __Pyx_GIVEREF(__pyx_n_u_cuEGLStreamConsumerConnectWithFl);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuEGLStreamConsumerConnectWithFl);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3860, __pyx_L2910_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3860, __pyx_L2910_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerConnectWithFlags = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3858
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEGLStreamConsumerConnectWithFlags
 *             __cuEGLStreamConsumerConnectWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerConnectWithFlags')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2915_try_end;
            __pyx_L2910_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3861
 *             global __cuEGLStreamConsumerConnectWithFlags
 *             __cuEGLStreamConsumerConnectWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerConnectWithFlags')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2911_exception_handled;
            }
            __pyx_L2911_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2915_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3863
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEGLStreamConsumerDisconnect
 *             __cuEGLStreamConsumerDisconnect = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerDisconnect')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3865
 *         try:
 *             global __cuEGLStreamConsumerDisconnect
 *             __cuEGLStreamConsumerDisconnect = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerDisconnect')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3865, __pyx_L2916_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3865, __pyx_L2916_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuEGLStreamConsumerDisconnect};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3865, __pyx_L2916_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuEGLStreamConsumerDisconnect};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3865, __pyx_L2916_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3865, __pyx_L2916_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuEGLStreamConsumerDisconnect);
                __Pyx_GIVEREF(__pyx_n_u_cuEGLStreamConsumerDisconnect);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuEGLStreamConsumerDisconnect);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3865, __pyx_L2916_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3865, __pyx_L2916_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerDisconnect = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3863
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEGLStreamConsumerDisconnect
 *             __cuEGLStreamConsumerDisconnect = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerDisconnect')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2921_try_end;
            __pyx_L2916_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3866
 *             global __cuEGLStreamConsumerDisconnect
 *             __cuEGLStreamConsumerDisconnect = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerDisconnect')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2917_exception_handled;
            }
            __pyx_L2917_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2921_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3868
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEGLStreamConsumerAcquireFrame
 *             __cuEGLStreamConsumerAcquireFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerAcquireFrame')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3870
 *         try:
 *             global __cuEGLStreamConsumerAcquireFrame
 *             __cuEGLStreamConsumerAcquireFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerAcquireFrame')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3870, __pyx_L2922_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3870, __pyx_L2922_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuEGLStreamConsumerAcquireFrame};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3870, __pyx_L2922_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuEGLStreamConsumerAcquireFrame};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3870, __pyx_L2922_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3870, __pyx_L2922_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuEGLStreamConsumerAcquireFrame);
                __Pyx_GIVEREF(__pyx_n_u_cuEGLStreamConsumerAcquireFrame);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuEGLStreamConsumerAcquireFrame);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3870, __pyx_L2922_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3870, __pyx_L2922_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerAcquireFrame = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3868
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEGLStreamConsumerAcquireFrame
 *             __cuEGLStreamConsumerAcquireFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerAcquireFrame')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2927_try_end;
            __pyx_L2922_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3871
 *             global __cuEGLStreamConsumerAcquireFrame
 *             __cuEGLStreamConsumerAcquireFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerAcquireFrame')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2923_exception_handled;
            }
            __pyx_L2923_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2927_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3873
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEGLStreamConsumerReleaseFrame
 *             __cuEGLStreamConsumerReleaseFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerReleaseFrame')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3875
 *         try:
 *             global __cuEGLStreamConsumerReleaseFrame
 *             __cuEGLStreamConsumerReleaseFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerReleaseFrame')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3875, __pyx_L2928_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3875, __pyx_L2928_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuEGLStreamConsumerReleaseFrame};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3875, __pyx_L2928_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuEGLStreamConsumerReleaseFrame};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3875, __pyx_L2928_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3875, __pyx_L2928_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuEGLStreamConsumerReleaseFrame);
                __Pyx_GIVEREF(__pyx_n_u_cuEGLStreamConsumerReleaseFrame);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuEGLStreamConsumerReleaseFrame);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3875, __pyx_L2928_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3875, __pyx_L2928_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerReleaseFrame = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3873
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEGLStreamConsumerReleaseFrame
 *             __cuEGLStreamConsumerReleaseFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerReleaseFrame')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2933_try_end;
            __pyx_L2928_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3876
 *             global __cuEGLStreamConsumerReleaseFrame
 *             __cuEGLStreamConsumerReleaseFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerReleaseFrame')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2929_exception_handled;
            }
            __pyx_L2929_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2933_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3878
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEGLStreamProducerConnect
 *             __cuEGLStreamProducerConnect = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamProducerConnect')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3880
 *         try:
 *             global __cuEGLStreamProducerConnect
 *             __cuEGLStreamProducerConnect = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamProducerConnect')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3880, __pyx_L2934_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3880, __pyx_L2934_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuEGLStreamProducerConnect};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3880, __pyx_L2934_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuEGLStreamProducerConnect};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3880, __pyx_L2934_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3880, __pyx_L2934_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuEGLStreamProducerConnect);
                __Pyx_GIVEREF(__pyx_n_u_cuEGLStreamProducerConnect);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuEGLStreamProducerConnect);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3880, __pyx_L2934_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3880, __pyx_L2934_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerConnect = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3878
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEGLStreamProducerConnect
 *             __cuEGLStreamProducerConnect = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamProducerConnect')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2939_try_end;
            __pyx_L2934_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3881
 *             global __cuEGLStreamProducerConnect
 *             __cuEGLStreamProducerConnect = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamProducerConnect')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2935_exception_handled;
            }
            __pyx_L2935_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2939_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3883
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEGLStreamProducerDisconnect
 *             __cuEGLStreamProducerDisconnect = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamProducerDisconnect')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3885
 *         try:
 *             global __cuEGLStreamProducerDisconnect
 *             __cuEGLStreamProducerDisconnect = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamProducerDisconnect')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3885, __pyx_L2940_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3885, __pyx_L2940_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuEGLStreamProducerDisconnect};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3885, __pyx_L2940_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuEGLStreamProducerDisconnect};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3885, __pyx_L2940_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3885, __pyx_L2940_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuEGLStreamProducerDisconnect);
                __Pyx_GIVEREF(__pyx_n_u_cuEGLStreamProducerDisconnect);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuEGLStreamProducerDisconnect);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3885, __pyx_L2940_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3885, __pyx_L2940_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerDisconnect = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3883
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEGLStreamProducerDisconnect
 *             __cuEGLStreamProducerDisconnect = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamProducerDisconnect')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2945_try_end;
            __pyx_L2940_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3886
 *             global __cuEGLStreamProducerDisconnect
 *             __cuEGLStreamProducerDisconnect = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamProducerDisconnect')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2941_exception_handled;
            }
            __pyx_L2941_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2945_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3888
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEGLStreamProducerPresentFrame
 *             __cuEGLStreamProducerPresentFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamProducerPresentFrame')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3890
 *         try:
 *             global __cuEGLStreamProducerPresentFrame
 *             __cuEGLStreamProducerPresentFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamProducerPresentFrame')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3890, __pyx_L2946_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3890, __pyx_L2946_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuEGLStreamProducerPresentFrame};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3890, __pyx_L2946_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuEGLStreamProducerPresentFrame};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3890, __pyx_L2946_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3890, __pyx_L2946_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuEGLStreamProducerPresentFrame);
                __Pyx_GIVEREF(__pyx_n_u_cuEGLStreamProducerPresentFrame);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuEGLStreamProducerPresentFrame);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3890, __pyx_L2946_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3890, __pyx_L2946_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerPresentFrame = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3888
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEGLStreamProducerPresentFrame
 *             __cuEGLStreamProducerPresentFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamProducerPresentFrame')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2951_try_end;
            __pyx_L2946_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3891
 *             global __cuEGLStreamProducerPresentFrame
 *             __cuEGLStreamProducerPresentFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamProducerPresentFrame')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2947_exception_handled;
            }
            __pyx_L2947_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2951_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3893
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEGLStreamProducerReturnFrame
 *             __cuEGLStreamProducerReturnFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamProducerReturnFrame')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3895
 *         try:
 *             global __cuEGLStreamProducerReturnFrame
 *             __cuEGLStreamProducerReturnFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamProducerReturnFrame')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3895, __pyx_L2952_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3895, __pyx_L2952_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuEGLStreamProducerReturnFrame};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3895, __pyx_L2952_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuEGLStreamProducerReturnFrame};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3895, __pyx_L2952_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3895, __pyx_L2952_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuEGLStreamProducerReturnFrame);
                __Pyx_GIVEREF(__pyx_n_u_cuEGLStreamProducerReturnFrame);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuEGLStreamProducerReturnFrame);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3895, __pyx_L2952_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3895, __pyx_L2952_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerReturnFrame = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3893
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEGLStreamProducerReturnFrame
 *             __cuEGLStreamProducerReturnFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamProducerReturnFrame')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2957_try_end;
            __pyx_L2952_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3896
 *             global __cuEGLStreamProducerReturnFrame
 *             __cuEGLStreamProducerReturnFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamProducerReturnFrame')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2953_exception_handled;
            }
            __pyx_L2953_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2957_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3898
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsResourceGetMappedEglFrame
 *             __cuGraphicsResourceGetMappedEglFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsResourceGetMappedEglFrame')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3900
 *         try:
 *             global __cuGraphicsResourceGetMappedEglFrame
 *             __cuGraphicsResourceGetMappedEglFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsResourceGetMappedEglFrame')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3900, __pyx_L2958_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3900, __pyx_L2958_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphicsResourceGetMappedEglFr};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3900, __pyx_L2958_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphicsResourceGetMappedEglFr};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3900, __pyx_L2958_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3900, __pyx_L2958_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphicsResourceGetMappedEglFr);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphicsResourceGetMappedEglFr);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphicsResourceGetMappedEglFr);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3900, __pyx_L2958_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3900, __pyx_L2958_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceGetMappedEglFrame = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3898
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsResourceGetMappedEglFrame
 *             __cuGraphicsResourceGetMappedEglFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsResourceGetMappedEglFrame')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2963_try_end;
            __pyx_L2958_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3901
 *             global __cuGraphicsResourceGetMappedEglFrame
 *             __cuGraphicsResourceGetMappedEglFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsResourceGetMappedEglFrame')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2959_exception_handled;
            }
            __pyx_L2959_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2963_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3903
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEventCreateFromEGLSync
 *             __cuEventCreateFromEGLSync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventCreateFromEGLSync')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3905
 *         try:
 *             global __cuEventCreateFromEGLSync
 *             __cuEventCreateFromEGLSync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventCreateFromEGLSync')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3905, __pyx_L2964_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3905, __pyx_L2964_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuEventCreateFromEGLSync};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3905, __pyx_L2964_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuEventCreateFromEGLSync};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3905, __pyx_L2964_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3905, __pyx_L2964_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuEventCreateFromEGLSync);
                __Pyx_GIVEREF(__pyx_n_u_cuEventCreateFromEGLSync);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuEventCreateFromEGLSync);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3905, __pyx_L2964_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3905, __pyx_L2964_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuEventCreateFromEGLSync = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3903
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEventCreateFromEGLSync
 *             __cuEventCreateFromEGLSync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventCreateFromEGLSync')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2969_try_end;
            __pyx_L2964_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3906
 *             global __cuEventCreateFromEGLSync
 *             __cuEventCreateFromEGLSync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventCreateFromEGLSync')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2965_exception_handled;
            }
            __pyx_L2965_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2969_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3908
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsGLRegisterBuffer
 *             __cuGraphicsGLRegisterBuffer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsGLRegisterBuffer')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3910
 *         try:
 *             global __cuGraphicsGLRegisterBuffer
 *             __cuGraphicsGLRegisterBuffer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsGLRegisterBuffer')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3910, __pyx_L2970_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3910, __pyx_L2970_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphicsGLRegisterBuffer};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3910, __pyx_L2970_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphicsGLRegisterBuffer};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3910, __pyx_L2970_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3910, __pyx_L2970_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphicsGLRegisterBuffer);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphicsGLRegisterBuffer);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphicsGLRegisterBuffer);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3910, __pyx_L2970_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3910, __pyx_L2970_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsGLRegisterBuffer = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3908
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsGLRegisterBuffer
 *             __cuGraphicsGLRegisterBuffer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsGLRegisterBuffer')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2975_try_end;
            __pyx_L2970_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3911
 *             global __cuGraphicsGLRegisterBuffer
 *             __cuGraphicsGLRegisterBuffer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsGLRegisterBuffer')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2971_exception_handled;
            }
            __pyx_L2971_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2975_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3913
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsGLRegisterImage
 *             __cuGraphicsGLRegisterImage = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsGLRegisterImage')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3915
 *         try:
 *             global __cuGraphicsGLRegisterImage
 *             __cuGraphicsGLRegisterImage = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsGLRegisterImage')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3915, __pyx_L2976_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3915, __pyx_L2976_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphicsGLRegisterImage};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3915, __pyx_L2976_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuGraphicsGLRegisterImage};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3915, __pyx_L2976_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3915, __pyx_L2976_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphicsGLRegisterImage);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphicsGLRegisterImage);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphicsGLRegisterImage);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3915, __pyx_L2976_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3915, __pyx_L2976_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsGLRegisterImage = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3913
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsGLRegisterImage
 *             __cuGraphicsGLRegisterImage = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsGLRegisterImage')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2981_try_end;
            __pyx_L2976_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3916
 *             global __cuGraphicsGLRegisterImage
 *             __cuGraphicsGLRegisterImage = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsGLRegisterImage')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2977_exception_handled;
            }
            __pyx_L2977_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2981_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3918
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGLGetDevices_v2
 *             __cuGLGetDevices_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGLGetDevices_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3920
 *         try:
 *             global __cuGLGetDevices_v2
 *             __cuGLGetDevices_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGLGetDevices_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3920, __pyx_L2982_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3920, __pyx_L2982_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGLGetDevices_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3920, __pyx_L2982_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGLGetDevices_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3920, __pyx_L2982_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3920, __pyx_L2982_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGLGetDevices_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuGLGetDevices_v2);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGLGetDevices_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3920, __pyx_L2982_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3920, __pyx_L2982_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGLGetDevices_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3918
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGLGetDevices_v2
 *             __cuGLGetDevices_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGLGetDevices_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2987_try_end;
            __pyx_L2982_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3921
 *             global __cuGLGetDevices_v2
 *             __cuGLGetDevices_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGLGetDevices_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2983_exception_handled;
            }
            __pyx_L2983_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2987_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3923
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuVDPAUGetDevice
 *             __cuVDPAUGetDevice = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuVDPAUGetDevice')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3925
 *         try:
 *             global __cuVDPAUGetDevice
 *             __cuVDPAUGetDevice = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuVDPAUGetDevice')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3925, __pyx_L2988_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3925, __pyx_L2988_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuVDPAUGetDevice};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3925, __pyx_L2988_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuVDPAUGetDevice};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3925, __pyx_L2988_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3925, __pyx_L2988_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuVDPAUGetDevice);
                __Pyx_GIVEREF(__pyx_n_u_cuVDPAUGetDevice);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuVDPAUGetDevice);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3925, __pyx_L2988_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3925, __pyx_L2988_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuVDPAUGetDevice = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3923
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuVDPAUGetDevice
 *             __cuVDPAUGetDevice = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuVDPAUGetDevice')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L2993_try_end;
            __pyx_L2988_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3926
 *             global __cuVDPAUGetDevice
 *             __cuVDPAUGetDevice = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuVDPAUGetDevice')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2989_exception_handled;
            }
            __pyx_L2989_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L2993_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3928
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuVDPAUCtxCreate_v2
 *             __cuVDPAUCtxCreate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuVDPAUCtxCreate_v2')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3930
 *         try:
 *             global __cuVDPAUCtxCreate_v2
 *             __cuVDPAUCtxCreate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuVDPAUCtxCreate_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3930, __pyx_L2994_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3930, __pyx_L2994_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_12, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuVDPAUCtxCreate_v2};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3930, __pyx_L2994_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
                PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_handle, __pyx_n_u_cuVDPAUCtxCreate_v2};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3930, __pyx_L2994_error)
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3930, __pyx_L2994_error)
                __Pyx_GOTREF(__pyx_t_10);
                if (__pyx_t_3) {
                  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuVDPAUCtxCreate_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuVDPAUCtxCreate_v2);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuVDPAUCtxCreate_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3930, __pyx_L2994_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3930, __pyx_L2994_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuVDPAUCtxCreate_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3928
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuVDPAUCtxCreate_v2
 *             __cuVDPAUCtxCreate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuVDPAUCtxCreate_v2')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L2999_try_end;
            __pyx_L2994_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3931
 *             global __cuVDPAUCtxCreate_v2
 *             __cuVDPAUCtxCreate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuVDPAUCtxCreate_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L2995_exception_handled;
            }
            __pyx_L2995_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L2999_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3933
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsVDPAURegisterVideoSurface
 *             __cuGraphicsVDPAURegisterVideoSurface = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsVDPAURegisterVideoSurface')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3935
 *         try:
 *             global __cuGraphicsVDPAURegisterVideoSurface
 *             __cuGraphicsVDPAURegisterVideoSurface = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsVDPAURegisterVideoSurface')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3935, __pyx_L3000_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3935, __pyx_L3000_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_12)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_12);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphicsVDPAURegisterVideoSurf};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3935, __pyx_L3000_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_handle, __pyx_n_u_cuGraphicsVDPAURegisterVideoSurf};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3935, __pyx_L3000_error)
                __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3935, __pyx_L3000_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (__pyx_t_12) {
                  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12); __pyx_t_12 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphicsVDPAURegisterVideoSurf);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphicsVDPAURegisterVideoSurf);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphicsVDPAURegisterVideoSurf);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3935, __pyx_L3000_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3935, __pyx_L3000_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsVDPAURegisterVideoSurface = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3933
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsVDPAURegisterVideoSurface
 *             __cuGraphicsVDPAURegisterVideoSurface = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsVDPAURegisterVideoSurface')
 */
            }
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L3005_try_end;
            __pyx_L3000_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3936
 *             global __cuGraphicsVDPAURegisterVideoSurface
 *             __cuGraphicsVDPAURegisterVideoSurface = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsVDPAURegisterVideoSurface')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 *         try:
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L3001_exception_handled;
            }
            __pyx_L3001_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
            __pyx_L3005_try_end:;
          }

          /* "cuda/_cuda/ccuda.pyx":3938
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsVDPAURegisterOutputSurface
 *             __cuGraphicsVDPAURegisterOutputSurface = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsVDPAURegisterOutputSurface')
 */
          {
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_7);
            /*try:*/ {

              /* "cuda/_cuda/ccuda.pyx":3940
 *         try:
 *             global __cuGraphicsVDPAURegisterOutputSurface
 *             __cuGraphicsVDPAURegisterOutputSurface = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsVDPAURegisterOutputSurface')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3940, __pyx_L3006_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_GetProcAddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3940, __pyx_L3006_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              __pyx_t_13 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_13 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphicsVDPAURegisterOutputSur};
                __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3940, __pyx_L3006_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
                PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_handle, __pyx_n_u_cuGraphicsVDPAURegisterOutputSur};
                __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3940, __pyx_L3006_error)
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_GOTREF(__pyx_t_4);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3940, __pyx_L3006_error)
                __Pyx_GOTREF(__pyx_t_12);
                if (__pyx_t_10) {
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
                }
                __Pyx_INCREF(__pyx_v_handle);
                __Pyx_GIVEREF(__pyx_v_handle);
                PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_v_handle);
                __Pyx_INCREF(__pyx_n_u_cuGraphicsVDPAURegisterOutputSur);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphicsVDPAURegisterOutputSur);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphicsVDPAURegisterOutputSur);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3940, __pyx_L3006_error)
                __Pyx_GOTREF(__pyx_t_4);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_21 = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 3940, __pyx_L3006_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsVDPAURegisterOutputSurface = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3938
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsVDPAURegisterOutputSurface
 *             __cuGraphicsVDPAURegisterOutputSurface = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsVDPAURegisterOutputSurface')
 */
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            goto __pyx_L3011_try_end;
            __pyx_L3006_error:;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":3941
 *             global __cuGraphicsVDPAURegisterOutputSurface
 *             __cuGraphicsVDPAURegisterOutputSurface = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsVDPAURegisterOutputSurface')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
            /*except:*/ {
              __Pyx_ErrRestore(0,0,0);
              goto __pyx_L3007_exception_handled;
            }
            __pyx_L3007_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
            __pyx_L3011_try_end:;
          }
        }

        /* "cuda/_cuda/ccuda.pyx":1465
 * 
 *     # Load using win32GetAddr
 *     with gil:             # <<<<<<<<<<<<<<
 *         if usePTDS:
 *             # Get all PTDS version of functions
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            __Pyx_PyGILState_Release(__pyx_gilstate_save);
            #endif
            goto __pyx_L46;
          }
          __pyx_L46:;
        }
    }
  }

  /* "cuda/_cuda/ccuda.pyx":434
 * 
 * cdef int cuPythonInit() except -1 nogil:
 *     global __cuPythonInit             # <<<<<<<<<<<<<<
 *     cdef bint usePTDS
 *     if __cuPythonInit:
 */
  /*finally:*/ {
    /*normal exit:*/{
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L5;
    }
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
    __pyx_L5:;
  }

  /* "cuda/_cuda/ccuda.pyx":433
 * cdef void *__cuGraphicsVDPAURegisterOutputSurface = NULL
 * 
 * cdef int cuPythonInit() except -1 nogil:             # <<<<<<<<<<<<<<
 *     global __cuPythonInit
 *     cdef bint usePTDS
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("cuda._cuda.ccuda.cuPythonInit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_path);
  __Pyx_XDECREF(__pyx_v_handle);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3944
 *             pass
 * 
 * cdef CUresult _cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGetErrorString
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGetErrorString(CUresult __pyx_v_error, char const **__pyx_v_pStr) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGetErrorString", 1);
  __Pyx_TraceCall("_cuGetErrorString", __pyx_f[0], 3944, 1, __PYX_ERR(0, 3944, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3945
 * 
 * cdef CUresult _cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGetErrorString             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGetErrorString == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3946
 * cdef CUresult _cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGetErrorString
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGetErrorString == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3946, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3947
 *     global __cuGetErrorString
 *     cuPythonInit()
 *     if __cuGetErrorString == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGetErrorString" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGetErrorString == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":3948
 *     cuPythonInit()
 *     if __cuGetErrorString == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGetErrorString" not found')
 *     err = (<CUresult (*)(CUresult, const char**) nogil> __cuGetErrorString)(error, pStr)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":3949
 *     if __cuGetErrorString == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGetErrorString" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUresult, const char**) nogil> __cuGetErrorString)(error, pStr)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3949, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3949, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3948
 *     cuPythonInit()
 *     if __cuGetErrorString == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGetErrorString" not found')
 *     err = (<CUresult (*)(CUresult, const char**) nogil> __cuGetErrorString)(error, pStr)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":3947
 *     global __cuGetErrorString
 *     cuPythonInit()
 *     if __cuGetErrorString == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGetErrorString" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3950
 *         with gil:
 *             raise RuntimeError('Function "cuGetErrorString" not found')
 *     err = (<CUresult (*)(CUresult, const char**) nogil> __cuGetErrorString)(error, pStr)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUresult, char const **))__pyx_v_4cuda_5_cuda_5ccuda___cuGetErrorString)(__pyx_v_error, __pyx_v_pStr);

    /* "cuda/_cuda/ccuda.pyx":3951
 *             raise RuntimeError('Function "cuGetErrorString" not found')
 *     err = (<CUresult (*)(CUresult, const char**) nogil> __cuGetErrorString)(error, pStr)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGetErrorName(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3945
 * 
 * cdef CUresult _cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGetErrorString             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGetErrorString == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":3944
 *             pass
 * 
 * cdef CUresult _cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGetErrorString
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGetErrorString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3953
 *     return err
 * 
 * cdef CUresult _cuGetErrorName(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGetErrorName
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGetErrorName(CUresult __pyx_v_error, char const **__pyx_v_pStr) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGetErrorName", 1);
  __Pyx_TraceCall("_cuGetErrorName", __pyx_f[0], 3953, 1, __PYX_ERR(0, 3953, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3954
 * 
 * cdef CUresult _cuGetErrorName(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGetErrorName             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGetErrorName == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3955
 * cdef CUresult _cuGetErrorName(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGetErrorName
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGetErrorName == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3955, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3956
 *     global __cuGetErrorName
 *     cuPythonInit()
 *     if __cuGetErrorName == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGetErrorName" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGetErrorName == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":3957
 *     cuPythonInit()
 *     if __cuGetErrorName == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGetErrorName" not found')
 *     err = (<CUresult (*)(CUresult, const char**) nogil> __cuGetErrorName)(error, pStr)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":3958
 *     if __cuGetErrorName == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGetErrorName" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUresult, const char**) nogil> __cuGetErrorName)(error, pStr)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3958, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3958, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3957
 *     cuPythonInit()
 *     if __cuGetErrorName == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGetErrorName" not found')
 *     err = (<CUresult (*)(CUresult, const char**) nogil> __cuGetErrorName)(error, pStr)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":3956
 *     global __cuGetErrorName
 *     cuPythonInit()
 *     if __cuGetErrorName == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGetErrorName" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3959
 *         with gil:
 *             raise RuntimeError('Function "cuGetErrorName" not found')
 *     err = (<CUresult (*)(CUresult, const char**) nogil> __cuGetErrorName)(error, pStr)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUresult, char const **))__pyx_v_4cuda_5_cuda_5ccuda___cuGetErrorName)(__pyx_v_error, __pyx_v_pStr);

    /* "cuda/_cuda/ccuda.pyx":3960
 *             raise RuntimeError('Function "cuGetErrorName" not found')
 *     err = (<CUresult (*)(CUresult, const char**) nogil> __cuGetErrorName)(error, pStr)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuInit(unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3954
 * 
 * cdef CUresult _cuGetErrorName(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGetErrorName             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGetErrorName == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":3953
 *     return err
 * 
 * cdef CUresult _cuGetErrorName(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGetErrorName
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGetErrorName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3962
 *     return err
 * 
 * cdef CUresult _cuInit(unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuInit
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuInit(unsigned int __pyx_v_Flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuInit", 1);
  __Pyx_TraceCall("_cuInit", __pyx_f[0], 3962, 1, __PYX_ERR(0, 3962, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3963
 * 
 * cdef CUresult _cuInit(unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuInit             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuInit == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3964
 * cdef CUresult _cuInit(unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuInit
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuInit == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3964, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3965
 *     global __cuInit
 *     cuPythonInit()
 *     if __cuInit == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuInit" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuInit == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":3966
 *     cuPythonInit()
 *     if __cuInit == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuInit" not found')
 *     err = (<CUresult (*)(unsigned int) nogil> __cuInit)(Flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":3967
 *     if __cuInit == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuInit" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int) nogil> __cuInit)(Flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3967, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3967, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3966
 *     cuPythonInit()
 *     if __cuInit == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuInit" not found')
 *     err = (<CUresult (*)(unsigned int) nogil> __cuInit)(Flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":3965
 *     global __cuInit
 *     cuPythonInit()
 *     if __cuInit == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuInit" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3968
 *         with gil:
 *             raise RuntimeError('Function "cuInit" not found')
 *     err = (<CUresult (*)(unsigned int) nogil> __cuInit)(Flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuInit)(__pyx_v_Flags);

    /* "cuda/_cuda/ccuda.pyx":3969
 *             raise RuntimeError('Function "cuInit" not found')
 *     err = (<CUresult (*)(unsigned int) nogil> __cuInit)(Flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDriverGetVersion(int* driverVersion) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3963
 * 
 * cdef CUresult _cuInit(unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuInit             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuInit == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":3962
 *     return err
 * 
 * cdef CUresult _cuInit(unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuInit
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuInit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3971
 *     return err
 * 
 * cdef CUresult _cuDriverGetVersion(int* driverVersion) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDriverGetVersion
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDriverGetVersion(int *__pyx_v_driverVersion) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDriverGetVersion", 1);
  __Pyx_TraceCall("_cuDriverGetVersion", __pyx_f[0], 3971, 1, __PYX_ERR(0, 3971, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3972
 * 
 * cdef CUresult _cuDriverGetVersion(int* driverVersion) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDriverGetVersion             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDriverGetVersion == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3973
 * cdef CUresult _cuDriverGetVersion(int* driverVersion) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDriverGetVersion
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDriverGetVersion == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3973, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3974
 *     global __cuDriverGetVersion
 *     cuPythonInit()
 *     if __cuDriverGetVersion == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDriverGetVersion" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDriverGetVersion == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":3975
 *     cuPythonInit()
 *     if __cuDriverGetVersion == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDriverGetVersion" not found')
 *     err = (<CUresult (*)(int*) nogil> __cuDriverGetVersion)(driverVersion)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":3976
 *     if __cuDriverGetVersion == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDriverGetVersion" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*) nogil> __cuDriverGetVersion)(driverVersion)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3976, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3976, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3975
 *     cuPythonInit()
 *     if __cuDriverGetVersion == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDriverGetVersion" not found')
 *     err = (<CUresult (*)(int*) nogil> __cuDriverGetVersion)(driverVersion)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":3974
 *     global __cuDriverGetVersion
 *     cuPythonInit()
 *     if __cuDriverGetVersion == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDriverGetVersion" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3977
 *         with gil:
 *             raise RuntimeError('Function "cuDriverGetVersion" not found')
 *     err = (<CUresult (*)(int*) nogil> __cuDriverGetVersion)(driverVersion)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(int *))__pyx_v_4cuda_5_cuda_5ccuda___cuDriverGetVersion)(__pyx_v_driverVersion);

    /* "cuda/_cuda/ccuda.pyx":3978
 *             raise RuntimeError('Function "cuDriverGetVersion" not found')
 *     err = (<CUresult (*)(int*) nogil> __cuDriverGetVersion)(driverVersion)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceGet(CUdevice* device, int ordinal) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3972
 * 
 * cdef CUresult _cuDriverGetVersion(int* driverVersion) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDriverGetVersion             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDriverGetVersion == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":3971
 *     return err
 * 
 * cdef CUresult _cuDriverGetVersion(int* driverVersion) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDriverGetVersion
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDriverGetVersion", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3980
 *     return err
 * 
 * cdef CUresult _cuDeviceGet(CUdevice* device, int ordinal) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGet
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGet(CUdevice *__pyx_v_device, int __pyx_v_ordinal) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDeviceGet", 1);
  __Pyx_TraceCall("_cuDeviceGet", __pyx_f[0], 3980, 1, __PYX_ERR(0, 3980, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3981
 * 
 * cdef CUresult _cuDeviceGet(CUdevice* device, int ordinal) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGet             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGet == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3982
 * cdef CUresult _cuDeviceGet(CUdevice* device, int ordinal) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGet
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDeviceGet == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3982, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3983
 *     global __cuDeviceGet
 *     cuPythonInit()
 *     if __cuDeviceGet == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGet" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGet == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":3984
 *     cuPythonInit()
 *     if __cuDeviceGet == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGet" not found')
 *     err = (<CUresult (*)(CUdevice*, int) nogil> __cuDeviceGet)(device, ordinal)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":3985
 *     if __cuDeviceGet == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGet" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice*, int) nogil> __cuDeviceGet)(device, ordinal)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3985, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3985, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3984
 *     cuPythonInit()
 *     if __cuDeviceGet == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGet" not found')
 *     err = (<CUresult (*)(CUdevice*, int) nogil> __cuDeviceGet)(device, ordinal)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":3983
 *     global __cuDeviceGet
 *     cuPythonInit()
 *     if __cuDeviceGet == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGet" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3986
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGet" not found')
 *     err = (<CUresult (*)(CUdevice*, int) nogil> __cuDeviceGet)(device, ordinal)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdevice *, int))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGet)(__pyx_v_device, __pyx_v_ordinal);

    /* "cuda/_cuda/ccuda.pyx":3987
 *             raise RuntimeError('Function "cuDeviceGet" not found')
 *     err = (<CUresult (*)(CUdevice*, int) nogil> __cuDeviceGet)(device, ordinal)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceGetCount(int* count) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3981
 * 
 * cdef CUresult _cuDeviceGet(CUdevice* device, int ordinal) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGet             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGet == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":3980
 *     return err
 * 
 * cdef CUresult _cuDeviceGet(CUdevice* device, int ordinal) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGet
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDeviceGet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3989
 *     return err
 * 
 * cdef CUresult _cuDeviceGetCount(int* count) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetCount
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetCount(int *__pyx_v_count) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDeviceGetCount", 1);
  __Pyx_TraceCall("_cuDeviceGetCount", __pyx_f[0], 3989, 1, __PYX_ERR(0, 3989, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3990
 * 
 * cdef CUresult _cuDeviceGetCount(int* count) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetCount             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetCount == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3991
 * cdef CUresult _cuDeviceGetCount(int* count) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetCount
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDeviceGetCount == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3991, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3992
 *     global __cuDeviceGetCount
 *     cuPythonInit()
 *     if __cuDeviceGetCount == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetCount" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetCount == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":3993
 *     cuPythonInit()
 *     if __cuDeviceGetCount == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetCount" not found')
 *     err = (<CUresult (*)(int*) nogil> __cuDeviceGetCount)(count)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":3994
 *     if __cuDeviceGetCount == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetCount" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*) nogil> __cuDeviceGetCount)(count)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3994, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3994, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3993
 *     cuPythonInit()
 *     if __cuDeviceGetCount == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetCount" not found')
 *     err = (<CUresult (*)(int*) nogil> __cuDeviceGetCount)(count)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":3992
 *     global __cuDeviceGetCount
 *     cuPythonInit()
 *     if __cuDeviceGetCount == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetCount" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3995
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetCount" not found')
 *     err = (<CUresult (*)(int*) nogil> __cuDeviceGetCount)(count)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(int *))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetCount)(__pyx_v_count);

    /* "cuda/_cuda/ccuda.pyx":3996
 *             raise RuntimeError('Function "cuDeviceGetCount" not found')
 *     err = (<CUresult (*)(int*) nogil> __cuDeviceGetCount)(count)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceGetName(char* name, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3990
 * 
 * cdef CUresult _cuDeviceGetCount(int* count) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetCount             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetCount == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":3989
 *     return err
 * 
 * cdef CUresult _cuDeviceGetCount(int* count) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetCount
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDeviceGetCount", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":3998
 *     return err
 * 
 * cdef CUresult _cuDeviceGetName(char* name, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetName
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetName(char *__pyx_v_name, int __pyx_v_length, CUdevice __pyx_v_dev) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDeviceGetName", 1);
  __Pyx_TraceCall("_cuDeviceGetName", __pyx_f[0], 3998, 1, __PYX_ERR(0, 3998, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3999
 * 
 * cdef CUresult _cuDeviceGetName(char* name, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetName             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetName == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4000
 * cdef CUresult _cuDeviceGetName(char* name, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetName
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDeviceGetName == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4000, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4001
 *     global __cuDeviceGetName
 *     cuPythonInit()
 *     if __cuDeviceGetName == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetName" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetName == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4002
 *     cuPythonInit()
 *     if __cuDeviceGetName == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetName" not found')
 *     err = (<CUresult (*)(char*, int, CUdevice) nogil> __cuDeviceGetName)(name, length, dev)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4003
 *     if __cuDeviceGetName == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetName" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(char*, int, CUdevice) nogil> __cuDeviceGetName)(name, length, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4003, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4003, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4002
 *     cuPythonInit()
 *     if __cuDeviceGetName == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetName" not found')
 *     err = (<CUresult (*)(char*, int, CUdevice) nogil> __cuDeviceGetName)(name, length, dev)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4001
 *     global __cuDeviceGetName
 *     cuPythonInit()
 *     if __cuDeviceGetName == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetName" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4004
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetName" not found')
 *     err = (<CUresult (*)(char*, int, CUdevice) nogil> __cuDeviceGetName)(name, length, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(char *, int, CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetName)(__pyx_v_name, __pyx_v_length, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":4005
 *             raise RuntimeError('Function "cuDeviceGetName" not found')
 *     err = (<CUresult (*)(char*, int, CUdevice) nogil> __cuDeviceGetName)(name, length, dev)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3999
 * 
 * cdef CUresult _cuDeviceGetName(char* name, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetName             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetName == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":3998
 *     return err
 * 
 * cdef CUresult _cuDeviceGetName(char* name, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetName
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDeviceGetName", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4007
 *     return err
 * 
 * cdef CUresult _cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetUuid
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetUuid(CUuuid *__pyx_v_uuid, CUdevice __pyx_v_dev) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDeviceGetUuid", 1);
  __Pyx_TraceCall("_cuDeviceGetUuid", __pyx_f[0], 4007, 1, __PYX_ERR(0, 4007, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4008
 * 
 * cdef CUresult _cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetUuid             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetUuid == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4009
 * cdef CUresult _cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetUuid
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDeviceGetUuid == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4009, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4010
 *     global __cuDeviceGetUuid
 *     cuPythonInit()
 *     if __cuDeviceGetUuid == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetUuid" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetUuid == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4011
 *     cuPythonInit()
 *     if __cuDeviceGetUuid == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetUuid" not found')
 *     err = (<CUresult (*)(CUuuid*, CUdevice) nogil> __cuDeviceGetUuid)(uuid, dev)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4012
 *     if __cuDeviceGetUuid == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetUuid" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUuuid*, CUdevice) nogil> __cuDeviceGetUuid)(uuid, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4012, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4012, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4011
 *     cuPythonInit()
 *     if __cuDeviceGetUuid == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetUuid" not found')
 *     err = (<CUresult (*)(CUuuid*, CUdevice) nogil> __cuDeviceGetUuid)(uuid, dev)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4010
 *     global __cuDeviceGetUuid
 *     cuPythonInit()
 *     if __cuDeviceGetUuid == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetUuid" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4013
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetUuid" not found')
 *     err = (<CUresult (*)(CUuuid*, CUdevice) nogil> __cuDeviceGetUuid)(uuid, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUuuid *, CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetUuid)(__pyx_v_uuid, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":4014
 *             raise RuntimeError('Function "cuDeviceGetUuid" not found')
 *     err = (<CUresult (*)(CUuuid*, CUdevice) nogil> __cuDeviceGetUuid)(uuid, dev)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4008
 * 
 * cdef CUresult _cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetUuid             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetUuid == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4007
 *     return err
 * 
 * cdef CUresult _cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetUuid
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDeviceGetUuid", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4016
 *     return err
 * 
 * cdef CUresult _cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetUuid_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetUuid_v2(CUuuid *__pyx_v_uuid, CUdevice __pyx_v_dev) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDeviceGetUuid_v2", 1);
  __Pyx_TraceCall("_cuDeviceGetUuid_v2", __pyx_f[0], 4016, 1, __PYX_ERR(0, 4016, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4017
 * 
 * cdef CUresult _cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetUuid_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetUuid_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4018
 * cdef CUresult _cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetUuid_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDeviceGetUuid_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4018, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4019
 *     global __cuDeviceGetUuid_v2
 *     cuPythonInit()
 *     if __cuDeviceGetUuid_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetUuid_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetUuid_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4020
 *     cuPythonInit()
 *     if __cuDeviceGetUuid_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetUuid_v2" not found')
 *     err = (<CUresult (*)(CUuuid*, CUdevice) nogil> __cuDeviceGetUuid_v2)(uuid, dev)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4021
 *     if __cuDeviceGetUuid_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetUuid_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUuuid*, CUdevice) nogil> __cuDeviceGetUuid_v2)(uuid, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4021, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4021, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4020
 *     cuPythonInit()
 *     if __cuDeviceGetUuid_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetUuid_v2" not found')
 *     err = (<CUresult (*)(CUuuid*, CUdevice) nogil> __cuDeviceGetUuid_v2)(uuid, dev)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4019
 *     global __cuDeviceGetUuid_v2
 *     cuPythonInit()
 *     if __cuDeviceGetUuid_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetUuid_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4022
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetUuid_v2" not found')
 *     err = (<CUresult (*)(CUuuid*, CUdevice) nogil> __cuDeviceGetUuid_v2)(uuid, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUuuid *, CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetUuid_v2)(__pyx_v_uuid, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":4023
 *             raise RuntimeError('Function "cuDeviceGetUuid_v2" not found')
 *     err = (<CUresult (*)(CUuuid*, CUdevice) nogil> __cuDeviceGetUuid_v2)(uuid, dev)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4017
 * 
 * cdef CUresult _cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetUuid_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetUuid_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4016
 *     return err
 * 
 * cdef CUresult _cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetUuid_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDeviceGetUuid_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4025
 *     return err
 * 
 * cdef CUresult _cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetLuid
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetLuid(char *__pyx_v_luid, unsigned int *__pyx_v_deviceNodeMask, CUdevice __pyx_v_dev) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDeviceGetLuid", 1);
  __Pyx_TraceCall("_cuDeviceGetLuid", __pyx_f[0], 4025, 1, __PYX_ERR(0, 4025, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4026
 * 
 * cdef CUresult _cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetLuid             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetLuid == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4027
 * cdef CUresult _cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetLuid
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDeviceGetLuid == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4027, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4028
 *     global __cuDeviceGetLuid
 *     cuPythonInit()
 *     if __cuDeviceGetLuid == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetLuid" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetLuid == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4029
 *     cuPythonInit()
 *     if __cuDeviceGetLuid == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetLuid" not found')
 *     err = (<CUresult (*)(char*, unsigned int*, CUdevice) nogil> __cuDeviceGetLuid)(luid, deviceNodeMask, dev)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4030
 *     if __cuDeviceGetLuid == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetLuid" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(char*, unsigned int*, CUdevice) nogil> __cuDeviceGetLuid)(luid, deviceNodeMask, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4030, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4030, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4029
 *     cuPythonInit()
 *     if __cuDeviceGetLuid == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetLuid" not found')
 *     err = (<CUresult (*)(char*, unsigned int*, CUdevice) nogil> __cuDeviceGetLuid)(luid, deviceNodeMask, dev)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4028
 *     global __cuDeviceGetLuid
 *     cuPythonInit()
 *     if __cuDeviceGetLuid == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetLuid" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4031
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetLuid" not found')
 *     err = (<CUresult (*)(char*, unsigned int*, CUdevice) nogil> __cuDeviceGetLuid)(luid, deviceNodeMask, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(char *, unsigned int *, CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetLuid)(__pyx_v_luid, __pyx_v_deviceNodeMask, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":4032
 *             raise RuntimeError('Function "cuDeviceGetLuid" not found')
 *     err = (<CUresult (*)(char*, unsigned int*, CUdevice) nogil> __cuDeviceGetLuid)(luid, deviceNodeMask, dev)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceTotalMem_v2(size_t* numbytes, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4026
 * 
 * cdef CUresult _cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetLuid             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetLuid == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4025
 *     return err
 * 
 * cdef CUresult _cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetLuid
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDeviceGetLuid", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4034
 *     return err
 * 
 * cdef CUresult _cuDeviceTotalMem_v2(size_t* numbytes, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceTotalMem_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceTotalMem_v2(size_t *__pyx_v_numbytes, CUdevice __pyx_v_dev) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDeviceTotalMem_v2", 1);
  __Pyx_TraceCall("_cuDeviceTotalMem_v2", __pyx_f[0], 4034, 1, __PYX_ERR(0, 4034, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4035
 * 
 * cdef CUresult _cuDeviceTotalMem_v2(size_t* numbytes, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceTotalMem_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceTotalMem_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4036
 * cdef CUresult _cuDeviceTotalMem_v2(size_t* numbytes, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceTotalMem_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDeviceTotalMem_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4036, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4037
 *     global __cuDeviceTotalMem_v2
 *     cuPythonInit()
 *     if __cuDeviceTotalMem_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceTotalMem_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceTotalMem_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4038
 *     cuPythonInit()
 *     if __cuDeviceTotalMem_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceTotalMem_v2" not found')
 *     err = (<CUresult (*)(size_t*, CUdevice) nogil> __cuDeviceTotalMem_v2)(numbytes, dev)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4039
 *     if __cuDeviceTotalMem_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceTotalMem_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(size_t*, CUdevice) nogil> __cuDeviceTotalMem_v2)(numbytes, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4039, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4039, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4038
 *     cuPythonInit()
 *     if __cuDeviceTotalMem_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceTotalMem_v2" not found')
 *     err = (<CUresult (*)(size_t*, CUdevice) nogil> __cuDeviceTotalMem_v2)(numbytes, dev)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4037
 *     global __cuDeviceTotalMem_v2
 *     cuPythonInit()
 *     if __cuDeviceTotalMem_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceTotalMem_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4040
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceTotalMem_v2" not found')
 *     err = (<CUresult (*)(size_t*, CUdevice) nogil> __cuDeviceTotalMem_v2)(numbytes, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(size_t *, CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceTotalMem_v2)(__pyx_v_numbytes, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":4041
 *             raise RuntimeError('Function "cuDeviceTotalMem_v2" not found')
 *     err = (<CUresult (*)(size_t*, CUdevice) nogil> __cuDeviceTotalMem_v2)(numbytes, dev)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format pformat, unsigned numChannels, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4035
 * 
 * cdef CUresult _cuDeviceTotalMem_v2(size_t* numbytes, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceTotalMem_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceTotalMem_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4034
 *     return err
 * 
 * cdef CUresult _cuDeviceTotalMem_v2(size_t* numbytes, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceTotalMem_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDeviceTotalMem_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4043
 *     return err
 * 
 * cdef CUresult _cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format pformat, unsigned numChannels, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetTexture1DLinearMaxWidth
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetTexture1DLinearMaxWidth(size_t *__pyx_v_maxWidthInElements, CUarray_format __pyx_v_pformat, unsigned int __pyx_v_numChannels, CUdevice __pyx_v_dev) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDeviceGetTexture1DLinearMaxWidth", 1);
  __Pyx_TraceCall("_cuDeviceGetTexture1DLinearMaxWidth", __pyx_f[0], 4043, 1, __PYX_ERR(0, 4043, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4044
 * 
 * cdef CUresult _cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format pformat, unsigned numChannels, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetTexture1DLinearMaxWidth             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetTexture1DLinearMaxWidth == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4045
 * cdef CUresult _cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format pformat, unsigned numChannels, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetTexture1DLinearMaxWidth
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDeviceGetTexture1DLinearMaxWidth == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4045, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4046
 *     global __cuDeviceGetTexture1DLinearMaxWidth
 *     cuPythonInit()
 *     if __cuDeviceGetTexture1DLinearMaxWidth == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetTexture1DLinearMaxWidth" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetTexture1DLinearMaxWidth == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4047
 *     cuPythonInit()
 *     if __cuDeviceGetTexture1DLinearMaxWidth == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetTexture1DLinearMaxWidth" not found')
 *     err = (<CUresult (*)(size_t*, CUarray_format, unsigned, CUdevice) nogil> __cuDeviceGetTexture1DLinearMaxWidth)(maxWidthInElements, pformat, numChannels, dev)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4048
 *     if __cuDeviceGetTexture1DLinearMaxWidth == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetTexture1DLinearMaxWidth" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(size_t*, CUarray_format, unsigned, CUdevice) nogil> __cuDeviceGetTexture1DLinearMaxWidth)(maxWidthInElements, pformat, numChannels, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4048, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4048, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4047
 *     cuPythonInit()
 *     if __cuDeviceGetTexture1DLinearMaxWidth == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetTexture1DLinearMaxWidth" not found')
 *     err = (<CUresult (*)(size_t*, CUarray_format, unsigned, CUdevice) nogil> __cuDeviceGetTexture1DLinearMaxWidth)(maxWidthInElements, pformat, numChannels, dev)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4046
 *     global __cuDeviceGetTexture1DLinearMaxWidth
 *     cuPythonInit()
 *     if __cuDeviceGetTexture1DLinearMaxWidth == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetTexture1DLinearMaxWidth" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4049
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetTexture1DLinearMaxWidth" not found')
 *     err = (<CUresult (*)(size_t*, CUarray_format, unsigned, CUdevice) nogil> __cuDeviceGetTexture1DLinearMaxWidth)(maxWidthInElements, pformat, numChannels, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(size_t *, CUarray_format, unsigned int, CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetTexture1DLinearMaxWidth)(__pyx_v_maxWidthInElements, __pyx_v_pformat, __pyx_v_numChannels, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":4050
 *             raise RuntimeError('Function "cuDeviceGetTexture1DLinearMaxWidth" not found')
 *     err = (<CUresult (*)(size_t*, CUarray_format, unsigned, CUdevice) nogil> __cuDeviceGetTexture1DLinearMaxWidth)(maxWidthInElements, pformat, numChannels, dev)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4044
 * 
 * cdef CUresult _cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format pformat, unsigned numChannels, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetTexture1DLinearMaxWidth             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetTexture1DLinearMaxWidth == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4043
 *     return err
 * 
 * cdef CUresult _cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format pformat, unsigned numChannels, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetTexture1DLinearMaxWidth
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDeviceGetTexture1DLinearMaxWidth", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4052
 *     return err
 * 
 * cdef CUresult _cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetAttribute
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute(int *__pyx_v_pi, CUdevice_attribute __pyx_v_attrib, CUdevice __pyx_v_dev) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDeviceGetAttribute", 1);
  __Pyx_TraceCall("_cuDeviceGetAttribute", __pyx_f[0], 4052, 1, __PYX_ERR(0, 4052, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4053
 * 
 * cdef CUresult _cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4054
 * cdef CUresult _cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetAttribute
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDeviceGetAttribute == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4054, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4055
 *     global __cuDeviceGetAttribute
 *     cuPythonInit()
 *     if __cuDeviceGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetAttribute" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetAttribute == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4056
 *     cuPythonInit()
 *     if __cuDeviceGetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetAttribute" not found')
 *     err = (<CUresult (*)(int*, CUdevice_attribute, CUdevice) nogil> __cuDeviceGetAttribute)(pi, attrib, dev)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4057
 *     if __cuDeviceGetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, CUdevice_attribute, CUdevice) nogil> __cuDeviceGetAttribute)(pi, attrib, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4057, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4057, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4056
 *     cuPythonInit()
 *     if __cuDeviceGetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetAttribute" not found')
 *     err = (<CUresult (*)(int*, CUdevice_attribute, CUdevice) nogil> __cuDeviceGetAttribute)(pi, attrib, dev)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4055
 *     global __cuDeviceGetAttribute
 *     cuPythonInit()
 *     if __cuDeviceGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4058
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetAttribute" not found')
 *     err = (<CUresult (*)(int*, CUdevice_attribute, CUdevice) nogil> __cuDeviceGetAttribute)(pi, attrib, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(int *, CUdevice_attribute, CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetAttribute)(__pyx_v_pi, __pyx_v_attrib, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":4059
 *             raise RuntimeError('Function "cuDeviceGetAttribute" not found')
 *     err = (<CUresult (*)(int*, CUdevice_attribute, CUdevice) nogil> __cuDeviceGetAttribute)(pi, attrib, dev)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4053
 * 
 * cdef CUresult _cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetAttribute == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4052
 *     return err
 * 
 * cdef CUresult _cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetAttribute
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDeviceGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4061
 *     return err
 * 
 * cdef CUresult _cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetNvSciSyncAttributes
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetNvSciSyncAttributes(void *__pyx_v_nvSciSyncAttrList, CUdevice __pyx_v_dev, int __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDeviceGetNvSciSyncAttributes", 1);
  __Pyx_TraceCall("_cuDeviceGetNvSciSyncAttributes", __pyx_f[0], 4061, 1, __PYX_ERR(0, 4061, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4062
 * 
 * cdef CUresult _cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetNvSciSyncAttributes             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetNvSciSyncAttributes == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4063
 * cdef CUresult _cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetNvSciSyncAttributes
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDeviceGetNvSciSyncAttributes == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4063, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4064
 *     global __cuDeviceGetNvSciSyncAttributes
 *     cuPythonInit()
 *     if __cuDeviceGetNvSciSyncAttributes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetNvSciSyncAttributes" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetNvSciSyncAttributes == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4065
 *     cuPythonInit()
 *     if __cuDeviceGetNvSciSyncAttributes == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetNvSciSyncAttributes" not found')
 *     err = (<CUresult (*)(void*, CUdevice, int) nogil> __cuDeviceGetNvSciSyncAttributes)(nvSciSyncAttrList, dev, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4066
 *     if __cuDeviceGetNvSciSyncAttributes == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetNvSciSyncAttributes" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*, CUdevice, int) nogil> __cuDeviceGetNvSciSyncAttributes)(nvSciSyncAttrList, dev, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4066, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4066, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4065
 *     cuPythonInit()
 *     if __cuDeviceGetNvSciSyncAttributes == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetNvSciSyncAttributes" not found')
 *     err = (<CUresult (*)(void*, CUdevice, int) nogil> __cuDeviceGetNvSciSyncAttributes)(nvSciSyncAttrList, dev, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4064
 *     global __cuDeviceGetNvSciSyncAttributes
 *     cuPythonInit()
 *     if __cuDeviceGetNvSciSyncAttributes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetNvSciSyncAttributes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4067
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetNvSciSyncAttributes" not found')
 *     err = (<CUresult (*)(void*, CUdevice, int) nogil> __cuDeviceGetNvSciSyncAttributes)(nvSciSyncAttrList, dev, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(void *, CUdevice, int))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetNvSciSyncAttributes)(__pyx_v_nvSciSyncAttrList, __pyx_v_dev, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":4068
 *             raise RuntimeError('Function "cuDeviceGetNvSciSyncAttributes" not found')
 *     err = (<CUresult (*)(void*, CUdevice, int) nogil> __cuDeviceGetNvSciSyncAttributes)(nvSciSyncAttrList, dev, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4062
 * 
 * cdef CUresult _cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetNvSciSyncAttributes             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetNvSciSyncAttributes == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4061
 *     return err
 * 
 * cdef CUresult _cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetNvSciSyncAttributes
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDeviceGetNvSciSyncAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4070
 *     return err
 * 
 * cdef CUresult _cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceSetMemPool
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceSetMemPool(CUdevice __pyx_v_dev, CUmemoryPool __pyx_v_pool) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDeviceSetMemPool", 1);
  __Pyx_TraceCall("_cuDeviceSetMemPool", __pyx_f[0], 4070, 1, __PYX_ERR(0, 4070, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4071
 * 
 * cdef CUresult _cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceSetMemPool             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceSetMemPool == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4072
 * cdef CUresult _cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceSetMemPool
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDeviceSetMemPool == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4072, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4073
 *     global __cuDeviceSetMemPool
 *     cuPythonInit()
 *     if __cuDeviceSetMemPool == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceSetMemPool" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceSetMemPool == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4074
 *     cuPythonInit()
 *     if __cuDeviceSetMemPool == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceSetMemPool" not found')
 *     err = (<CUresult (*)(CUdevice, CUmemoryPool) nogil> __cuDeviceSetMemPool)(dev, pool)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4075
 *     if __cuDeviceSetMemPool == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceSetMemPool" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice, CUmemoryPool) nogil> __cuDeviceSetMemPool)(dev, pool)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4075, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4075, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4074
 *     cuPythonInit()
 *     if __cuDeviceSetMemPool == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceSetMemPool" not found')
 *     err = (<CUresult (*)(CUdevice, CUmemoryPool) nogil> __cuDeviceSetMemPool)(dev, pool)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4073
 *     global __cuDeviceSetMemPool
 *     cuPythonInit()
 *     if __cuDeviceSetMemPool == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceSetMemPool" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4076
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceSetMemPool" not found')
 *     err = (<CUresult (*)(CUdevice, CUmemoryPool) nogil> __cuDeviceSetMemPool)(dev, pool)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdevice, CUmemoryPool))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceSetMemPool)(__pyx_v_dev, __pyx_v_pool);

    /* "cuda/_cuda/ccuda.pyx":4077
 *             raise RuntimeError('Function "cuDeviceSetMemPool" not found')
 *     err = (<CUresult (*)(CUdevice, CUmemoryPool) nogil> __cuDeviceSetMemPool)(dev, pool)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4071
 * 
 * cdef CUresult _cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceSetMemPool             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceSetMemPool == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4070
 *     return err
 * 
 * cdef CUresult _cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceSetMemPool
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDeviceSetMemPool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4079
 *     return err
 * 
 * cdef CUresult _cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetMemPool
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetMemPool(CUmemoryPool *__pyx_v_pool, CUdevice __pyx_v_dev) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDeviceGetMemPool", 1);
  __Pyx_TraceCall("_cuDeviceGetMemPool", __pyx_f[0], 4079, 1, __PYX_ERR(0, 4079, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4080
 * 
 * cdef CUresult _cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetMemPool             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetMemPool == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4081
 * cdef CUresult _cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetMemPool
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDeviceGetMemPool == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4081, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4082
 *     global __cuDeviceGetMemPool
 *     cuPythonInit()
 *     if __cuDeviceGetMemPool == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetMemPool" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetMemPool == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4083
 *     cuPythonInit()
 *     if __cuDeviceGetMemPool == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetMemPool" not found')
 *     err = (<CUresult (*)(CUmemoryPool*, CUdevice) nogil> __cuDeviceGetMemPool)(pool, dev)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4084
 *     if __cuDeviceGetMemPool == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetMemPool" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool*, CUdevice) nogil> __cuDeviceGetMemPool)(pool, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4084, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4084, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4083
 *     cuPythonInit()
 *     if __cuDeviceGetMemPool == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetMemPool" not found')
 *     err = (<CUresult (*)(CUmemoryPool*, CUdevice) nogil> __cuDeviceGetMemPool)(pool, dev)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4082
 *     global __cuDeviceGetMemPool
 *     cuPythonInit()
 *     if __cuDeviceGetMemPool == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetMemPool" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4085
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetMemPool" not found')
 *     err = (<CUresult (*)(CUmemoryPool*, CUdevice) nogil> __cuDeviceGetMemPool)(pool, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmemoryPool *, CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetMemPool)(__pyx_v_pool, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":4086
 *             raise RuntimeError('Function "cuDeviceGetMemPool" not found')
 *     err = (<CUresult (*)(CUmemoryPool*, CUdevice) nogil> __cuDeviceGetMemPool)(pool, dev)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4080
 * 
 * cdef CUresult _cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetMemPool             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetMemPool == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4079
 *     return err
 * 
 * cdef CUresult _cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetMemPool
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDeviceGetMemPool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4088
 *     return err
 * 
 * cdef CUresult _cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetDefaultMemPool
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetDefaultMemPool(CUmemoryPool *__pyx_v_pool_out, CUdevice __pyx_v_dev) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDeviceGetDefaultMemPool", 1);
  __Pyx_TraceCall("_cuDeviceGetDefaultMemPool", __pyx_f[0], 4088, 1, __PYX_ERR(0, 4088, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4089
 * 
 * cdef CUresult _cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetDefaultMemPool             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetDefaultMemPool == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4090
 * cdef CUresult _cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetDefaultMemPool
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDeviceGetDefaultMemPool == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4090, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4091
 *     global __cuDeviceGetDefaultMemPool
 *     cuPythonInit()
 *     if __cuDeviceGetDefaultMemPool == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetDefaultMemPool" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetDefaultMemPool == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4092
 *     cuPythonInit()
 *     if __cuDeviceGetDefaultMemPool == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetDefaultMemPool" not found')
 *     err = (<CUresult (*)(CUmemoryPool*, CUdevice) nogil> __cuDeviceGetDefaultMemPool)(pool_out, dev)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4093
 *     if __cuDeviceGetDefaultMemPool == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetDefaultMemPool" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool*, CUdevice) nogil> __cuDeviceGetDefaultMemPool)(pool_out, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4093, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4093, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4092
 *     cuPythonInit()
 *     if __cuDeviceGetDefaultMemPool == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetDefaultMemPool" not found')
 *     err = (<CUresult (*)(CUmemoryPool*, CUdevice) nogil> __cuDeviceGetDefaultMemPool)(pool_out, dev)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4091
 *     global __cuDeviceGetDefaultMemPool
 *     cuPythonInit()
 *     if __cuDeviceGetDefaultMemPool == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetDefaultMemPool" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4094
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetDefaultMemPool" not found')
 *     err = (<CUresult (*)(CUmemoryPool*, CUdevice) nogil> __cuDeviceGetDefaultMemPool)(pool_out, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmemoryPool *, CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetDefaultMemPool)(__pyx_v_pool_out, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":4095
 *             raise RuntimeError('Function "cuDeviceGetDefaultMemPool" not found')
 *     err = (<CUresult (*)(CUmemoryPool*, CUdevice) nogil> __cuDeviceGetDefaultMemPool)(pool_out, dev)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4089
 * 
 * cdef CUresult _cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetDefaultMemPool             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetDefaultMemPool == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4088
 *     return err
 * 
 * cdef CUresult _cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetDefaultMemPool
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDeviceGetDefaultMemPool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4097
 *     return err
 * 
 * cdef CUresult _cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetExecAffinitySupport
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetExecAffinitySupport(int *__pyx_v_pi, CUexecAffinityType __pyx_v_typename, CUdevice __pyx_v_dev) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDeviceGetExecAffinitySupport", 1);
  __Pyx_TraceCall("_cuDeviceGetExecAffinitySupport", __pyx_f[0], 4097, 1, __PYX_ERR(0, 4097, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4098
 * 
 * cdef CUresult _cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetExecAffinitySupport             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetExecAffinitySupport == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4099
 * cdef CUresult _cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetExecAffinitySupport
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDeviceGetExecAffinitySupport == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4099, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4100
 *     global __cuDeviceGetExecAffinitySupport
 *     cuPythonInit()
 *     if __cuDeviceGetExecAffinitySupport == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetExecAffinitySupport" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetExecAffinitySupport == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4101
 *     cuPythonInit()
 *     if __cuDeviceGetExecAffinitySupport == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetExecAffinitySupport" not found')
 *     err = (<CUresult (*)(int*, CUexecAffinityType, CUdevice) nogil> __cuDeviceGetExecAffinitySupport)(pi, typename, dev)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4102
 *     if __cuDeviceGetExecAffinitySupport == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetExecAffinitySupport" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, CUexecAffinityType, CUdevice) nogil> __cuDeviceGetExecAffinitySupport)(pi, typename, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4102, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4102, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4101
 *     cuPythonInit()
 *     if __cuDeviceGetExecAffinitySupport == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetExecAffinitySupport" not found')
 *     err = (<CUresult (*)(int*, CUexecAffinityType, CUdevice) nogil> __cuDeviceGetExecAffinitySupport)(pi, typename, dev)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4100
 *     global __cuDeviceGetExecAffinitySupport
 *     cuPythonInit()
 *     if __cuDeviceGetExecAffinitySupport == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetExecAffinitySupport" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4103
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetExecAffinitySupport" not found')
 *     err = (<CUresult (*)(int*, CUexecAffinityType, CUdevice) nogil> __cuDeviceGetExecAffinitySupport)(pi, typename, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(int *, CUexecAffinityType, CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetExecAffinitySupport)(__pyx_v_pi, __pyx_v_typename, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":4104
 *             raise RuntimeError('Function "cuDeviceGetExecAffinitySupport" not found')
 *     err = (<CUresult (*)(int*, CUexecAffinityType, CUdevice) nogil> __cuDeviceGetExecAffinitySupport)(pi, typename, dev)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4098
 * 
 * cdef CUresult _cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetExecAffinitySupport             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetExecAffinitySupport == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4097
 *     return err
 * 
 * cdef CUresult _cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetExecAffinitySupport
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDeviceGetExecAffinitySupport", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4106
 *     return err
 * 
 * cdef CUresult _cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuFlushGPUDirectRDMAWrites
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget __pyx_v_target, CUflushGPUDirectRDMAWritesScope __pyx_v_scope) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuFlushGPUDirectRDMAWrites", 1);
  __Pyx_TraceCall("_cuFlushGPUDirectRDMAWrites", __pyx_f[0], 4106, 1, __PYX_ERR(0, 4106, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4107
 * 
 * cdef CUresult _cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuFlushGPUDirectRDMAWrites             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuFlushGPUDirectRDMAWrites == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4108
 * cdef CUresult _cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuFlushGPUDirectRDMAWrites
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuFlushGPUDirectRDMAWrites == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4108, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4109
 *     global __cuFlushGPUDirectRDMAWrites
 *     cuPythonInit()
 *     if __cuFlushGPUDirectRDMAWrites == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFlushGPUDirectRDMAWrites" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuFlushGPUDirectRDMAWrites == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4110
 *     cuPythonInit()
 *     if __cuFlushGPUDirectRDMAWrites == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuFlushGPUDirectRDMAWrites" not found')
 *     err = (<CUresult (*)(CUflushGPUDirectRDMAWritesTarget, CUflushGPUDirectRDMAWritesScope) nogil> __cuFlushGPUDirectRDMAWrites)(target, scope)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4111
 *     if __cuFlushGPUDirectRDMAWrites == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFlushGPUDirectRDMAWrites" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUflushGPUDirectRDMAWritesTarget, CUflushGPUDirectRDMAWritesScope) nogil> __cuFlushGPUDirectRDMAWrites)(target, scope)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4111, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4111, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4110
 *     cuPythonInit()
 *     if __cuFlushGPUDirectRDMAWrites == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuFlushGPUDirectRDMAWrites" not found')
 *     err = (<CUresult (*)(CUflushGPUDirectRDMAWritesTarget, CUflushGPUDirectRDMAWritesScope) nogil> __cuFlushGPUDirectRDMAWrites)(target, scope)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4109
 *     global __cuFlushGPUDirectRDMAWrites
 *     cuPythonInit()
 *     if __cuFlushGPUDirectRDMAWrites == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFlushGPUDirectRDMAWrites" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4112
 *         with gil:
 *             raise RuntimeError('Function "cuFlushGPUDirectRDMAWrites" not found')
 *     err = (<CUresult (*)(CUflushGPUDirectRDMAWritesTarget, CUflushGPUDirectRDMAWritesScope) nogil> __cuFlushGPUDirectRDMAWrites)(target, scope)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUflushGPUDirectRDMAWritesTarget, CUflushGPUDirectRDMAWritesScope))__pyx_v_4cuda_5_cuda_5ccuda___cuFlushGPUDirectRDMAWrites)(__pyx_v_target, __pyx_v_scope);

    /* "cuda/_cuda/ccuda.pyx":4113
 *             raise RuntimeError('Function "cuFlushGPUDirectRDMAWrites" not found')
 *     err = (<CUresult (*)(CUflushGPUDirectRDMAWritesTarget, CUflushGPUDirectRDMAWritesScope) nogil> __cuFlushGPUDirectRDMAWrites)(target, scope)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4107
 * 
 * cdef CUresult _cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuFlushGPUDirectRDMAWrites             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuFlushGPUDirectRDMAWrites == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4106
 *     return err
 * 
 * cdef CUresult _cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuFlushGPUDirectRDMAWrites
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuFlushGPUDirectRDMAWrites", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4115
 *     return err
 * 
 * cdef CUresult _cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetProperties
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetProperties(CUdevprop *__pyx_v_prop, CUdevice __pyx_v_dev) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDeviceGetProperties", 1);
  __Pyx_TraceCall("_cuDeviceGetProperties", __pyx_f[0], 4115, 1, __PYX_ERR(0, 4115, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4116
 * 
 * cdef CUresult _cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetProperties             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetProperties == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4117
 * cdef CUresult _cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetProperties
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDeviceGetProperties == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4117, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4118
 *     global __cuDeviceGetProperties
 *     cuPythonInit()
 *     if __cuDeviceGetProperties == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetProperties" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetProperties == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4119
 *     cuPythonInit()
 *     if __cuDeviceGetProperties == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetProperties" not found')
 *     err = (<CUresult (*)(CUdevprop*, CUdevice) nogil> __cuDeviceGetProperties)(prop, dev)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4120
 *     if __cuDeviceGetProperties == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetProperties" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevprop*, CUdevice) nogil> __cuDeviceGetProperties)(prop, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4120, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4120, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4119
 *     cuPythonInit()
 *     if __cuDeviceGetProperties == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetProperties" not found')
 *     err = (<CUresult (*)(CUdevprop*, CUdevice) nogil> __cuDeviceGetProperties)(prop, dev)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4118
 *     global __cuDeviceGetProperties
 *     cuPythonInit()
 *     if __cuDeviceGetProperties == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetProperties" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4121
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetProperties" not found')
 *     err = (<CUresult (*)(CUdevprop*, CUdevice) nogil> __cuDeviceGetProperties)(prop, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdevprop *, CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetProperties)(__pyx_v_prop, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":4122
 *             raise RuntimeError('Function "cuDeviceGetProperties" not found')
 *     err = (<CUresult (*)(CUdevprop*, CUdevice) nogil> __cuDeviceGetProperties)(prop, dev)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4116
 * 
 * cdef CUresult _cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetProperties             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetProperties == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4115
 *     return err
 * 
 * cdef CUresult _cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetProperties
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDeviceGetProperties", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4124
 *     return err
 * 
 * cdef CUresult _cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceComputeCapability
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceComputeCapability(int *__pyx_v_major, int *__pyx_v_minor, CUdevice __pyx_v_dev) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDeviceComputeCapability", 1);
  __Pyx_TraceCall("_cuDeviceComputeCapability", __pyx_f[0], 4124, 1, __PYX_ERR(0, 4124, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4125
 * 
 * cdef CUresult _cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceComputeCapability             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceComputeCapability == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4126
 * cdef CUresult _cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceComputeCapability
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDeviceComputeCapability == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4126, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4127
 *     global __cuDeviceComputeCapability
 *     cuPythonInit()
 *     if __cuDeviceComputeCapability == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceComputeCapability" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceComputeCapability == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4128
 *     cuPythonInit()
 *     if __cuDeviceComputeCapability == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceComputeCapability" not found')
 *     err = (<CUresult (*)(int*, int*, CUdevice) nogil> __cuDeviceComputeCapability)(major, minor, dev)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4129
 *     if __cuDeviceComputeCapability == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceComputeCapability" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, int*, CUdevice) nogil> __cuDeviceComputeCapability)(major, minor, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4129, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4129, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4128
 *     cuPythonInit()
 *     if __cuDeviceComputeCapability == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceComputeCapability" not found')
 *     err = (<CUresult (*)(int*, int*, CUdevice) nogil> __cuDeviceComputeCapability)(major, minor, dev)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4127
 *     global __cuDeviceComputeCapability
 *     cuPythonInit()
 *     if __cuDeviceComputeCapability == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceComputeCapability" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4130
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceComputeCapability" not found')
 *     err = (<CUresult (*)(int*, int*, CUdevice) nogil> __cuDeviceComputeCapability)(major, minor, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(int *, int *, CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceComputeCapability)(__pyx_v_major, __pyx_v_minor, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":4131
 *             raise RuntimeError('Function "cuDeviceComputeCapability" not found')
 *     err = (<CUresult (*)(int*, int*, CUdevice) nogil> __cuDeviceComputeCapability)(major, minor, dev)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4125
 * 
 * cdef CUresult _cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceComputeCapability             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceComputeCapability == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4124
 *     return err
 * 
 * cdef CUresult _cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceComputeCapability
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDeviceComputeCapability", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4133
 *     return err
 * 
 * cdef CUresult _cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDevicePrimaryCtxRetain
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxRetain(CUcontext *__pyx_v_pctx, CUdevice __pyx_v_dev) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDevicePrimaryCtxRetain", 1);
  __Pyx_TraceCall("_cuDevicePrimaryCtxRetain", __pyx_f[0], 4133, 1, __PYX_ERR(0, 4133, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4134
 * 
 * cdef CUresult _cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDevicePrimaryCtxRetain             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxRetain == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4135
 * cdef CUresult _cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDevicePrimaryCtxRetain
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDevicePrimaryCtxRetain == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4135, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4136
 *     global __cuDevicePrimaryCtxRetain
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxRetain == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRetain" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxRetain == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4137
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxRetain == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRetain" not found')
 *     err = (<CUresult (*)(CUcontext*, CUdevice) nogil> __cuDevicePrimaryCtxRetain)(pctx, dev)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4138
 *     if __cuDevicePrimaryCtxRetain == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRetain" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*, CUdevice) nogil> __cuDevicePrimaryCtxRetain)(pctx, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4138, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4138, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4137
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxRetain == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRetain" not found')
 *     err = (<CUresult (*)(CUcontext*, CUdevice) nogil> __cuDevicePrimaryCtxRetain)(pctx, dev)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4136
 *     global __cuDevicePrimaryCtxRetain
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxRetain == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRetain" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4139
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRetain" not found')
 *     err = (<CUresult (*)(CUcontext*, CUdevice) nogil> __cuDevicePrimaryCtxRetain)(pctx, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUcontext *, CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxRetain)(__pyx_v_pctx, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":4140
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRetain" not found')
 *     err = (<CUresult (*)(CUcontext*, CUdevice) nogil> __cuDevicePrimaryCtxRetain)(pctx, dev)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDevicePrimaryCtxRelease_v2(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4134
 * 
 * cdef CUresult _cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDevicePrimaryCtxRetain             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxRetain == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4133
 *     return err
 * 
 * cdef CUresult _cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDevicePrimaryCtxRetain
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDevicePrimaryCtxRetain", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4142
 *     return err
 * 
 * cdef CUresult _cuDevicePrimaryCtxRelease_v2(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDevicePrimaryCtxRelease_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxRelease_v2(CUdevice __pyx_v_dev) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDevicePrimaryCtxRelease_v2", 1);
  __Pyx_TraceCall("_cuDevicePrimaryCtxRelease_v2", __pyx_f[0], 4142, 1, __PYX_ERR(0, 4142, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4143
 * 
 * cdef CUresult _cuDevicePrimaryCtxRelease_v2(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDevicePrimaryCtxRelease_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxRelease_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4144
 * cdef CUresult _cuDevicePrimaryCtxRelease_v2(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDevicePrimaryCtxRelease_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDevicePrimaryCtxRelease_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4144, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4145
 *     global __cuDevicePrimaryCtxRelease_v2
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxRelease_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRelease_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxRelease_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4146
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxRelease_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRelease_v2" not found')
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDevicePrimaryCtxRelease_v2)(dev)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4147
 *     if __cuDevicePrimaryCtxRelease_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRelease_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDevicePrimaryCtxRelease_v2)(dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4147, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4147, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4146
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxRelease_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRelease_v2" not found')
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDevicePrimaryCtxRelease_v2)(dev)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4145
 *     global __cuDevicePrimaryCtxRelease_v2
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxRelease_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRelease_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4148
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRelease_v2" not found')
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDevicePrimaryCtxRelease_v2)(dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxRelease_v2)(__pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":4149
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRelease_v2" not found')
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDevicePrimaryCtxRelease_v2)(dev)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDevicePrimaryCtxSetFlags_v2(CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4143
 * 
 * cdef CUresult _cuDevicePrimaryCtxRelease_v2(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDevicePrimaryCtxRelease_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxRelease_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4142
 *     return err
 * 
 * cdef CUresult _cuDevicePrimaryCtxRelease_v2(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDevicePrimaryCtxRelease_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDevicePrimaryCtxRelease_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4151
 *     return err
 * 
 * cdef CUresult _cuDevicePrimaryCtxSetFlags_v2(CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDevicePrimaryCtxSetFlags_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxSetFlags_v2(CUdevice __pyx_v_dev, unsigned int __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDevicePrimaryCtxSetFlags_v2", 1);
  __Pyx_TraceCall("_cuDevicePrimaryCtxSetFlags_v2", __pyx_f[0], 4151, 1, __PYX_ERR(0, 4151, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4152
 * 
 * cdef CUresult _cuDevicePrimaryCtxSetFlags_v2(CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDevicePrimaryCtxSetFlags_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxSetFlags_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4153
 * cdef CUresult _cuDevicePrimaryCtxSetFlags_v2(CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDevicePrimaryCtxSetFlags_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDevicePrimaryCtxSetFlags_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4153, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4154
 *     global __cuDevicePrimaryCtxSetFlags_v2
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxSetFlags_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxSetFlags_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxSetFlags_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4155
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxSetFlags_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDevicePrimaryCtxSetFlags_v2" not found')
 *     err = (<CUresult (*)(CUdevice, unsigned int) nogil> __cuDevicePrimaryCtxSetFlags_v2)(dev, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4156
 *     if __cuDevicePrimaryCtxSetFlags_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxSetFlags_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice, unsigned int) nogil> __cuDevicePrimaryCtxSetFlags_v2)(dev, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4156, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4156, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4155
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxSetFlags_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDevicePrimaryCtxSetFlags_v2" not found')
 *     err = (<CUresult (*)(CUdevice, unsigned int) nogil> __cuDevicePrimaryCtxSetFlags_v2)(dev, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4154
 *     global __cuDevicePrimaryCtxSetFlags_v2
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxSetFlags_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxSetFlags_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4157
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxSetFlags_v2" not found')
 *     err = (<CUresult (*)(CUdevice, unsigned int) nogil> __cuDevicePrimaryCtxSetFlags_v2)(dev, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdevice, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxSetFlags_v2)(__pyx_v_dev, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":4158
 *             raise RuntimeError('Function "cuDevicePrimaryCtxSetFlags_v2" not found')
 *     err = (<CUresult (*)(CUdevice, unsigned int) nogil> __cuDevicePrimaryCtxSetFlags_v2)(dev, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4152
 * 
 * cdef CUresult _cuDevicePrimaryCtxSetFlags_v2(CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDevicePrimaryCtxSetFlags_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxSetFlags_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4151
 *     return err
 * 
 * cdef CUresult _cuDevicePrimaryCtxSetFlags_v2(CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDevicePrimaryCtxSetFlags_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDevicePrimaryCtxSetFlags_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4160
 *     return err
 * 
 * cdef CUresult _cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDevicePrimaryCtxGetState
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxGetState(CUdevice __pyx_v_dev, unsigned int *__pyx_v_flags, int *__pyx_v_active) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDevicePrimaryCtxGetState", 1);
  __Pyx_TraceCall("_cuDevicePrimaryCtxGetState", __pyx_f[0], 4160, 1, __PYX_ERR(0, 4160, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4161
 * 
 * cdef CUresult _cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDevicePrimaryCtxGetState             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxGetState == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4162
 * cdef CUresult _cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDevicePrimaryCtxGetState
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDevicePrimaryCtxGetState == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4162, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4163
 *     global __cuDevicePrimaryCtxGetState
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxGetState == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxGetState" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxGetState == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4164
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxGetState == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDevicePrimaryCtxGetState" not found')
 *     err = (<CUresult (*)(CUdevice, unsigned int*, int*) nogil> __cuDevicePrimaryCtxGetState)(dev, flags, active)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4165
 *     if __cuDevicePrimaryCtxGetState == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxGetState" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice, unsigned int*, int*) nogil> __cuDevicePrimaryCtxGetState)(dev, flags, active)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4165, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4165, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4164
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxGetState == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDevicePrimaryCtxGetState" not found')
 *     err = (<CUresult (*)(CUdevice, unsigned int*, int*) nogil> __cuDevicePrimaryCtxGetState)(dev, flags, active)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4163
 *     global __cuDevicePrimaryCtxGetState
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxGetState == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxGetState" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4166
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxGetState" not found')
 *     err = (<CUresult (*)(CUdevice, unsigned int*, int*) nogil> __cuDevicePrimaryCtxGetState)(dev, flags, active)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdevice, unsigned int *, int *))__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxGetState)(__pyx_v_dev, __pyx_v_flags, __pyx_v_active);

    /* "cuda/_cuda/ccuda.pyx":4167
 *             raise RuntimeError('Function "cuDevicePrimaryCtxGetState" not found')
 *     err = (<CUresult (*)(CUdevice, unsigned int*, int*) nogil> __cuDevicePrimaryCtxGetState)(dev, flags, active)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDevicePrimaryCtxReset_v2(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4161
 * 
 * cdef CUresult _cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDevicePrimaryCtxGetState             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxGetState == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4160
 *     return err
 * 
 * cdef CUresult _cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDevicePrimaryCtxGetState
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDevicePrimaryCtxGetState", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4169
 *     return err
 * 
 * cdef CUresult _cuDevicePrimaryCtxReset_v2(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDevicePrimaryCtxReset_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxReset_v2(CUdevice __pyx_v_dev) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDevicePrimaryCtxReset_v2", 1);
  __Pyx_TraceCall("_cuDevicePrimaryCtxReset_v2", __pyx_f[0], 4169, 1, __PYX_ERR(0, 4169, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4170
 * 
 * cdef CUresult _cuDevicePrimaryCtxReset_v2(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDevicePrimaryCtxReset_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxReset_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4171
 * cdef CUresult _cuDevicePrimaryCtxReset_v2(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDevicePrimaryCtxReset_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDevicePrimaryCtxReset_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4171, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4172
 *     global __cuDevicePrimaryCtxReset_v2
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxReset_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxReset_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxReset_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4173
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxReset_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDevicePrimaryCtxReset_v2" not found')
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDevicePrimaryCtxReset_v2)(dev)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4174
 *     if __cuDevicePrimaryCtxReset_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxReset_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDevicePrimaryCtxReset_v2)(dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4174, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4174, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4173
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxReset_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDevicePrimaryCtxReset_v2" not found')
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDevicePrimaryCtxReset_v2)(dev)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4172
 *     global __cuDevicePrimaryCtxReset_v2
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxReset_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxReset_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4175
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxReset_v2" not found')
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDevicePrimaryCtxReset_v2)(dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxReset_v2)(__pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":4176
 *             raise RuntimeError('Function "cuDevicePrimaryCtxReset_v2" not found')
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDevicePrimaryCtxReset_v2)(dev)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxCreate_v2(CUcontext* pctx, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4170
 * 
 * cdef CUresult _cuDevicePrimaryCtxReset_v2(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDevicePrimaryCtxReset_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxReset_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4169
 *     return err
 * 
 * cdef CUresult _cuDevicePrimaryCtxReset_v2(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDevicePrimaryCtxReset_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDevicePrimaryCtxReset_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4178
 *     return err
 * 
 * cdef CUresult _cuCtxCreate_v2(CUcontext* pctx, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxCreate_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxCreate_v2(CUcontext *__pyx_v_pctx, unsigned int __pyx_v_flags, CUdevice __pyx_v_dev) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCtxCreate_v2", 1);
  __Pyx_TraceCall("_cuCtxCreate_v2", __pyx_f[0], 4178, 1, __PYX_ERR(0, 4178, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4179
 * 
 * cdef CUresult _cuCtxCreate_v2(CUcontext* pctx, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxCreate_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxCreate_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4180
 * cdef CUresult _cuCtxCreate_v2(CUcontext* pctx, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxCreate_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCtxCreate_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4180, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4181
 *     global __cuCtxCreate_v2
 *     cuPythonInit()
 *     if __cuCtxCreate_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxCreate_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCtxCreate_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4182
 *     cuPythonInit()
 *     if __cuCtxCreate_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxCreate_v2" not found')
 *     err = (<CUresult (*)(CUcontext*, unsigned int, CUdevice) nogil> __cuCtxCreate_v2)(pctx, flags, dev)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4183
 *     if __cuCtxCreate_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxCreate_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*, unsigned int, CUdevice) nogil> __cuCtxCreate_v2)(pctx, flags, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4183, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4183, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4182
 *     cuPythonInit()
 *     if __cuCtxCreate_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxCreate_v2" not found')
 *     err = (<CUresult (*)(CUcontext*, unsigned int, CUdevice) nogil> __cuCtxCreate_v2)(pctx, flags, dev)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4181
 *     global __cuCtxCreate_v2
 *     cuPythonInit()
 *     if __cuCtxCreate_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxCreate_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4184
 *         with gil:
 *             raise RuntimeError('Function "cuCtxCreate_v2" not found')
 *     err = (<CUresult (*)(CUcontext*, unsigned int, CUdevice) nogil> __cuCtxCreate_v2)(pctx, flags, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUcontext *, unsigned int, CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxCreate_v2)(__pyx_v_pctx, __pyx_v_flags, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":4185
 *             raise RuntimeError('Function "cuCtxCreate_v2" not found')
 *     err = (<CUresult (*)(CUcontext*, unsigned int, CUdevice) nogil> __cuCtxCreate_v2)(pctx, flags, dev)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4179
 * 
 * cdef CUresult _cuCtxCreate_v2(CUcontext* pctx, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxCreate_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxCreate_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4178
 *     return err
 * 
 * cdef CUresult _cuCtxCreate_v2(CUcontext* pctx, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxCreate_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCtxCreate_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4187
 *     return err
 * 
 * cdef CUresult _cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxCreate_v3
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxCreate_v3(CUcontext *__pyx_v_pctx, CUexecAffinityParam *__pyx_v_paramsArray, int __pyx_v_numParams, unsigned int __pyx_v_flags, CUdevice __pyx_v_dev) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCtxCreate_v3", 1);
  __Pyx_TraceCall("_cuCtxCreate_v3", __pyx_f[0], 4187, 1, __PYX_ERR(0, 4187, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4188
 * 
 * cdef CUresult _cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxCreate_v3             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxCreate_v3 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4189
 * cdef CUresult _cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxCreate_v3
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCtxCreate_v3 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4189, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4190
 *     global __cuCtxCreate_v3
 *     cuPythonInit()
 *     if __cuCtxCreate_v3 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxCreate_v3" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCtxCreate_v3 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4191
 *     cuPythonInit()
 *     if __cuCtxCreate_v3 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxCreate_v3" not found')
 *     err = (<CUresult (*)(CUcontext*, CUexecAffinityParam*, int, unsigned int, CUdevice) nogil> __cuCtxCreate_v3)(pctx, paramsArray, numParams, flags, dev)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4192
 *     if __cuCtxCreate_v3 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxCreate_v3" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*, CUexecAffinityParam*, int, unsigned int, CUdevice) nogil> __cuCtxCreate_v3)(pctx, paramsArray, numParams, flags, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4192, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4192, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4191
 *     cuPythonInit()
 *     if __cuCtxCreate_v3 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxCreate_v3" not found')
 *     err = (<CUresult (*)(CUcontext*, CUexecAffinityParam*, int, unsigned int, CUdevice) nogil> __cuCtxCreate_v3)(pctx, paramsArray, numParams, flags, dev)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4190
 *     global __cuCtxCreate_v3
 *     cuPythonInit()
 *     if __cuCtxCreate_v3 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxCreate_v3" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4193
 *         with gil:
 *             raise RuntimeError('Function "cuCtxCreate_v3" not found')
 *     err = (<CUresult (*)(CUcontext*, CUexecAffinityParam*, int, unsigned int, CUdevice) nogil> __cuCtxCreate_v3)(pctx, paramsArray, numParams, flags, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUcontext *, CUexecAffinityParam *, int, unsigned int, CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxCreate_v3)(__pyx_v_pctx, __pyx_v_paramsArray, __pyx_v_numParams, __pyx_v_flags, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":4194
 *             raise RuntimeError('Function "cuCtxCreate_v3" not found')
 *     err = (<CUresult (*)(CUcontext*, CUexecAffinityParam*, int, unsigned int, CUdevice) nogil> __cuCtxCreate_v3)(pctx, paramsArray, numParams, flags, dev)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxDestroy_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4188
 * 
 * cdef CUresult _cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxCreate_v3             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxCreate_v3 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4187
 *     return err
 * 
 * cdef CUresult _cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxCreate_v3
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCtxCreate_v3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4196
 *     return err
 * 
 * cdef CUresult _cuCtxDestroy_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxDestroy_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxDestroy_v2(CUcontext __pyx_v_ctx) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCtxDestroy_v2", 1);
  __Pyx_TraceCall("_cuCtxDestroy_v2", __pyx_f[0], 4196, 1, __PYX_ERR(0, 4196, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4197
 * 
 * cdef CUresult _cuCtxDestroy_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxDestroy_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxDestroy_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4198
 * cdef CUresult _cuCtxDestroy_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxDestroy_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCtxDestroy_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4198, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4199
 *     global __cuCtxDestroy_v2
 *     cuPythonInit()
 *     if __cuCtxDestroy_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDestroy_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCtxDestroy_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4200
 *     cuPythonInit()
 *     if __cuCtxDestroy_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxDestroy_v2" not found')
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDestroy_v2)(ctx)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4201
 *     if __cuCtxDestroy_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDestroy_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDestroy_v2)(ctx)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4201, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4201, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4200
 *     cuPythonInit()
 *     if __cuCtxDestroy_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxDestroy_v2" not found')
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDestroy_v2)(ctx)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4199
 *     global __cuCtxDestroy_v2
 *     cuPythonInit()
 *     if __cuCtxDestroy_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDestroy_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4202
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDestroy_v2" not found')
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDestroy_v2)(ctx)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUcontext))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxDestroy_v2)(__pyx_v_ctx);

    /* "cuda/_cuda/ccuda.pyx":4203
 *             raise RuntimeError('Function "cuCtxDestroy_v2" not found')
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDestroy_v2)(ctx)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxPushCurrent_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4197
 * 
 * cdef CUresult _cuCtxDestroy_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxDestroy_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxDestroy_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4196
 *     return err
 * 
 * cdef CUresult _cuCtxDestroy_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxDestroy_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCtxDestroy_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4205
 *     return err
 * 
 * cdef CUresult _cuCtxPushCurrent_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxPushCurrent_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxPushCurrent_v2(CUcontext __pyx_v_ctx) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCtxPushCurrent_v2", 1);
  __Pyx_TraceCall("_cuCtxPushCurrent_v2", __pyx_f[0], 4205, 1, __PYX_ERR(0, 4205, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4206
 * 
 * cdef CUresult _cuCtxPushCurrent_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxPushCurrent_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxPushCurrent_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4207
 * cdef CUresult _cuCtxPushCurrent_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxPushCurrent_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCtxPushCurrent_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4207, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4208
 *     global __cuCtxPushCurrent_v2
 *     cuPythonInit()
 *     if __cuCtxPushCurrent_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxPushCurrent_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCtxPushCurrent_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4209
 *     cuPythonInit()
 *     if __cuCtxPushCurrent_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxPushCurrent_v2" not found')
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxPushCurrent_v2)(ctx)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4210
 *     if __cuCtxPushCurrent_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxPushCurrent_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxPushCurrent_v2)(ctx)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4210, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4210, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4209
 *     cuPythonInit()
 *     if __cuCtxPushCurrent_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxPushCurrent_v2" not found')
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxPushCurrent_v2)(ctx)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4208
 *     global __cuCtxPushCurrent_v2
 *     cuPythonInit()
 *     if __cuCtxPushCurrent_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxPushCurrent_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4211
 *         with gil:
 *             raise RuntimeError('Function "cuCtxPushCurrent_v2" not found')
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxPushCurrent_v2)(ctx)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUcontext))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxPushCurrent_v2)(__pyx_v_ctx);

    /* "cuda/_cuda/ccuda.pyx":4212
 *             raise RuntimeError('Function "cuCtxPushCurrent_v2" not found')
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxPushCurrent_v2)(ctx)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxPopCurrent_v2(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4206
 * 
 * cdef CUresult _cuCtxPushCurrent_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxPushCurrent_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxPushCurrent_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4205
 *     return err
 * 
 * cdef CUresult _cuCtxPushCurrent_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxPushCurrent_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCtxPushCurrent_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4214
 *     return err
 * 
 * cdef CUresult _cuCtxPopCurrent_v2(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxPopCurrent_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxPopCurrent_v2(CUcontext *__pyx_v_pctx) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCtxPopCurrent_v2", 1);
  __Pyx_TraceCall("_cuCtxPopCurrent_v2", __pyx_f[0], 4214, 1, __PYX_ERR(0, 4214, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4215
 * 
 * cdef CUresult _cuCtxPopCurrent_v2(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxPopCurrent_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxPopCurrent_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4216
 * cdef CUresult _cuCtxPopCurrent_v2(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxPopCurrent_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCtxPopCurrent_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4216, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4217
 *     global __cuCtxPopCurrent_v2
 *     cuPythonInit()
 *     if __cuCtxPopCurrent_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxPopCurrent_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCtxPopCurrent_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4218
 *     cuPythonInit()
 *     if __cuCtxPopCurrent_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxPopCurrent_v2" not found')
 *     err = (<CUresult (*)(CUcontext*) nogil> __cuCtxPopCurrent_v2)(pctx)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4219
 *     if __cuCtxPopCurrent_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxPopCurrent_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*) nogil> __cuCtxPopCurrent_v2)(pctx)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4219, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4219, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4218
 *     cuPythonInit()
 *     if __cuCtxPopCurrent_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxPopCurrent_v2" not found')
 *     err = (<CUresult (*)(CUcontext*) nogil> __cuCtxPopCurrent_v2)(pctx)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4217
 *     global __cuCtxPopCurrent_v2
 *     cuPythonInit()
 *     if __cuCtxPopCurrent_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxPopCurrent_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4220
 *         with gil:
 *             raise RuntimeError('Function "cuCtxPopCurrent_v2" not found')
 *     err = (<CUresult (*)(CUcontext*) nogil> __cuCtxPopCurrent_v2)(pctx)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUcontext *))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxPopCurrent_v2)(__pyx_v_pctx);

    /* "cuda/_cuda/ccuda.pyx":4221
 *             raise RuntimeError('Function "cuCtxPopCurrent_v2" not found')
 *     err = (<CUresult (*)(CUcontext*) nogil> __cuCtxPopCurrent_v2)(pctx)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxSetCurrent(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4215
 * 
 * cdef CUresult _cuCtxPopCurrent_v2(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxPopCurrent_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxPopCurrent_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4214
 *     return err
 * 
 * cdef CUresult _cuCtxPopCurrent_v2(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxPopCurrent_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCtxPopCurrent_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4223
 *     return err
 * 
 * cdef CUresult _cuCtxSetCurrent(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxSetCurrent
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetCurrent(CUcontext __pyx_v_ctx) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCtxSetCurrent", 1);
  __Pyx_TraceCall("_cuCtxSetCurrent", __pyx_f[0], 4223, 1, __PYX_ERR(0, 4223, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4224
 * 
 * cdef CUresult _cuCtxSetCurrent(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxSetCurrent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxSetCurrent == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4225
 * cdef CUresult _cuCtxSetCurrent(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxSetCurrent
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCtxSetCurrent == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4225, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4226
 *     global __cuCtxSetCurrent
 *     cuPythonInit()
 *     if __cuCtxSetCurrent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetCurrent" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetCurrent == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4227
 *     cuPythonInit()
 *     if __cuCtxSetCurrent == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxSetCurrent" not found')
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxSetCurrent)(ctx)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4228
 *     if __cuCtxSetCurrent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetCurrent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxSetCurrent)(ctx)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4228, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4228, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4227
 *     cuPythonInit()
 *     if __cuCtxSetCurrent == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxSetCurrent" not found')
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxSetCurrent)(ctx)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4226
 *     global __cuCtxSetCurrent
 *     cuPythonInit()
 *     if __cuCtxSetCurrent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetCurrent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4229
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetCurrent" not found')
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxSetCurrent)(ctx)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUcontext))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetCurrent)(__pyx_v_ctx);

    /* "cuda/_cuda/ccuda.pyx":4230
 *             raise RuntimeError('Function "cuCtxSetCurrent" not found')
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxSetCurrent)(ctx)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxGetCurrent(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4224
 * 
 * cdef CUresult _cuCtxSetCurrent(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxSetCurrent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxSetCurrent == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4223
 *     return err
 * 
 * cdef CUresult _cuCtxSetCurrent(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxSetCurrent
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCtxSetCurrent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4232
 *     return err
 * 
 * cdef CUresult _cuCtxGetCurrent(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetCurrent
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetCurrent(CUcontext *__pyx_v_pctx) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCtxGetCurrent", 1);
  __Pyx_TraceCall("_cuCtxGetCurrent", __pyx_f[0], 4232, 1, __PYX_ERR(0, 4232, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4233
 * 
 * cdef CUresult _cuCtxGetCurrent(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetCurrent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxGetCurrent == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4234
 * cdef CUresult _cuCtxGetCurrent(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetCurrent
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCtxGetCurrent == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4234, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4235
 *     global __cuCtxGetCurrent
 *     cuPythonInit()
 *     if __cuCtxGetCurrent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetCurrent" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetCurrent == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4236
 *     cuPythonInit()
 *     if __cuCtxGetCurrent == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxGetCurrent" not found')
 *     err = (<CUresult (*)(CUcontext*) nogil> __cuCtxGetCurrent)(pctx)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4237
 *     if __cuCtxGetCurrent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetCurrent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*) nogil> __cuCtxGetCurrent)(pctx)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4237, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4237, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4236
 *     cuPythonInit()
 *     if __cuCtxGetCurrent == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxGetCurrent" not found')
 *     err = (<CUresult (*)(CUcontext*) nogil> __cuCtxGetCurrent)(pctx)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4235
 *     global __cuCtxGetCurrent
 *     cuPythonInit()
 *     if __cuCtxGetCurrent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetCurrent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4238
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetCurrent" not found')
 *     err = (<CUresult (*)(CUcontext*) nogil> __cuCtxGetCurrent)(pctx)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUcontext *))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetCurrent)(__pyx_v_pctx);

    /* "cuda/_cuda/ccuda.pyx":4239
 *             raise RuntimeError('Function "cuCtxGetCurrent" not found')
 *     err = (<CUresult (*)(CUcontext*) nogil> __cuCtxGetCurrent)(pctx)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxGetDevice(CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4233
 * 
 * cdef CUresult _cuCtxGetCurrent(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetCurrent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxGetCurrent == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4232
 *     return err
 * 
 * cdef CUresult _cuCtxGetCurrent(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetCurrent
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCtxGetCurrent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4241
 *     return err
 * 
 * cdef CUresult _cuCtxGetDevice(CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetDevice
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetDevice(CUdevice *__pyx_v_device) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCtxGetDevice", 1);
  __Pyx_TraceCall("_cuCtxGetDevice", __pyx_f[0], 4241, 1, __PYX_ERR(0, 4241, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4242
 * 
 * cdef CUresult _cuCtxGetDevice(CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetDevice             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxGetDevice == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4243
 * cdef CUresult _cuCtxGetDevice(CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetDevice
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCtxGetDevice == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4243, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4244
 *     global __cuCtxGetDevice
 *     cuPythonInit()
 *     if __cuCtxGetDevice == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetDevice" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetDevice == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4245
 *     cuPythonInit()
 *     if __cuCtxGetDevice == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxGetDevice" not found')
 *     err = (<CUresult (*)(CUdevice*) nogil> __cuCtxGetDevice)(device)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4246
 *     if __cuCtxGetDevice == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetDevice" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice*) nogil> __cuCtxGetDevice)(device)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4246, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4246, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4245
 *     cuPythonInit()
 *     if __cuCtxGetDevice == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxGetDevice" not found')
 *     err = (<CUresult (*)(CUdevice*) nogil> __cuCtxGetDevice)(device)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4244
 *     global __cuCtxGetDevice
 *     cuPythonInit()
 *     if __cuCtxGetDevice == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetDevice" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4247
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetDevice" not found')
 *     err = (<CUresult (*)(CUdevice*) nogil> __cuCtxGetDevice)(device)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdevice *))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetDevice)(__pyx_v_device);

    /* "cuda/_cuda/ccuda.pyx":4248
 *             raise RuntimeError('Function "cuCtxGetDevice" not found')
 *     err = (<CUresult (*)(CUdevice*) nogil> __cuCtxGetDevice)(device)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxGetFlags(unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4242
 * 
 * cdef CUresult _cuCtxGetDevice(CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetDevice             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxGetDevice == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4241
 *     return err
 * 
 * cdef CUresult _cuCtxGetDevice(CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetDevice
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCtxGetDevice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4250
 *     return err
 * 
 * cdef CUresult _cuCtxGetFlags(unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetFlags
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetFlags(unsigned int *__pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCtxGetFlags", 1);
  __Pyx_TraceCall("_cuCtxGetFlags", __pyx_f[0], 4250, 1, __PYX_ERR(0, 4250, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4251
 * 
 * cdef CUresult _cuCtxGetFlags(unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxGetFlags == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4252
 * cdef CUresult _cuCtxGetFlags(unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetFlags
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCtxGetFlags == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4252, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4253
 *     global __cuCtxGetFlags
 *     cuPythonInit()
 *     if __cuCtxGetFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetFlags" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetFlags == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4254
 *     cuPythonInit()
 *     if __cuCtxGetFlags == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxGetFlags" not found')
 *     err = (<CUresult (*)(unsigned int*) nogil> __cuCtxGetFlags)(flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4255
 *     if __cuCtxGetFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int*) nogil> __cuCtxGetFlags)(flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4255, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4255, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4254
 *     cuPythonInit()
 *     if __cuCtxGetFlags == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxGetFlags" not found')
 *     err = (<CUresult (*)(unsigned int*) nogil> __cuCtxGetFlags)(flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4253
 *     global __cuCtxGetFlags
 *     cuPythonInit()
 *     if __cuCtxGetFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4256
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetFlags" not found')
 *     err = (<CUresult (*)(unsigned int*) nogil> __cuCtxGetFlags)(flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(unsigned int *))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetFlags)(__pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":4257
 *             raise RuntimeError('Function "cuCtxGetFlags" not found')
 *     err = (<CUresult (*)(unsigned int*) nogil> __cuCtxGetFlags)(flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxSetFlags(unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4251
 * 
 * cdef CUresult _cuCtxGetFlags(unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxGetFlags == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4250
 *     return err
 * 
 * cdef CUresult _cuCtxGetFlags(unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetFlags
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCtxGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4259
 *     return err
 * 
 * cdef CUresult _cuCtxSetFlags(unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxSetFlags
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetFlags(unsigned int __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCtxSetFlags", 1);
  __Pyx_TraceCall("_cuCtxSetFlags", __pyx_f[0], 4259, 1, __PYX_ERR(0, 4259, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4260
 * 
 * cdef CUresult _cuCtxSetFlags(unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxSetFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxSetFlags == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4261
 * cdef CUresult _cuCtxSetFlags(unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxSetFlags
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCtxSetFlags == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4261, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4262
 *     global __cuCtxSetFlags
 *     cuPythonInit()
 *     if __cuCtxSetFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetFlags" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetFlags == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4263
 *     cuPythonInit()
 *     if __cuCtxSetFlags == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxSetFlags" not found')
 *     err = (<CUresult (*)(unsigned int) nogil> __cuCtxSetFlags)(flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4264
 *     if __cuCtxSetFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int) nogil> __cuCtxSetFlags)(flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4264, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4264, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4263
 *     cuPythonInit()
 *     if __cuCtxSetFlags == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxSetFlags" not found')
 *     err = (<CUresult (*)(unsigned int) nogil> __cuCtxSetFlags)(flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4262
 *     global __cuCtxSetFlags
 *     cuPythonInit()
 *     if __cuCtxSetFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4265
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetFlags" not found')
 *     err = (<CUresult (*)(unsigned int) nogil> __cuCtxSetFlags)(flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetFlags)(__pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":4266
 *             raise RuntimeError('Function "cuCtxSetFlags" not found')
 *     err = (<CUresult (*)(unsigned int) nogil> __cuCtxSetFlags)(flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxGetId(CUcontext ctx, unsigned long long* ctxId) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4260
 * 
 * cdef CUresult _cuCtxSetFlags(unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxSetFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxSetFlags == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4259
 *     return err
 * 
 * cdef CUresult _cuCtxSetFlags(unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxSetFlags
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCtxSetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4268
 *     return err
 * 
 * cdef CUresult _cuCtxGetId(CUcontext ctx, unsigned long long* ctxId) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetId
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetId(CUcontext __pyx_v_ctx, unsigned PY_LONG_LONG *__pyx_v_ctxId) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCtxGetId", 1);
  __Pyx_TraceCall("_cuCtxGetId", __pyx_f[0], 4268, 1, __PYX_ERR(0, 4268, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4269
 * 
 * cdef CUresult _cuCtxGetId(CUcontext ctx, unsigned long long* ctxId) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetId             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxGetId == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4270
 * cdef CUresult _cuCtxGetId(CUcontext ctx, unsigned long long* ctxId) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetId
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCtxGetId == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4270, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4271
 *     global __cuCtxGetId
 *     cuPythonInit()
 *     if __cuCtxGetId == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetId" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetId == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4272
 *     cuPythonInit()
 *     if __cuCtxGetId == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxGetId" not found')
 *     err = (<CUresult (*)(CUcontext, unsigned long long*) nogil> __cuCtxGetId)(ctx, ctxId)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4273
 *     if __cuCtxGetId == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetId" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext, unsigned long long*) nogil> __cuCtxGetId)(ctx, ctxId)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4273, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4273, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4272
 *     cuPythonInit()
 *     if __cuCtxGetId == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxGetId" not found')
 *     err = (<CUresult (*)(CUcontext, unsigned long long*) nogil> __cuCtxGetId)(ctx, ctxId)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4271
 *     global __cuCtxGetId
 *     cuPythonInit()
 *     if __cuCtxGetId == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetId" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4274
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetId" not found')
 *     err = (<CUresult (*)(CUcontext, unsigned long long*) nogil> __cuCtxGetId)(ctx, ctxId)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUcontext, unsigned PY_LONG_LONG *))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetId)(__pyx_v_ctx, __pyx_v_ctxId);

    /* "cuda/_cuda/ccuda.pyx":4275
 *             raise RuntimeError('Function "cuCtxGetId" not found')
 *     err = (<CUresult (*)(CUcontext, unsigned long long*) nogil> __cuCtxGetId)(ctx, ctxId)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxSynchronize() except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4269
 * 
 * cdef CUresult _cuCtxGetId(CUcontext ctx, unsigned long long* ctxId) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetId             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxGetId == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4268
 *     return err
 * 
 * cdef CUresult _cuCtxGetId(CUcontext ctx, unsigned long long* ctxId) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetId
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCtxGetId", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4277
 *     return err
 * 
 * cdef CUresult _cuCtxSynchronize() except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxSynchronize
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxSynchronize(void) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCtxSynchronize", 1);
  __Pyx_TraceCall("_cuCtxSynchronize", __pyx_f[0], 4277, 1, __PYX_ERR(0, 4277, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4278
 * 
 * cdef CUresult _cuCtxSynchronize() except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxSynchronize             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxSynchronize == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4279
 * cdef CUresult _cuCtxSynchronize() except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxSynchronize
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCtxSynchronize == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4279, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4280
 *     global __cuCtxSynchronize
 *     cuPythonInit()
 *     if __cuCtxSynchronize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSynchronize" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSynchronize == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4281
 *     cuPythonInit()
 *     if __cuCtxSynchronize == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxSynchronize" not found')
 *     err = (<CUresult (*)() nogil> __cuCtxSynchronize)()
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4282
 *     if __cuCtxSynchronize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSynchronize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)() nogil> __cuCtxSynchronize)()
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4282, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4282, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4281
 *     cuPythonInit()
 *     if __cuCtxSynchronize == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxSynchronize" not found')
 *     err = (<CUresult (*)() nogil> __cuCtxSynchronize)()
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4280
 *     global __cuCtxSynchronize
 *     cuPythonInit()
 *     if __cuCtxSynchronize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSynchronize" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4283
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSynchronize" not found')
 *     err = (<CUresult (*)() nogil> __cuCtxSynchronize)()             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(void))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSynchronize)();

    /* "cuda/_cuda/ccuda.pyx":4284
 *             raise RuntimeError('Function "cuCtxSynchronize" not found')
 *     err = (<CUresult (*)() nogil> __cuCtxSynchronize)()
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxSetLimit(CUlimit limit, size_t value) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4278
 * 
 * cdef CUresult _cuCtxSynchronize() except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxSynchronize             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxSynchronize == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4277
 *     return err
 * 
 * cdef CUresult _cuCtxSynchronize() except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxSynchronize
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCtxSynchronize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4286
 *     return err
 * 
 * cdef CUresult _cuCtxSetLimit(CUlimit limit, size_t value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxSetLimit
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetLimit(CUlimit __pyx_v_limit, size_t __pyx_v_value) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCtxSetLimit", 1);
  __Pyx_TraceCall("_cuCtxSetLimit", __pyx_f[0], 4286, 1, __PYX_ERR(0, 4286, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4287
 * 
 * cdef CUresult _cuCtxSetLimit(CUlimit limit, size_t value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxSetLimit             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxSetLimit == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4288
 * cdef CUresult _cuCtxSetLimit(CUlimit limit, size_t value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxSetLimit
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCtxSetLimit == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4288, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4289
 *     global __cuCtxSetLimit
 *     cuPythonInit()
 *     if __cuCtxSetLimit == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetLimit" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetLimit == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4290
 *     cuPythonInit()
 *     if __cuCtxSetLimit == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxSetLimit" not found')
 *     err = (<CUresult (*)(CUlimit, size_t) nogil> __cuCtxSetLimit)(limit, value)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4291
 *     if __cuCtxSetLimit == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetLimit" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUlimit, size_t) nogil> __cuCtxSetLimit)(limit, value)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4291, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4291, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4290
 *     cuPythonInit()
 *     if __cuCtxSetLimit == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxSetLimit" not found')
 *     err = (<CUresult (*)(CUlimit, size_t) nogil> __cuCtxSetLimit)(limit, value)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4289
 *     global __cuCtxSetLimit
 *     cuPythonInit()
 *     if __cuCtxSetLimit == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetLimit" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4292
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetLimit" not found')
 *     err = (<CUresult (*)(CUlimit, size_t) nogil> __cuCtxSetLimit)(limit, value)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUlimit, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetLimit)(__pyx_v_limit, __pyx_v_value);

    /* "cuda/_cuda/ccuda.pyx":4293
 *             raise RuntimeError('Function "cuCtxSetLimit" not found')
 *     err = (<CUresult (*)(CUlimit, size_t) nogil> __cuCtxSetLimit)(limit, value)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxGetLimit(size_t* pvalue, CUlimit limit) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4287
 * 
 * cdef CUresult _cuCtxSetLimit(CUlimit limit, size_t value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxSetLimit             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxSetLimit == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4286
 *     return err
 * 
 * cdef CUresult _cuCtxSetLimit(CUlimit limit, size_t value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxSetLimit
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCtxSetLimit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4295
 *     return err
 * 
 * cdef CUresult _cuCtxGetLimit(size_t* pvalue, CUlimit limit) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetLimit
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetLimit(size_t *__pyx_v_pvalue, CUlimit __pyx_v_limit) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCtxGetLimit", 1);
  __Pyx_TraceCall("_cuCtxGetLimit", __pyx_f[0], 4295, 1, __PYX_ERR(0, 4295, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4296
 * 
 * cdef CUresult _cuCtxGetLimit(size_t* pvalue, CUlimit limit) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetLimit             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxGetLimit == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4297
 * cdef CUresult _cuCtxGetLimit(size_t* pvalue, CUlimit limit) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetLimit
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCtxGetLimit == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4297, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4298
 *     global __cuCtxGetLimit
 *     cuPythonInit()
 *     if __cuCtxGetLimit == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetLimit" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetLimit == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4299
 *     cuPythonInit()
 *     if __cuCtxGetLimit == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxGetLimit" not found')
 *     err = (<CUresult (*)(size_t*, CUlimit) nogil> __cuCtxGetLimit)(pvalue, limit)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4300
 *     if __cuCtxGetLimit == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetLimit" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(size_t*, CUlimit) nogil> __cuCtxGetLimit)(pvalue, limit)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4300, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4300, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4299
 *     cuPythonInit()
 *     if __cuCtxGetLimit == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxGetLimit" not found')
 *     err = (<CUresult (*)(size_t*, CUlimit) nogil> __cuCtxGetLimit)(pvalue, limit)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4298
 *     global __cuCtxGetLimit
 *     cuPythonInit()
 *     if __cuCtxGetLimit == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetLimit" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4301
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetLimit" not found')
 *     err = (<CUresult (*)(size_t*, CUlimit) nogil> __cuCtxGetLimit)(pvalue, limit)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(size_t *, CUlimit))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetLimit)(__pyx_v_pvalue, __pyx_v_limit);

    /* "cuda/_cuda/ccuda.pyx":4302
 *             raise RuntimeError('Function "cuCtxGetLimit" not found')
 *     err = (<CUresult (*)(size_t*, CUlimit) nogil> __cuCtxGetLimit)(pvalue, limit)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxGetCacheConfig(CUfunc_cache* pconfig) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4296
 * 
 * cdef CUresult _cuCtxGetLimit(size_t* pvalue, CUlimit limit) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetLimit             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxGetLimit == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4295
 *     return err
 * 
 * cdef CUresult _cuCtxGetLimit(size_t* pvalue, CUlimit limit) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetLimit
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCtxGetLimit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4304
 *     return err
 * 
 * cdef CUresult _cuCtxGetCacheConfig(CUfunc_cache* pconfig) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetCacheConfig
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetCacheConfig(CUfunc_cache *__pyx_v_pconfig) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCtxGetCacheConfig", 1);
  __Pyx_TraceCall("_cuCtxGetCacheConfig", __pyx_f[0], 4304, 1, __PYX_ERR(0, 4304, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4305
 * 
 * cdef CUresult _cuCtxGetCacheConfig(CUfunc_cache* pconfig) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetCacheConfig             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxGetCacheConfig == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4306
 * cdef CUresult _cuCtxGetCacheConfig(CUfunc_cache* pconfig) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetCacheConfig
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCtxGetCacheConfig == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4306, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4307
 *     global __cuCtxGetCacheConfig
 *     cuPythonInit()
 *     if __cuCtxGetCacheConfig == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetCacheConfig" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetCacheConfig == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4308
 *     cuPythonInit()
 *     if __cuCtxGetCacheConfig == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxGetCacheConfig" not found')
 *     err = (<CUresult (*)(CUfunc_cache*) nogil> __cuCtxGetCacheConfig)(pconfig)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4309
 *     if __cuCtxGetCacheConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetCacheConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunc_cache*) nogil> __cuCtxGetCacheConfig)(pconfig)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4309, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4309, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4308
 *     cuPythonInit()
 *     if __cuCtxGetCacheConfig == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxGetCacheConfig" not found')
 *     err = (<CUresult (*)(CUfunc_cache*) nogil> __cuCtxGetCacheConfig)(pconfig)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4307
 *     global __cuCtxGetCacheConfig
 *     cuPythonInit()
 *     if __cuCtxGetCacheConfig == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetCacheConfig" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4310
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetCacheConfig" not found')
 *     err = (<CUresult (*)(CUfunc_cache*) nogil> __cuCtxGetCacheConfig)(pconfig)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUfunc_cache *))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetCacheConfig)(__pyx_v_pconfig);

    /* "cuda/_cuda/ccuda.pyx":4311
 *             raise RuntimeError('Function "cuCtxGetCacheConfig" not found')
 *     err = (<CUresult (*)(CUfunc_cache*) nogil> __cuCtxGetCacheConfig)(pconfig)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxSetCacheConfig(CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4305
 * 
 * cdef CUresult _cuCtxGetCacheConfig(CUfunc_cache* pconfig) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetCacheConfig             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxGetCacheConfig == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4304
 *     return err
 * 
 * cdef CUresult _cuCtxGetCacheConfig(CUfunc_cache* pconfig) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetCacheConfig
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCtxGetCacheConfig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4313
 *     return err
 * 
 * cdef CUresult _cuCtxSetCacheConfig(CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxSetCacheConfig
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetCacheConfig(CUfunc_cache __pyx_v_config) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCtxSetCacheConfig", 1);
  __Pyx_TraceCall("_cuCtxSetCacheConfig", __pyx_f[0], 4313, 1, __PYX_ERR(0, 4313, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4314
 * 
 * cdef CUresult _cuCtxSetCacheConfig(CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxSetCacheConfig             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxSetCacheConfig == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4315
 * cdef CUresult _cuCtxSetCacheConfig(CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxSetCacheConfig
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCtxSetCacheConfig == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4315, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4316
 *     global __cuCtxSetCacheConfig
 *     cuPythonInit()
 *     if __cuCtxSetCacheConfig == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetCacheConfig" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetCacheConfig == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4317
 *     cuPythonInit()
 *     if __cuCtxSetCacheConfig == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxSetCacheConfig" not found')
 *     err = (<CUresult (*)(CUfunc_cache) nogil> __cuCtxSetCacheConfig)(config)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4318
 *     if __cuCtxSetCacheConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetCacheConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunc_cache) nogil> __cuCtxSetCacheConfig)(config)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4318, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4318, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4317
 *     cuPythonInit()
 *     if __cuCtxSetCacheConfig == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxSetCacheConfig" not found')
 *     err = (<CUresult (*)(CUfunc_cache) nogil> __cuCtxSetCacheConfig)(config)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4316
 *     global __cuCtxSetCacheConfig
 *     cuPythonInit()
 *     if __cuCtxSetCacheConfig == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetCacheConfig" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4319
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetCacheConfig" not found')
 *     err = (<CUresult (*)(CUfunc_cache) nogil> __cuCtxSetCacheConfig)(config)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUfunc_cache))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetCacheConfig)(__pyx_v_config);

    /* "cuda/_cuda/ccuda.pyx":4320
 *             raise RuntimeError('Function "cuCtxSetCacheConfig" not found')
 *     err = (<CUresult (*)(CUfunc_cache) nogil> __cuCtxSetCacheConfig)(config)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4314
 * 
 * cdef CUresult _cuCtxSetCacheConfig(CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxSetCacheConfig             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxSetCacheConfig == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4313
 *     return err
 * 
 * cdef CUresult _cuCtxSetCacheConfig(CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxSetCacheConfig
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCtxSetCacheConfig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4322
 *     return err
 * 
 * cdef CUresult _cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetSharedMemConfig
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetSharedMemConfig(CUsharedconfig *__pyx_v_pConfig) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCtxGetSharedMemConfig", 1);
  __Pyx_TraceCall("_cuCtxGetSharedMemConfig", __pyx_f[0], 4322, 1, __PYX_ERR(0, 4322, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4323
 * 
 * cdef CUresult _cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetSharedMemConfig             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxGetSharedMemConfig == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4324
 * cdef CUresult _cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetSharedMemConfig
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCtxGetSharedMemConfig == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4324, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4325
 *     global __cuCtxGetSharedMemConfig
 *     cuPythonInit()
 *     if __cuCtxGetSharedMemConfig == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetSharedMemConfig" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetSharedMemConfig == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4326
 *     cuPythonInit()
 *     if __cuCtxGetSharedMemConfig == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxGetSharedMemConfig" not found')
 *     err = (<CUresult (*)(CUsharedconfig*) nogil> __cuCtxGetSharedMemConfig)(pConfig)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4327
 *     if __cuCtxGetSharedMemConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetSharedMemConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUsharedconfig*) nogil> __cuCtxGetSharedMemConfig)(pConfig)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4327, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4327, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4326
 *     cuPythonInit()
 *     if __cuCtxGetSharedMemConfig == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxGetSharedMemConfig" not found')
 *     err = (<CUresult (*)(CUsharedconfig*) nogil> __cuCtxGetSharedMemConfig)(pConfig)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4325
 *     global __cuCtxGetSharedMemConfig
 *     cuPythonInit()
 *     if __cuCtxGetSharedMemConfig == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetSharedMemConfig" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4328
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetSharedMemConfig" not found')
 *     err = (<CUresult (*)(CUsharedconfig*) nogil> __cuCtxGetSharedMemConfig)(pConfig)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUsharedconfig *))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetSharedMemConfig)(__pyx_v_pConfig);

    /* "cuda/_cuda/ccuda.pyx":4329
 *             raise RuntimeError('Function "cuCtxGetSharedMemConfig" not found')
 *     err = (<CUresult (*)(CUsharedconfig*) nogil> __cuCtxGetSharedMemConfig)(pConfig)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxSetSharedMemConfig(CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4323
 * 
 * cdef CUresult _cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetSharedMemConfig             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxGetSharedMemConfig == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4322
 *     return err
 * 
 * cdef CUresult _cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetSharedMemConfig
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCtxGetSharedMemConfig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4331
 *     return err
 * 
 * cdef CUresult _cuCtxSetSharedMemConfig(CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxSetSharedMemConfig
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetSharedMemConfig(CUsharedconfig __pyx_v_config) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCtxSetSharedMemConfig", 1);
  __Pyx_TraceCall("_cuCtxSetSharedMemConfig", __pyx_f[0], 4331, 1, __PYX_ERR(0, 4331, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4332
 * 
 * cdef CUresult _cuCtxSetSharedMemConfig(CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxSetSharedMemConfig             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxSetSharedMemConfig == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4333
 * cdef CUresult _cuCtxSetSharedMemConfig(CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxSetSharedMemConfig
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCtxSetSharedMemConfig == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4333, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4334
 *     global __cuCtxSetSharedMemConfig
 *     cuPythonInit()
 *     if __cuCtxSetSharedMemConfig == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetSharedMemConfig" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetSharedMemConfig == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4335
 *     cuPythonInit()
 *     if __cuCtxSetSharedMemConfig == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxSetSharedMemConfig" not found')
 *     err = (<CUresult (*)(CUsharedconfig) nogil> __cuCtxSetSharedMemConfig)(config)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4336
 *     if __cuCtxSetSharedMemConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetSharedMemConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUsharedconfig) nogil> __cuCtxSetSharedMemConfig)(config)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4336, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4336, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4335
 *     cuPythonInit()
 *     if __cuCtxSetSharedMemConfig == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxSetSharedMemConfig" not found')
 *     err = (<CUresult (*)(CUsharedconfig) nogil> __cuCtxSetSharedMemConfig)(config)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4334
 *     global __cuCtxSetSharedMemConfig
 *     cuPythonInit()
 *     if __cuCtxSetSharedMemConfig == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetSharedMemConfig" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4337
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetSharedMemConfig" not found')
 *     err = (<CUresult (*)(CUsharedconfig) nogil> __cuCtxSetSharedMemConfig)(config)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUsharedconfig))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetSharedMemConfig)(__pyx_v_config);

    /* "cuda/_cuda/ccuda.pyx":4338
 *             raise RuntimeError('Function "cuCtxSetSharedMemConfig" not found')
 *     err = (<CUresult (*)(CUsharedconfig) nogil> __cuCtxSetSharedMemConfig)(config)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4332
 * 
 * cdef CUresult _cuCtxSetSharedMemConfig(CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxSetSharedMemConfig             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxSetSharedMemConfig == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4331
 *     return err
 * 
 * cdef CUresult _cuCtxSetSharedMemConfig(CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxSetSharedMemConfig
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCtxSetSharedMemConfig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4340
 *     return err
 * 
 * cdef CUresult _cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetApiVersion
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetApiVersion(CUcontext __pyx_v_ctx, unsigned int *__pyx_v_version) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCtxGetApiVersion", 1);
  __Pyx_TraceCall("_cuCtxGetApiVersion", __pyx_f[0], 4340, 1, __PYX_ERR(0, 4340, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4341
 * 
 * cdef CUresult _cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetApiVersion             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxGetApiVersion == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4342
 * cdef CUresult _cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetApiVersion
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCtxGetApiVersion == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4342, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4343
 *     global __cuCtxGetApiVersion
 *     cuPythonInit()
 *     if __cuCtxGetApiVersion == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetApiVersion" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetApiVersion == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4344
 *     cuPythonInit()
 *     if __cuCtxGetApiVersion == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxGetApiVersion" not found')
 *     err = (<CUresult (*)(CUcontext, unsigned int*) nogil> __cuCtxGetApiVersion)(ctx, version)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4345
 *     if __cuCtxGetApiVersion == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetApiVersion" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext, unsigned int*) nogil> __cuCtxGetApiVersion)(ctx, version)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4345, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4345, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4344
 *     cuPythonInit()
 *     if __cuCtxGetApiVersion == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxGetApiVersion" not found')
 *     err = (<CUresult (*)(CUcontext, unsigned int*) nogil> __cuCtxGetApiVersion)(ctx, version)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4343
 *     global __cuCtxGetApiVersion
 *     cuPythonInit()
 *     if __cuCtxGetApiVersion == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetApiVersion" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4346
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetApiVersion" not found')
 *     err = (<CUresult (*)(CUcontext, unsigned int*) nogil> __cuCtxGetApiVersion)(ctx, version)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUcontext, unsigned int *))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetApiVersion)(__pyx_v_ctx, __pyx_v_version);

    /* "cuda/_cuda/ccuda.pyx":4347
 *             raise RuntimeError('Function "cuCtxGetApiVersion" not found')
 *     err = (<CUresult (*)(CUcontext, unsigned int*) nogil> __cuCtxGetApiVersion)(ctx, version)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4341
 * 
 * cdef CUresult _cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetApiVersion             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxGetApiVersion == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4340
 *     return err
 * 
 * cdef CUresult _cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetApiVersion
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCtxGetApiVersion", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4349
 *     return err
 * 
 * cdef CUresult _cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetStreamPriorityRange
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetStreamPriorityRange(int *__pyx_v_leastPriority, int *__pyx_v_greatestPriority) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCtxGetStreamPriorityRange", 1);
  __Pyx_TraceCall("_cuCtxGetStreamPriorityRange", __pyx_f[0], 4349, 1, __PYX_ERR(0, 4349, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4350
 * 
 * cdef CUresult _cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetStreamPriorityRange             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxGetStreamPriorityRange == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4351
 * cdef CUresult _cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetStreamPriorityRange
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCtxGetStreamPriorityRange == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4351, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4352
 *     global __cuCtxGetStreamPriorityRange
 *     cuPythonInit()
 *     if __cuCtxGetStreamPriorityRange == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetStreamPriorityRange" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetStreamPriorityRange == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4353
 *     cuPythonInit()
 *     if __cuCtxGetStreamPriorityRange == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxGetStreamPriorityRange" not found')
 *     err = (<CUresult (*)(int*, int*) nogil> __cuCtxGetStreamPriorityRange)(leastPriority, greatestPriority)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4354
 *     if __cuCtxGetStreamPriorityRange == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetStreamPriorityRange" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, int*) nogil> __cuCtxGetStreamPriorityRange)(leastPriority, greatestPriority)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4354, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4354, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4353
 *     cuPythonInit()
 *     if __cuCtxGetStreamPriorityRange == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxGetStreamPriorityRange" not found')
 *     err = (<CUresult (*)(int*, int*) nogil> __cuCtxGetStreamPriorityRange)(leastPriority, greatestPriority)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4352
 *     global __cuCtxGetStreamPriorityRange
 *     cuPythonInit()
 *     if __cuCtxGetStreamPriorityRange == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetStreamPriorityRange" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4355
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetStreamPriorityRange" not found')
 *     err = (<CUresult (*)(int*, int*) nogil> __cuCtxGetStreamPriorityRange)(leastPriority, greatestPriority)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(int *, int *))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetStreamPriorityRange)(__pyx_v_leastPriority, __pyx_v_greatestPriority);

    /* "cuda/_cuda/ccuda.pyx":4356
 *             raise RuntimeError('Function "cuCtxGetStreamPriorityRange" not found')
 *     err = (<CUresult (*)(int*, int*) nogil> __cuCtxGetStreamPriorityRange)(leastPriority, greatestPriority)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxResetPersistingL2Cache() except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4350
 * 
 * cdef CUresult _cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetStreamPriorityRange             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxGetStreamPriorityRange == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4349
 *     return err
 * 
 * cdef CUresult _cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetStreamPriorityRange
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCtxGetStreamPriorityRange", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4358
 *     return err
 * 
 * cdef CUresult _cuCtxResetPersistingL2Cache() except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxResetPersistingL2Cache
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxResetPersistingL2Cache(void) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCtxResetPersistingL2Cache", 1);
  __Pyx_TraceCall("_cuCtxResetPersistingL2Cache", __pyx_f[0], 4358, 1, __PYX_ERR(0, 4358, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4359
 * 
 * cdef CUresult _cuCtxResetPersistingL2Cache() except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxResetPersistingL2Cache             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxResetPersistingL2Cache == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4360
 * cdef CUresult _cuCtxResetPersistingL2Cache() except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxResetPersistingL2Cache
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCtxResetPersistingL2Cache == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4360, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4361
 *     global __cuCtxResetPersistingL2Cache
 *     cuPythonInit()
 *     if __cuCtxResetPersistingL2Cache == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxResetPersistingL2Cache" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCtxResetPersistingL2Cache == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4362
 *     cuPythonInit()
 *     if __cuCtxResetPersistingL2Cache == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxResetPersistingL2Cache" not found')
 *     err = (<CUresult (*)() nogil> __cuCtxResetPersistingL2Cache)()
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4363
 *     if __cuCtxResetPersistingL2Cache == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxResetPersistingL2Cache" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)() nogil> __cuCtxResetPersistingL2Cache)()
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4363, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4363, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4362
 *     cuPythonInit()
 *     if __cuCtxResetPersistingL2Cache == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxResetPersistingL2Cache" not found')
 *     err = (<CUresult (*)() nogil> __cuCtxResetPersistingL2Cache)()
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4361
 *     global __cuCtxResetPersistingL2Cache
 *     cuPythonInit()
 *     if __cuCtxResetPersistingL2Cache == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxResetPersistingL2Cache" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4364
 *         with gil:
 *             raise RuntimeError('Function "cuCtxResetPersistingL2Cache" not found')
 *     err = (<CUresult (*)() nogil> __cuCtxResetPersistingL2Cache)()             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(void))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxResetPersistingL2Cache)();

    /* "cuda/_cuda/ccuda.pyx":4365
 *             raise RuntimeError('Function "cuCtxResetPersistingL2Cache" not found')
 *     err = (<CUresult (*)() nogil> __cuCtxResetPersistingL2Cache)()
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4359
 * 
 * cdef CUresult _cuCtxResetPersistingL2Cache() except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxResetPersistingL2Cache             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxResetPersistingL2Cache == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4358
 *     return err
 * 
 * cdef CUresult _cuCtxResetPersistingL2Cache() except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxResetPersistingL2Cache
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCtxResetPersistingL2Cache", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4367
 *     return err
 * 
 * cdef CUresult _cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetExecAffinity
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetExecAffinity(CUexecAffinityParam *__pyx_v_pExecAffinity, CUexecAffinityType __pyx_v_typename) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCtxGetExecAffinity", 1);
  __Pyx_TraceCall("_cuCtxGetExecAffinity", __pyx_f[0], 4367, 1, __PYX_ERR(0, 4367, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4368
 * 
 * cdef CUresult _cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetExecAffinity             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxGetExecAffinity == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4369
 * cdef CUresult _cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetExecAffinity
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCtxGetExecAffinity == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4369, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4370
 *     global __cuCtxGetExecAffinity
 *     cuPythonInit()
 *     if __cuCtxGetExecAffinity == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetExecAffinity" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetExecAffinity == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4371
 *     cuPythonInit()
 *     if __cuCtxGetExecAffinity == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxGetExecAffinity" not found')
 *     err = (<CUresult (*)(CUexecAffinityParam*, CUexecAffinityType) nogil> __cuCtxGetExecAffinity)(pExecAffinity, typename)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4372
 *     if __cuCtxGetExecAffinity == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetExecAffinity" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUexecAffinityParam*, CUexecAffinityType) nogil> __cuCtxGetExecAffinity)(pExecAffinity, typename)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4372, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4372, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4371
 *     cuPythonInit()
 *     if __cuCtxGetExecAffinity == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxGetExecAffinity" not found')
 *     err = (<CUresult (*)(CUexecAffinityParam*, CUexecAffinityType) nogil> __cuCtxGetExecAffinity)(pExecAffinity, typename)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4370
 *     global __cuCtxGetExecAffinity
 *     cuPythonInit()
 *     if __cuCtxGetExecAffinity == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetExecAffinity" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4373
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetExecAffinity" not found')
 *     err = (<CUresult (*)(CUexecAffinityParam*, CUexecAffinityType) nogil> __cuCtxGetExecAffinity)(pExecAffinity, typename)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUexecAffinityParam *, CUexecAffinityType))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetExecAffinity)(__pyx_v_pExecAffinity, __pyx_v_typename);

    /* "cuda/_cuda/ccuda.pyx":4374
 *             raise RuntimeError('Function "cuCtxGetExecAffinity" not found')
 *     err = (<CUresult (*)(CUexecAffinityParam*, CUexecAffinityType) nogil> __cuCtxGetExecAffinity)(pExecAffinity, typename)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxAttach(CUcontext* pctx, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4368
 * 
 * cdef CUresult _cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxGetExecAffinity             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxGetExecAffinity == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4367
 *     return err
 * 
 * cdef CUresult _cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxGetExecAffinity
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCtxGetExecAffinity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4376
 *     return err
 * 
 * cdef CUresult _cuCtxAttach(CUcontext* pctx, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxAttach
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxAttach(CUcontext *__pyx_v_pctx, unsigned int __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCtxAttach", 1);
  __Pyx_TraceCall("_cuCtxAttach", __pyx_f[0], 4376, 1, __PYX_ERR(0, 4376, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4377
 * 
 * cdef CUresult _cuCtxAttach(CUcontext* pctx, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxAttach             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxAttach == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4378
 * cdef CUresult _cuCtxAttach(CUcontext* pctx, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxAttach
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCtxAttach == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4378, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4379
 *     global __cuCtxAttach
 *     cuPythonInit()
 *     if __cuCtxAttach == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxAttach" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCtxAttach == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4380
 *     cuPythonInit()
 *     if __cuCtxAttach == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxAttach" not found')
 *     err = (<CUresult (*)(CUcontext*, unsigned int) nogil> __cuCtxAttach)(pctx, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4381
 *     if __cuCtxAttach == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxAttach" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*, unsigned int) nogil> __cuCtxAttach)(pctx, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4381, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4381, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4380
 *     cuPythonInit()
 *     if __cuCtxAttach == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxAttach" not found')
 *     err = (<CUresult (*)(CUcontext*, unsigned int) nogil> __cuCtxAttach)(pctx, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4379
 *     global __cuCtxAttach
 *     cuPythonInit()
 *     if __cuCtxAttach == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxAttach" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4382
 *         with gil:
 *             raise RuntimeError('Function "cuCtxAttach" not found')
 *     err = (<CUresult (*)(CUcontext*, unsigned int) nogil> __cuCtxAttach)(pctx, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUcontext *, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxAttach)(__pyx_v_pctx, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":4383
 *             raise RuntimeError('Function "cuCtxAttach" not found')
 *     err = (<CUresult (*)(CUcontext*, unsigned int) nogil> __cuCtxAttach)(pctx, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxDetach(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4377
 * 
 * cdef CUresult _cuCtxAttach(CUcontext* pctx, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxAttach             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxAttach == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4376
 *     return err
 * 
 * cdef CUresult _cuCtxAttach(CUcontext* pctx, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxAttach
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCtxAttach", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4385
 *     return err
 * 
 * cdef CUresult _cuCtxDetach(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxDetach
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxDetach(CUcontext __pyx_v_ctx) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCtxDetach", 1);
  __Pyx_TraceCall("_cuCtxDetach", __pyx_f[0], 4385, 1, __PYX_ERR(0, 4385, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4386
 * 
 * cdef CUresult _cuCtxDetach(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxDetach             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxDetach == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4387
 * cdef CUresult _cuCtxDetach(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxDetach
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCtxDetach == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4387, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4388
 *     global __cuCtxDetach
 *     cuPythonInit()
 *     if __cuCtxDetach == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDetach" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCtxDetach == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4389
 *     cuPythonInit()
 *     if __cuCtxDetach == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxDetach" not found')
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDetach)(ctx)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4390
 *     if __cuCtxDetach == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDetach" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDetach)(ctx)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4390, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4390, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4389
 *     cuPythonInit()
 *     if __cuCtxDetach == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxDetach" not found')
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDetach)(ctx)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4388
 *     global __cuCtxDetach
 *     cuPythonInit()
 *     if __cuCtxDetach == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDetach" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4391
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDetach" not found')
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDetach)(ctx)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUcontext))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxDetach)(__pyx_v_ctx);

    /* "cuda/_cuda/ccuda.pyx":4392
 *             raise RuntimeError('Function "cuCtxDetach" not found')
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDetach)(ctx)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuModuleLoad(CUmodule* module, const char* fname) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4386
 * 
 * cdef CUresult _cuCtxDetach(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxDetach             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxDetach == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4385
 *     return err
 * 
 * cdef CUresult _cuCtxDetach(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxDetach
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCtxDetach", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4394
 *     return err
 * 
 * cdef CUresult _cuModuleLoad(CUmodule* module, const char* fname) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuModuleLoad
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoad(CUmodule *__pyx_v_module, char const *__pyx_v_fname) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuModuleLoad", 1);
  __Pyx_TraceCall("_cuModuleLoad", __pyx_f[0], 4394, 1, __PYX_ERR(0, 4394, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4395
 * 
 * cdef CUresult _cuModuleLoad(CUmodule* module, const char* fname) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleLoad             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleLoad == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4396
 * cdef CUresult _cuModuleLoad(CUmodule* module, const char* fname) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleLoad
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuModuleLoad == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4396, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4397
 *     global __cuModuleLoad
 *     cuPythonInit()
 *     if __cuModuleLoad == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoad" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoad == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4398
 *     cuPythonInit()
 *     if __cuModuleLoad == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuModuleLoad" not found')
 *     err = (<CUresult (*)(CUmodule*, const char*) nogil> __cuModuleLoad)(module, fname)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4399
 *     if __cuModuleLoad == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoad" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule*, const char*) nogil> __cuModuleLoad)(module, fname)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4399, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4399, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4398
 *     cuPythonInit()
 *     if __cuModuleLoad == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuModuleLoad" not found')
 *     err = (<CUresult (*)(CUmodule*, const char*) nogil> __cuModuleLoad)(module, fname)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4397
 *     global __cuModuleLoad
 *     cuPythonInit()
 *     if __cuModuleLoad == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoad" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4400
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoad" not found')
 *     err = (<CUresult (*)(CUmodule*, const char*) nogil> __cuModuleLoad)(module, fname)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmodule *, char const *))__pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoad)(__pyx_v_module, __pyx_v_fname);

    /* "cuda/_cuda/ccuda.pyx":4401
 *             raise RuntimeError('Function "cuModuleLoad" not found')
 *     err = (<CUresult (*)(CUmodule*, const char*) nogil> __cuModuleLoad)(module, fname)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuModuleLoadData(CUmodule* module, const void* image) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4395
 * 
 * cdef CUresult _cuModuleLoad(CUmodule* module, const char* fname) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleLoad             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleLoad == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4394
 *     return err
 * 
 * cdef CUresult _cuModuleLoad(CUmodule* module, const char* fname) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuModuleLoad
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuModuleLoad", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4403
 *     return err
 * 
 * cdef CUresult _cuModuleLoadData(CUmodule* module, const void* image) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuModuleLoadData
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoadData(CUmodule *__pyx_v_module, void const *__pyx_v_image) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuModuleLoadData", 1);
  __Pyx_TraceCall("_cuModuleLoadData", __pyx_f[0], 4403, 1, __PYX_ERR(0, 4403, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4404
 * 
 * cdef CUresult _cuModuleLoadData(CUmodule* module, const void* image) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleLoadData             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleLoadData == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4405
 * cdef CUresult _cuModuleLoadData(CUmodule* module, const void* image) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleLoadData
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuModuleLoadData == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4405, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4406
 *     global __cuModuleLoadData
 *     cuPythonInit()
 *     if __cuModuleLoadData == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadData" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadData == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4407
 *     cuPythonInit()
 *     if __cuModuleLoadData == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuModuleLoadData" not found')
 *     err = (<CUresult (*)(CUmodule*, const void*) nogil> __cuModuleLoadData)(module, image)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4408
 *     if __cuModuleLoadData == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadData" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule*, const void*) nogil> __cuModuleLoadData)(module, image)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4408, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4408, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4407
 *     cuPythonInit()
 *     if __cuModuleLoadData == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuModuleLoadData" not found')
 *     err = (<CUresult (*)(CUmodule*, const void*) nogil> __cuModuleLoadData)(module, image)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4406
 *     global __cuModuleLoadData
 *     cuPythonInit()
 *     if __cuModuleLoadData == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadData" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4409
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadData" not found')
 *     err = (<CUresult (*)(CUmodule*, const void*) nogil> __cuModuleLoadData)(module, image)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmodule *, void const *))__pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadData)(__pyx_v_module, __pyx_v_image);

    /* "cuda/_cuda/ccuda.pyx":4410
 *             raise RuntimeError('Function "cuModuleLoadData" not found')
 *     err = (<CUresult (*)(CUmodule*, const void*) nogil> __cuModuleLoadData)(module, image)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4404
 * 
 * cdef CUresult _cuModuleLoadData(CUmodule* module, const void* image) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleLoadData             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleLoadData == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4403
 *     return err
 * 
 * cdef CUresult _cuModuleLoadData(CUmodule* module, const void* image) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuModuleLoadData
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuModuleLoadData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4412
 *     return err
 * 
 * cdef CUresult _cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuModuleLoadDataEx
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoadDataEx(CUmodule *__pyx_v_module, void const *__pyx_v_image, unsigned int __pyx_v_numOptions, CUjit_option *__pyx_v_options, void **__pyx_v_optionValues) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuModuleLoadDataEx", 1);
  __Pyx_TraceCall("_cuModuleLoadDataEx", __pyx_f[0], 4412, 1, __PYX_ERR(0, 4412, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4413
 * 
 * cdef CUresult _cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleLoadDataEx             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleLoadDataEx == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4414
 * cdef CUresult _cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleLoadDataEx
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuModuleLoadDataEx == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4414, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4415
 *     global __cuModuleLoadDataEx
 *     cuPythonInit()
 *     if __cuModuleLoadDataEx == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadDataEx" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadDataEx == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4416
 *     cuPythonInit()
 *     if __cuModuleLoadDataEx == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuModuleLoadDataEx" not found')
 *     err = (<CUresult (*)(CUmodule*, const void*, unsigned int, CUjit_option*, void**) nogil> __cuModuleLoadDataEx)(module, image, numOptions, options, optionValues)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4417
 *     if __cuModuleLoadDataEx == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadDataEx" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule*, const void*, unsigned int, CUjit_option*, void**) nogil> __cuModuleLoadDataEx)(module, image, numOptions, options, optionValues)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4417, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4417, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4416
 *     cuPythonInit()
 *     if __cuModuleLoadDataEx == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuModuleLoadDataEx" not found')
 *     err = (<CUresult (*)(CUmodule*, const void*, unsigned int, CUjit_option*, void**) nogil> __cuModuleLoadDataEx)(module, image, numOptions, options, optionValues)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4415
 *     global __cuModuleLoadDataEx
 *     cuPythonInit()
 *     if __cuModuleLoadDataEx == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadDataEx" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4418
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadDataEx" not found')
 *     err = (<CUresult (*)(CUmodule*, const void*, unsigned int, CUjit_option*, void**) nogil> __cuModuleLoadDataEx)(module, image, numOptions, options, optionValues)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmodule *, void const *, unsigned int, CUjit_option *, void **))__pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadDataEx)(__pyx_v_module, __pyx_v_image, __pyx_v_numOptions, __pyx_v_options, __pyx_v_optionValues);

    /* "cuda/_cuda/ccuda.pyx":4419
 *             raise RuntimeError('Function "cuModuleLoadDataEx" not found')
 *     err = (<CUresult (*)(CUmodule*, const void*, unsigned int, CUjit_option*, void**) nogil> __cuModuleLoadDataEx)(module, image, numOptions, options, optionValues)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4413
 * 
 * cdef CUresult _cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleLoadDataEx             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleLoadDataEx == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4412
 *     return err
 * 
 * cdef CUresult _cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuModuleLoadDataEx
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuModuleLoadDataEx", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4421
 *     return err
 * 
 * cdef CUresult _cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuModuleLoadFatBinary
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoadFatBinary(CUmodule *__pyx_v_module, void const *__pyx_v_fatCubin) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuModuleLoadFatBinary", 1);
  __Pyx_TraceCall("_cuModuleLoadFatBinary", __pyx_f[0], 4421, 1, __PYX_ERR(0, 4421, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4422
 * 
 * cdef CUresult _cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleLoadFatBinary             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleLoadFatBinary == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4423
 * cdef CUresult _cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleLoadFatBinary
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuModuleLoadFatBinary == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4423, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4424
 *     global __cuModuleLoadFatBinary
 *     cuPythonInit()
 *     if __cuModuleLoadFatBinary == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadFatBinary" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadFatBinary == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4425
 *     cuPythonInit()
 *     if __cuModuleLoadFatBinary == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuModuleLoadFatBinary" not found')
 *     err = (<CUresult (*)(CUmodule*, const void*) nogil> __cuModuleLoadFatBinary)(module, fatCubin)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4426
 *     if __cuModuleLoadFatBinary == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadFatBinary" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule*, const void*) nogil> __cuModuleLoadFatBinary)(module, fatCubin)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4426, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4426, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4425
 *     cuPythonInit()
 *     if __cuModuleLoadFatBinary == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuModuleLoadFatBinary" not found')
 *     err = (<CUresult (*)(CUmodule*, const void*) nogil> __cuModuleLoadFatBinary)(module, fatCubin)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4424
 *     global __cuModuleLoadFatBinary
 *     cuPythonInit()
 *     if __cuModuleLoadFatBinary == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadFatBinary" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4427
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadFatBinary" not found')
 *     err = (<CUresult (*)(CUmodule*, const void*) nogil> __cuModuleLoadFatBinary)(module, fatCubin)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmodule *, void const *))__pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadFatBinary)(__pyx_v_module, __pyx_v_fatCubin);

    /* "cuda/_cuda/ccuda.pyx":4428
 *             raise RuntimeError('Function "cuModuleLoadFatBinary" not found')
 *     err = (<CUresult (*)(CUmodule*, const void*) nogil> __cuModuleLoadFatBinary)(module, fatCubin)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuModuleUnload(CUmodule hmod) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4422
 * 
 * cdef CUresult _cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleLoadFatBinary             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleLoadFatBinary == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4421
 *     return err
 * 
 * cdef CUresult _cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuModuleLoadFatBinary
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuModuleLoadFatBinary", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4430
 *     return err
 * 
 * cdef CUresult _cuModuleUnload(CUmodule hmod) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuModuleUnload
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuModuleUnload(CUmodule __pyx_v_hmod) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuModuleUnload", 1);
  __Pyx_TraceCall("_cuModuleUnload", __pyx_f[0], 4430, 1, __PYX_ERR(0, 4430, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4431
 * 
 * cdef CUresult _cuModuleUnload(CUmodule hmod) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleUnload             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleUnload == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4432
 * cdef CUresult _cuModuleUnload(CUmodule hmod) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleUnload
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuModuleUnload == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4432, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4433
 *     global __cuModuleUnload
 *     cuPythonInit()
 *     if __cuModuleUnload == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleUnload" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuModuleUnload == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4434
 *     cuPythonInit()
 *     if __cuModuleUnload == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuModuleUnload" not found')
 *     err = (<CUresult (*)(CUmodule) nogil> __cuModuleUnload)(hmod)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4435
 *     if __cuModuleUnload == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleUnload" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule) nogil> __cuModuleUnload)(hmod)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4435, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4435, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4434
 *     cuPythonInit()
 *     if __cuModuleUnload == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuModuleUnload" not found')
 *     err = (<CUresult (*)(CUmodule) nogil> __cuModuleUnload)(hmod)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4433
 *     global __cuModuleUnload
 *     cuPythonInit()
 *     if __cuModuleUnload == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleUnload" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4436
 *         with gil:
 *             raise RuntimeError('Function "cuModuleUnload" not found')
 *     err = (<CUresult (*)(CUmodule) nogil> __cuModuleUnload)(hmod)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmodule))__pyx_v_4cuda_5_cuda_5ccuda___cuModuleUnload)(__pyx_v_hmod);

    /* "cuda/_cuda/ccuda.pyx":4437
 *             raise RuntimeError('Function "cuModuleUnload" not found')
 *     err = (<CUresult (*)(CUmodule) nogil> __cuModuleUnload)(hmod)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4431
 * 
 * cdef CUresult _cuModuleUnload(CUmodule hmod) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleUnload             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleUnload == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4430
 *     return err
 * 
 * cdef CUresult _cuModuleUnload(CUmodule hmod) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuModuleUnload
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuModuleUnload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4439
 *     return err
 * 
 * cdef CUresult _cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuModuleGetLoadingMode
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetLoadingMode(CUmoduleLoadingMode *__pyx_v_mode) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuModuleGetLoadingMode", 1);
  __Pyx_TraceCall("_cuModuleGetLoadingMode", __pyx_f[0], 4439, 1, __PYX_ERR(0, 4439, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4440
 * 
 * cdef CUresult _cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleGetLoadingMode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleGetLoadingMode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4441
 * cdef CUresult _cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleGetLoadingMode
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuModuleGetLoadingMode == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4441, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4442
 *     global __cuModuleGetLoadingMode
 *     cuPythonInit()
 *     if __cuModuleGetLoadingMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetLoadingMode" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetLoadingMode == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4443
 *     cuPythonInit()
 *     if __cuModuleGetLoadingMode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuModuleGetLoadingMode" not found')
 *     err = (<CUresult (*)(CUmoduleLoadingMode*) nogil> __cuModuleGetLoadingMode)(mode)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4444
 *     if __cuModuleGetLoadingMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetLoadingMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmoduleLoadingMode*) nogil> __cuModuleGetLoadingMode)(mode)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4444, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4444, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4443
 *     cuPythonInit()
 *     if __cuModuleGetLoadingMode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuModuleGetLoadingMode" not found')
 *     err = (<CUresult (*)(CUmoduleLoadingMode*) nogil> __cuModuleGetLoadingMode)(mode)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4442
 *     global __cuModuleGetLoadingMode
 *     cuPythonInit()
 *     if __cuModuleGetLoadingMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetLoadingMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4445
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetLoadingMode" not found')
 *     err = (<CUresult (*)(CUmoduleLoadingMode*) nogil> __cuModuleGetLoadingMode)(mode)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmoduleLoadingMode *))__pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetLoadingMode)(__pyx_v_mode);

    /* "cuda/_cuda/ccuda.pyx":4446
 *             raise RuntimeError('Function "cuModuleGetLoadingMode" not found')
 *     err = (<CUresult (*)(CUmoduleLoadingMode*) nogil> __cuModuleGetLoadingMode)(mode)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4440
 * 
 * cdef CUresult _cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleGetLoadingMode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleGetLoadingMode == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4439
 *     return err
 * 
 * cdef CUresult _cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuModuleGetLoadingMode
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuModuleGetLoadingMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4448
 *     return err
 * 
 * cdef CUresult _cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuModuleGetFunction
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetFunction(CUfunction *__pyx_v_hfunc, CUmodule __pyx_v_hmod, char const *__pyx_v_name) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuModuleGetFunction", 1);
  __Pyx_TraceCall("_cuModuleGetFunction", __pyx_f[0], 4448, 1, __PYX_ERR(0, 4448, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4449
 * 
 * cdef CUresult _cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleGetFunction             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleGetFunction == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4450
 * cdef CUresult _cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleGetFunction
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuModuleGetFunction == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4450, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4451
 *     global __cuModuleGetFunction
 *     cuPythonInit()
 *     if __cuModuleGetFunction == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetFunction" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetFunction == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4452
 *     cuPythonInit()
 *     if __cuModuleGetFunction == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuModuleGetFunction" not found')
 *     err = (<CUresult (*)(CUfunction*, CUmodule, const char*) nogil> __cuModuleGetFunction)(hfunc, hmod, name)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4453
 *     if __cuModuleGetFunction == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetFunction" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction*, CUmodule, const char*) nogil> __cuModuleGetFunction)(hfunc, hmod, name)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4453, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4453, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4452
 *     cuPythonInit()
 *     if __cuModuleGetFunction == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuModuleGetFunction" not found')
 *     err = (<CUresult (*)(CUfunction*, CUmodule, const char*) nogil> __cuModuleGetFunction)(hfunc, hmod, name)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4451
 *     global __cuModuleGetFunction
 *     cuPythonInit()
 *     if __cuModuleGetFunction == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetFunction" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4454
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetFunction" not found')
 *     err = (<CUresult (*)(CUfunction*, CUmodule, const char*) nogil> __cuModuleGetFunction)(hfunc, hmod, name)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUfunction *, CUmodule, char const *))__pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetFunction)(__pyx_v_hfunc, __pyx_v_hmod, __pyx_v_name);

    /* "cuda/_cuda/ccuda.pyx":4455
 *             raise RuntimeError('Function "cuModuleGetFunction" not found')
 *     err = (<CUresult (*)(CUfunction*, CUmodule, const char*) nogil> __cuModuleGetFunction)(hfunc, hmod, name)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuModuleGetGlobal_v2(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4449
 * 
 * cdef CUresult _cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleGetFunction             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleGetFunction == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4448
 *     return err
 * 
 * cdef CUresult _cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuModuleGetFunction
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuModuleGetFunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4457
 *     return err
 * 
 * cdef CUresult _cuModuleGetGlobal_v2(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuModuleGetGlobal_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetGlobal_v2(CUdeviceptr *__pyx_v_dptr, size_t *__pyx_v_numbytes, CUmodule __pyx_v_hmod, char const *__pyx_v_name) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuModuleGetGlobal_v2", 1);
  __Pyx_TraceCall("_cuModuleGetGlobal_v2", __pyx_f[0], 4457, 1, __PYX_ERR(0, 4457, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4458
 * 
 * cdef CUresult _cuModuleGetGlobal_v2(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleGetGlobal_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleGetGlobal_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4459
 * cdef CUresult _cuModuleGetGlobal_v2(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleGetGlobal_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuModuleGetGlobal_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4459, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4460
 *     global __cuModuleGetGlobal_v2
 *     cuPythonInit()
 *     if __cuModuleGetGlobal_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetGlobal_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetGlobal_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4461
 *     cuPythonInit()
 *     if __cuModuleGetGlobal_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuModuleGetGlobal_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUmodule, const char*) nogil> __cuModuleGetGlobal_v2)(dptr, numbytes, hmod, name)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4462
 *     if __cuModuleGetGlobal_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetGlobal_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUmodule, const char*) nogil> __cuModuleGetGlobal_v2)(dptr, numbytes, hmod, name)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4462, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4462, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4461
 *     cuPythonInit()
 *     if __cuModuleGetGlobal_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuModuleGetGlobal_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUmodule, const char*) nogil> __cuModuleGetGlobal_v2)(dptr, numbytes, hmod, name)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4460
 *     global __cuModuleGetGlobal_v2
 *     cuPythonInit()
 *     if __cuModuleGetGlobal_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetGlobal_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4463
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetGlobal_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUmodule, const char*) nogil> __cuModuleGetGlobal_v2)(dptr, numbytes, hmod, name)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr *, size_t *, CUmodule, char const *))__pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetGlobal_v2)(__pyx_v_dptr, __pyx_v_numbytes, __pyx_v_hmod, __pyx_v_name);

    /* "cuda/_cuda/ccuda.pyx":4464
 *             raise RuntimeError('Function "cuModuleGetGlobal_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUmodule, const char*) nogil> __cuModuleGetGlobal_v2)(dptr, numbytes, hmod, name)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuLinkCreate_v2(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4458
 * 
 * cdef CUresult _cuModuleGetGlobal_v2(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleGetGlobal_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleGetGlobal_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4457
 *     return err
 * 
 * cdef CUresult _cuModuleGetGlobal_v2(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuModuleGetGlobal_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuModuleGetGlobal_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4466
 *     return err
 * 
 * cdef CUresult _cuLinkCreate_v2(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLinkCreate_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLinkCreate_v2(unsigned int __pyx_v_numOptions, CUjit_option *__pyx_v_options, void **__pyx_v_optionValues, CUlinkState *__pyx_v_stateOut) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuLinkCreate_v2", 1);
  __Pyx_TraceCall("_cuLinkCreate_v2", __pyx_f[0], 4466, 1, __PYX_ERR(0, 4466, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4467
 * 
 * cdef CUresult _cuLinkCreate_v2(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLinkCreate_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLinkCreate_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4468
 * cdef CUresult _cuLinkCreate_v2(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLinkCreate_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuLinkCreate_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4468, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4469
 *     global __cuLinkCreate_v2
 *     cuPythonInit()
 *     if __cuLinkCreate_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLinkCreate_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuLinkCreate_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4470
 *     cuPythonInit()
 *     if __cuLinkCreate_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLinkCreate_v2" not found')
 *     err = (<CUresult (*)(unsigned int, CUjit_option*, void**, CUlinkState*) nogil> __cuLinkCreate_v2)(numOptions, options, optionValues, stateOut)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4471
 *     if __cuLinkCreate_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLinkCreate_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int, CUjit_option*, void**, CUlinkState*) nogil> __cuLinkCreate_v2)(numOptions, options, optionValues, stateOut)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4471, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4471, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4470
 *     cuPythonInit()
 *     if __cuLinkCreate_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLinkCreate_v2" not found')
 *     err = (<CUresult (*)(unsigned int, CUjit_option*, void**, CUlinkState*) nogil> __cuLinkCreate_v2)(numOptions, options, optionValues, stateOut)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4469
 *     global __cuLinkCreate_v2
 *     cuPythonInit()
 *     if __cuLinkCreate_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLinkCreate_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4472
 *         with gil:
 *             raise RuntimeError('Function "cuLinkCreate_v2" not found')
 *     err = (<CUresult (*)(unsigned int, CUjit_option*, void**, CUlinkState*) nogil> __cuLinkCreate_v2)(numOptions, options, optionValues, stateOut)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(unsigned int, CUjit_option *, void **, CUlinkState *))__pyx_v_4cuda_5_cuda_5ccuda___cuLinkCreate_v2)(__pyx_v_numOptions, __pyx_v_options, __pyx_v_optionValues, __pyx_v_stateOut);

    /* "cuda/_cuda/ccuda.pyx":4473
 *             raise RuntimeError('Function "cuLinkCreate_v2" not found')
 *     err = (<CUresult (*)(unsigned int, CUjit_option*, void**, CUlinkState*) nogil> __cuLinkCreate_v2)(numOptions, options, optionValues, stateOut)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuLinkAddData_v2(CUlinkState state, CUjitInputType typename, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4467
 * 
 * cdef CUresult _cuLinkCreate_v2(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLinkCreate_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLinkCreate_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4466
 *     return err
 * 
 * cdef CUresult _cuLinkCreate_v2(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLinkCreate_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuLinkCreate_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4475
 *     return err
 * 
 * cdef CUresult _cuLinkAddData_v2(CUlinkState state, CUjitInputType typename, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLinkAddData_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLinkAddData_v2(CUlinkState __pyx_v_state, CUjitInputType __pyx_v_typename, void *__pyx_v_data, size_t __pyx_v_size, char const *__pyx_v_name, unsigned int __pyx_v_numOptions, CUjit_option *__pyx_v_options, void **__pyx_v_optionValues) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuLinkAddData_v2", 1);
  __Pyx_TraceCall("_cuLinkAddData_v2", __pyx_f[0], 4475, 1, __PYX_ERR(0, 4475, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4476
 * 
 * cdef CUresult _cuLinkAddData_v2(CUlinkState state, CUjitInputType typename, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLinkAddData_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLinkAddData_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4477
 * cdef CUresult _cuLinkAddData_v2(CUlinkState state, CUjitInputType typename, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLinkAddData_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuLinkAddData_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4477, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4478
 *     global __cuLinkAddData_v2
 *     cuPythonInit()
 *     if __cuLinkAddData_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLinkAddData_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuLinkAddData_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4479
 *     cuPythonInit()
 *     if __cuLinkAddData_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLinkAddData_v2" not found')
 *     err = (<CUresult (*)(CUlinkState, CUjitInputType, void*, size_t, const char*, unsigned int, CUjit_option*, void**) nogil> __cuLinkAddData_v2)(state, typename, data, size, name, numOptions, options, optionValues)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4480
 *     if __cuLinkAddData_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLinkAddData_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUlinkState, CUjitInputType, void*, size_t, const char*, unsigned int, CUjit_option*, void**) nogil> __cuLinkAddData_v2)(state, typename, data, size, name, numOptions, options, optionValues)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4480, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4480, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4479
 *     cuPythonInit()
 *     if __cuLinkAddData_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLinkAddData_v2" not found')
 *     err = (<CUresult (*)(CUlinkState, CUjitInputType, void*, size_t, const char*, unsigned int, CUjit_option*, void**) nogil> __cuLinkAddData_v2)(state, typename, data, size, name, numOptions, options, optionValues)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4478
 *     global __cuLinkAddData_v2
 *     cuPythonInit()
 *     if __cuLinkAddData_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLinkAddData_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4481
 *         with gil:
 *             raise RuntimeError('Function "cuLinkAddData_v2" not found')
 *     err = (<CUresult (*)(CUlinkState, CUjitInputType, void*, size_t, const char*, unsigned int, CUjit_option*, void**) nogil> __cuLinkAddData_v2)(state, typename, data, size, name, numOptions, options, optionValues)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUlinkState, CUjitInputType, void *, size_t, char const *, unsigned int, CUjit_option *, void **))__pyx_v_4cuda_5_cuda_5ccuda___cuLinkAddData_v2)(__pyx_v_state, __pyx_v_typename, __pyx_v_data, __pyx_v_size, __pyx_v_name, __pyx_v_numOptions, __pyx_v_options, __pyx_v_optionValues);

    /* "cuda/_cuda/ccuda.pyx":4482
 *             raise RuntimeError('Function "cuLinkAddData_v2" not found')
 *     err = (<CUresult (*)(CUlinkState, CUjitInputType, void*, size_t, const char*, unsigned int, CUjit_option*, void**) nogil> __cuLinkAddData_v2)(state, typename, data, size, name, numOptions, options, optionValues)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuLinkAddFile_v2(CUlinkState state, CUjitInputType typename, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4476
 * 
 * cdef CUresult _cuLinkAddData_v2(CUlinkState state, CUjitInputType typename, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLinkAddData_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLinkAddData_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4475
 *     return err
 * 
 * cdef CUresult _cuLinkAddData_v2(CUlinkState state, CUjitInputType typename, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLinkAddData_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuLinkAddData_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4484
 *     return err
 * 
 * cdef CUresult _cuLinkAddFile_v2(CUlinkState state, CUjitInputType typename, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLinkAddFile_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLinkAddFile_v2(CUlinkState __pyx_v_state, CUjitInputType __pyx_v_typename, char const *__pyx_v_path, unsigned int __pyx_v_numOptions, CUjit_option *__pyx_v_options, void **__pyx_v_optionValues) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuLinkAddFile_v2", 1);
  __Pyx_TraceCall("_cuLinkAddFile_v2", __pyx_f[0], 4484, 1, __PYX_ERR(0, 4484, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4485
 * 
 * cdef CUresult _cuLinkAddFile_v2(CUlinkState state, CUjitInputType typename, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLinkAddFile_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLinkAddFile_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4486
 * cdef CUresult _cuLinkAddFile_v2(CUlinkState state, CUjitInputType typename, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLinkAddFile_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuLinkAddFile_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4486, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4487
 *     global __cuLinkAddFile_v2
 *     cuPythonInit()
 *     if __cuLinkAddFile_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLinkAddFile_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuLinkAddFile_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4488
 *     cuPythonInit()
 *     if __cuLinkAddFile_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLinkAddFile_v2" not found')
 *     err = (<CUresult (*)(CUlinkState, CUjitInputType, const char*, unsigned int, CUjit_option*, void**) nogil> __cuLinkAddFile_v2)(state, typename, path, numOptions, options, optionValues)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4489
 *     if __cuLinkAddFile_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLinkAddFile_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUlinkState, CUjitInputType, const char*, unsigned int, CUjit_option*, void**) nogil> __cuLinkAddFile_v2)(state, typename, path, numOptions, options, optionValues)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4489, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4489, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4488
 *     cuPythonInit()
 *     if __cuLinkAddFile_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLinkAddFile_v2" not found')
 *     err = (<CUresult (*)(CUlinkState, CUjitInputType, const char*, unsigned int, CUjit_option*, void**) nogil> __cuLinkAddFile_v2)(state, typename, path, numOptions, options, optionValues)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4487
 *     global __cuLinkAddFile_v2
 *     cuPythonInit()
 *     if __cuLinkAddFile_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLinkAddFile_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4490
 *         with gil:
 *             raise RuntimeError('Function "cuLinkAddFile_v2" not found')
 *     err = (<CUresult (*)(CUlinkState, CUjitInputType, const char*, unsigned int, CUjit_option*, void**) nogil> __cuLinkAddFile_v2)(state, typename, path, numOptions, options, optionValues)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUlinkState, CUjitInputType, char const *, unsigned int, CUjit_option *, void **))__pyx_v_4cuda_5_cuda_5ccuda___cuLinkAddFile_v2)(__pyx_v_state, __pyx_v_typename, __pyx_v_path, __pyx_v_numOptions, __pyx_v_options, __pyx_v_optionValues);

    /* "cuda/_cuda/ccuda.pyx":4491
 *             raise RuntimeError('Function "cuLinkAddFile_v2" not found')
 *     err = (<CUresult (*)(CUlinkState, CUjitInputType, const char*, unsigned int, CUjit_option*, void**) nogil> __cuLinkAddFile_v2)(state, typename, path, numOptions, options, optionValues)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4485
 * 
 * cdef CUresult _cuLinkAddFile_v2(CUlinkState state, CUjitInputType typename, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLinkAddFile_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLinkAddFile_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4484
 *     return err
 * 
 * cdef CUresult _cuLinkAddFile_v2(CUlinkState state, CUjitInputType typename, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLinkAddFile_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuLinkAddFile_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4493
 *     return err
 * 
 * cdef CUresult _cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLinkComplete
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLinkComplete(CUlinkState __pyx_v_state, void **__pyx_v_cubinOut, size_t *__pyx_v_sizeOut) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuLinkComplete", 1);
  __Pyx_TraceCall("_cuLinkComplete", __pyx_f[0], 4493, 1, __PYX_ERR(0, 4493, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4494
 * 
 * cdef CUresult _cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLinkComplete             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLinkComplete == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4495
 * cdef CUresult _cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLinkComplete
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuLinkComplete == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4495, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4496
 *     global __cuLinkComplete
 *     cuPythonInit()
 *     if __cuLinkComplete == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLinkComplete" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuLinkComplete == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4497
 *     cuPythonInit()
 *     if __cuLinkComplete == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLinkComplete" not found')
 *     err = (<CUresult (*)(CUlinkState, void**, size_t*) nogil> __cuLinkComplete)(state, cubinOut, sizeOut)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4498
 *     if __cuLinkComplete == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLinkComplete" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUlinkState, void**, size_t*) nogil> __cuLinkComplete)(state, cubinOut, sizeOut)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4498, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4498, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4497
 *     cuPythonInit()
 *     if __cuLinkComplete == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLinkComplete" not found')
 *     err = (<CUresult (*)(CUlinkState, void**, size_t*) nogil> __cuLinkComplete)(state, cubinOut, sizeOut)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4496
 *     global __cuLinkComplete
 *     cuPythonInit()
 *     if __cuLinkComplete == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLinkComplete" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4499
 *         with gil:
 *             raise RuntimeError('Function "cuLinkComplete" not found')
 *     err = (<CUresult (*)(CUlinkState, void**, size_t*) nogil> __cuLinkComplete)(state, cubinOut, sizeOut)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUlinkState, void **, size_t *))__pyx_v_4cuda_5_cuda_5ccuda___cuLinkComplete)(__pyx_v_state, __pyx_v_cubinOut, __pyx_v_sizeOut);

    /* "cuda/_cuda/ccuda.pyx":4500
 *             raise RuntimeError('Function "cuLinkComplete" not found')
 *     err = (<CUresult (*)(CUlinkState, void**, size_t*) nogil> __cuLinkComplete)(state, cubinOut, sizeOut)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuLinkDestroy(CUlinkState state) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4494
 * 
 * cdef CUresult _cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLinkComplete             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLinkComplete == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4493
 *     return err
 * 
 * cdef CUresult _cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLinkComplete
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuLinkComplete", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4502
 *     return err
 * 
 * cdef CUresult _cuLinkDestroy(CUlinkState state) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLinkDestroy
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLinkDestroy(CUlinkState __pyx_v_state) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuLinkDestroy", 1);
  __Pyx_TraceCall("_cuLinkDestroy", __pyx_f[0], 4502, 1, __PYX_ERR(0, 4502, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4503
 * 
 * cdef CUresult _cuLinkDestroy(CUlinkState state) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLinkDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLinkDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4504
 * cdef CUresult _cuLinkDestroy(CUlinkState state) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLinkDestroy
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuLinkDestroy == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4504, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4505
 *     global __cuLinkDestroy
 *     cuPythonInit()
 *     if __cuLinkDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLinkDestroy" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuLinkDestroy == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4506
 *     cuPythonInit()
 *     if __cuLinkDestroy == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLinkDestroy" not found')
 *     err = (<CUresult (*)(CUlinkState) nogil> __cuLinkDestroy)(state)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4507
 *     if __cuLinkDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLinkDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUlinkState) nogil> __cuLinkDestroy)(state)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4507, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4507, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4506
 *     cuPythonInit()
 *     if __cuLinkDestroy == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLinkDestroy" not found')
 *     err = (<CUresult (*)(CUlinkState) nogil> __cuLinkDestroy)(state)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4505
 *     global __cuLinkDestroy
 *     cuPythonInit()
 *     if __cuLinkDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLinkDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4508
 *         with gil:
 *             raise RuntimeError('Function "cuLinkDestroy" not found')
 *     err = (<CUresult (*)(CUlinkState) nogil> __cuLinkDestroy)(state)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUlinkState))__pyx_v_4cuda_5_cuda_5ccuda___cuLinkDestroy)(__pyx_v_state);

    /* "cuda/_cuda/ccuda.pyx":4509
 *             raise RuntimeError('Function "cuLinkDestroy" not found')
 *     err = (<CUresult (*)(CUlinkState) nogil> __cuLinkDestroy)(state)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4503
 * 
 * cdef CUresult _cuLinkDestroy(CUlinkState state) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLinkDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLinkDestroy == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4502
 *     return err
 * 
 * cdef CUresult _cuLinkDestroy(CUlinkState state) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLinkDestroy
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuLinkDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4511
 *     return err
 * 
 * cdef CUresult _cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuModuleGetTexRef
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetTexRef(CUtexref *__pyx_v_pTexRef, CUmodule __pyx_v_hmod, char const *__pyx_v_name) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuModuleGetTexRef", 1);
  __Pyx_TraceCall("_cuModuleGetTexRef", __pyx_f[0], 4511, 1, __PYX_ERR(0, 4511, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4512
 * 
 * cdef CUresult _cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleGetTexRef             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleGetTexRef == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4513
 * cdef CUresult _cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleGetTexRef
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuModuleGetTexRef == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4513, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4514
 *     global __cuModuleGetTexRef
 *     cuPythonInit()
 *     if __cuModuleGetTexRef == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetTexRef" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetTexRef == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4515
 *     cuPythonInit()
 *     if __cuModuleGetTexRef == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuModuleGetTexRef" not found')
 *     err = (<CUresult (*)(CUtexref*, CUmodule, const char*) nogil> __cuModuleGetTexRef)(pTexRef, hmod, name)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4516
 *     if __cuModuleGetTexRef == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetTexRef" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref*, CUmodule, const char*) nogil> __cuModuleGetTexRef)(pTexRef, hmod, name)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4516, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4516, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4515
 *     cuPythonInit()
 *     if __cuModuleGetTexRef == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuModuleGetTexRef" not found')
 *     err = (<CUresult (*)(CUtexref*, CUmodule, const char*) nogil> __cuModuleGetTexRef)(pTexRef, hmod, name)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4514
 *     global __cuModuleGetTexRef
 *     cuPythonInit()
 *     if __cuModuleGetTexRef == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetTexRef" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4517
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetTexRef" not found')
 *     err = (<CUresult (*)(CUtexref*, CUmodule, const char*) nogil> __cuModuleGetTexRef)(pTexRef, hmod, name)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUtexref *, CUmodule, char const *))__pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetTexRef)(__pyx_v_pTexRef, __pyx_v_hmod, __pyx_v_name);

    /* "cuda/_cuda/ccuda.pyx":4518
 *             raise RuntimeError('Function "cuModuleGetTexRef" not found')
 *     err = (<CUresult (*)(CUtexref*, CUmodule, const char*) nogil> __cuModuleGetTexRef)(pTexRef, hmod, name)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4512
 * 
 * cdef CUresult _cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleGetTexRef             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleGetTexRef == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4511
 *     return err
 * 
 * cdef CUresult _cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuModuleGetTexRef
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuModuleGetTexRef", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4520
 *     return err
 * 
 * cdef CUresult _cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuModuleGetSurfRef
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetSurfRef(CUsurfref *__pyx_v_pSurfRef, CUmodule __pyx_v_hmod, char const *__pyx_v_name) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuModuleGetSurfRef", 1);
  __Pyx_TraceCall("_cuModuleGetSurfRef", __pyx_f[0], 4520, 1, __PYX_ERR(0, 4520, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4521
 * 
 * cdef CUresult _cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleGetSurfRef             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleGetSurfRef == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4522
 * cdef CUresult _cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleGetSurfRef
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuModuleGetSurfRef == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4522, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4523
 *     global __cuModuleGetSurfRef
 *     cuPythonInit()
 *     if __cuModuleGetSurfRef == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetSurfRef" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetSurfRef == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4524
 *     cuPythonInit()
 *     if __cuModuleGetSurfRef == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuModuleGetSurfRef" not found')
 *     err = (<CUresult (*)(CUsurfref*, CUmodule, const char*) nogil> __cuModuleGetSurfRef)(pSurfRef, hmod, name)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4525
 *     if __cuModuleGetSurfRef == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetSurfRef" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUsurfref*, CUmodule, const char*) nogil> __cuModuleGetSurfRef)(pSurfRef, hmod, name)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4525, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4525, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4524
 *     cuPythonInit()
 *     if __cuModuleGetSurfRef == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuModuleGetSurfRef" not found')
 *     err = (<CUresult (*)(CUsurfref*, CUmodule, const char*) nogil> __cuModuleGetSurfRef)(pSurfRef, hmod, name)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4523
 *     global __cuModuleGetSurfRef
 *     cuPythonInit()
 *     if __cuModuleGetSurfRef == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetSurfRef" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4526
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetSurfRef" not found')
 *     err = (<CUresult (*)(CUsurfref*, CUmodule, const char*) nogil> __cuModuleGetSurfRef)(pSurfRef, hmod, name)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUsurfref *, CUmodule, char const *))__pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetSurfRef)(__pyx_v_pSurfRef, __pyx_v_hmod, __pyx_v_name);

    /* "cuda/_cuda/ccuda.pyx":4527
 *             raise RuntimeError('Function "cuModuleGetSurfRef" not found')
 *     err = (<CUresult (*)(CUsurfref*, CUmodule, const char*) nogil> __cuModuleGetSurfRef)(pSurfRef, hmod, name)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * 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:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4521
 * 
 * cdef CUresult _cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuModuleGetSurfRef             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleGetSurfRef == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4520
 *     return err
 * 
 * cdef CUresult _cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuModuleGetSurfRef
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuModuleGetSurfRef", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4529
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuLibraryLoadData
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLibraryLoadData(CUlibrary *__pyx_v_library, void const *__pyx_v_code, CUjit_option *__pyx_v_jitOptions, void **__pyx_v_jitOptionsValues, unsigned int __pyx_v_numJitOptions, CUlibraryOption *__pyx_v_libraryOptions, void **__pyx_v_libraryOptionValues, unsigned int __pyx_v_numLibraryOptions) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuLibraryLoadData", 1);
  __Pyx_TraceCall("_cuLibraryLoadData", __pyx_f[0], 4529, 1, __PYX_ERR(0, 4529, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4530
 * 
 * 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:
 *     global __cuLibraryLoadData             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLibraryLoadData == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4531
 * 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:
 *     global __cuLibraryLoadData
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuLibraryLoadData == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4531, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4532
 *     global __cuLibraryLoadData
 *     cuPythonInit()
 *     if __cuLibraryLoadData == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryLoadData" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryLoadData == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4533
 *     cuPythonInit()
 *     if __cuLibraryLoadData == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLibraryLoadData" not found')
 *     err = (<CUresult (*)(CUlibrary*, const void*, CUjit_option*, void**, unsigned int, CUlibraryOption*, void**, unsigned int) nogil> __cuLibraryLoadData)(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4534
 *     if __cuLibraryLoadData == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryLoadData" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUlibrary*, const void*, CUjit_option*, void**, unsigned int, CUlibraryOption*, void**, unsigned int) nogil> __cuLibraryLoadData)(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4534, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4534, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4533
 *     cuPythonInit()
 *     if __cuLibraryLoadData == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLibraryLoadData" not found')
 *     err = (<CUresult (*)(CUlibrary*, const void*, CUjit_option*, void**, unsigned int, CUlibraryOption*, void**, unsigned int) nogil> __cuLibraryLoadData)(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4532
 *     global __cuLibraryLoadData
 *     cuPythonInit()
 *     if __cuLibraryLoadData == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryLoadData" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4535
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryLoadData" not found')
 *     err = (<CUresult (*)(CUlibrary*, const void*, CUjit_option*, void**, unsigned int, CUlibraryOption*, void**, unsigned int) nogil> __cuLibraryLoadData)(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUlibrary *, void const *, CUjit_option *, void **, unsigned int, CUlibraryOption *, void **, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryLoadData)(__pyx_v_library, __pyx_v_code, __pyx_v_jitOptions, __pyx_v_jitOptionsValues, __pyx_v_numJitOptions, __pyx_v_libraryOptions, __pyx_v_libraryOptionValues, __pyx_v_numLibraryOptions);

    /* "cuda/_cuda/ccuda.pyx":4536
 *             raise RuntimeError('Function "cuLibraryLoadData" not found')
 *     err = (<CUresult (*)(CUlibrary*, const void*, CUjit_option*, void**, unsigned int, CUlibraryOption*, void**, unsigned int) nogil> __cuLibraryLoadData)(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * 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:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4530
 * 
 * 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:
 *     global __cuLibraryLoadData             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLibraryLoadData == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4529
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuLibraryLoadData
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuLibraryLoadData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4538
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuLibraryLoadFromFile
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLibraryLoadFromFile(CUlibrary *__pyx_v_library, char const *__pyx_v_fileName, CUjit_option *__pyx_v_jitOptions, void **__pyx_v_jitOptionsValues, unsigned int __pyx_v_numJitOptions, CUlibraryOption *__pyx_v_libraryOptions, void **__pyx_v_libraryOptionValues, unsigned int __pyx_v_numLibraryOptions) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuLibraryLoadFromFile", 1);
  __Pyx_TraceCall("_cuLibraryLoadFromFile", __pyx_f[0], 4538, 1, __PYX_ERR(0, 4538, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4539
 * 
 * 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:
 *     global __cuLibraryLoadFromFile             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLibraryLoadFromFile == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4540
 * 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:
 *     global __cuLibraryLoadFromFile
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuLibraryLoadFromFile == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4540, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4541
 *     global __cuLibraryLoadFromFile
 *     cuPythonInit()
 *     if __cuLibraryLoadFromFile == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryLoadFromFile" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryLoadFromFile == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4542
 *     cuPythonInit()
 *     if __cuLibraryLoadFromFile == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLibraryLoadFromFile" not found')
 *     err = (<CUresult (*)(CUlibrary*, const char*, CUjit_option*, void**, unsigned int, CUlibraryOption*, void**, unsigned int) nogil> __cuLibraryLoadFromFile)(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4543
 *     if __cuLibraryLoadFromFile == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryLoadFromFile" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUlibrary*, const char*, CUjit_option*, void**, unsigned int, CUlibraryOption*, void**, unsigned int) nogil> __cuLibraryLoadFromFile)(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4543, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4543, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4542
 *     cuPythonInit()
 *     if __cuLibraryLoadFromFile == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLibraryLoadFromFile" not found')
 *     err = (<CUresult (*)(CUlibrary*, const char*, CUjit_option*, void**, unsigned int, CUlibraryOption*, void**, unsigned int) nogil> __cuLibraryLoadFromFile)(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4541
 *     global __cuLibraryLoadFromFile
 *     cuPythonInit()
 *     if __cuLibraryLoadFromFile == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryLoadFromFile" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4544
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryLoadFromFile" not found')
 *     err = (<CUresult (*)(CUlibrary*, const char*, CUjit_option*, void**, unsigned int, CUlibraryOption*, void**, unsigned int) nogil> __cuLibraryLoadFromFile)(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUlibrary *, char const *, CUjit_option *, void **, unsigned int, CUlibraryOption *, void **, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryLoadFromFile)(__pyx_v_library, __pyx_v_fileName, __pyx_v_jitOptions, __pyx_v_jitOptionsValues, __pyx_v_numJitOptions, __pyx_v_libraryOptions, __pyx_v_libraryOptionValues, __pyx_v_numLibraryOptions);

    /* "cuda/_cuda/ccuda.pyx":4545
 *             raise RuntimeError('Function "cuLibraryLoadFromFile" not found')
 *     err = (<CUresult (*)(CUlibrary*, const char*, CUjit_option*, void**, unsigned int, CUlibraryOption*, void**, unsigned int) nogil> __cuLibraryLoadFromFile)(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuLibraryUnload(CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4539
 * 
 * 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:
 *     global __cuLibraryLoadFromFile             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLibraryLoadFromFile == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4538
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuLibraryLoadFromFile
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuLibraryLoadFromFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4547
 *     return err
 * 
 * cdef CUresult _cuLibraryUnload(CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLibraryUnload
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLibraryUnload(CUlibrary __pyx_v_library) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuLibraryUnload", 1);
  __Pyx_TraceCall("_cuLibraryUnload", __pyx_f[0], 4547, 1, __PYX_ERR(0, 4547, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4548
 * 
 * cdef CUresult _cuLibraryUnload(CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLibraryUnload             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLibraryUnload == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4549
 * cdef CUresult _cuLibraryUnload(CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLibraryUnload
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuLibraryUnload == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4549, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4550
 *     global __cuLibraryUnload
 *     cuPythonInit()
 *     if __cuLibraryUnload == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryUnload" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryUnload == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4551
 *     cuPythonInit()
 *     if __cuLibraryUnload == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLibraryUnload" not found')
 *     err = (<CUresult (*)(CUlibrary) nogil> __cuLibraryUnload)(library)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4552
 *     if __cuLibraryUnload == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryUnload" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUlibrary) nogil> __cuLibraryUnload)(library)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4552, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4552, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4551
 *     cuPythonInit()
 *     if __cuLibraryUnload == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLibraryUnload" not found')
 *     err = (<CUresult (*)(CUlibrary) nogil> __cuLibraryUnload)(library)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4550
 *     global __cuLibraryUnload
 *     cuPythonInit()
 *     if __cuLibraryUnload == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryUnload" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4553
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryUnload" not found')
 *     err = (<CUresult (*)(CUlibrary) nogil> __cuLibraryUnload)(library)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUlibrary))__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryUnload)(__pyx_v_library);

    /* "cuda/_cuda/ccuda.pyx":4554
 *             raise RuntimeError('Function "cuLibraryUnload" not found')
 *     err = (<CUresult (*)(CUlibrary) nogil> __cuLibraryUnload)(library)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuLibraryGetKernel(CUkernel* pKernel, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4548
 * 
 * cdef CUresult _cuLibraryUnload(CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLibraryUnload             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLibraryUnload == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4547
 *     return err
 * 
 * cdef CUresult _cuLibraryUnload(CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLibraryUnload
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuLibraryUnload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4556
 *     return err
 * 
 * cdef CUresult _cuLibraryGetKernel(CUkernel* pKernel, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLibraryGetKernel
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLibraryGetKernel(CUkernel *__pyx_v_pKernel, CUlibrary __pyx_v_library, char const *__pyx_v_name) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuLibraryGetKernel", 1);
  __Pyx_TraceCall("_cuLibraryGetKernel", __pyx_f[0], 4556, 1, __PYX_ERR(0, 4556, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4557
 * 
 * cdef CUresult _cuLibraryGetKernel(CUkernel* pKernel, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLibraryGetKernel             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLibraryGetKernel == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4558
 * cdef CUresult _cuLibraryGetKernel(CUkernel* pKernel, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLibraryGetKernel
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuLibraryGetKernel == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4558, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4559
 *     global __cuLibraryGetKernel
 *     cuPythonInit()
 *     if __cuLibraryGetKernel == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryGetKernel" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetKernel == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4560
 *     cuPythonInit()
 *     if __cuLibraryGetKernel == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLibraryGetKernel" not found')
 *     err = (<CUresult (*)(CUkernel*, CUlibrary, const char*) nogil> __cuLibraryGetKernel)(pKernel, library, name)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4561
 *     if __cuLibraryGetKernel == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryGetKernel" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUkernel*, CUlibrary, const char*) nogil> __cuLibraryGetKernel)(pKernel, library, name)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4561, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4561, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4560
 *     cuPythonInit()
 *     if __cuLibraryGetKernel == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLibraryGetKernel" not found')
 *     err = (<CUresult (*)(CUkernel*, CUlibrary, const char*) nogil> __cuLibraryGetKernel)(pKernel, library, name)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4559
 *     global __cuLibraryGetKernel
 *     cuPythonInit()
 *     if __cuLibraryGetKernel == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryGetKernel" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4562
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryGetKernel" not found')
 *     err = (<CUresult (*)(CUkernel*, CUlibrary, const char*) nogil> __cuLibraryGetKernel)(pKernel, library, name)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUkernel *, CUlibrary, char const *))__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetKernel)(__pyx_v_pKernel, __pyx_v_library, __pyx_v_name);

    /* "cuda/_cuda/ccuda.pyx":4563
 *             raise RuntimeError('Function "cuLibraryGetKernel" not found')
 *     err = (<CUresult (*)(CUkernel*, CUlibrary, const char*) nogil> __cuLibraryGetKernel)(pKernel, library, name)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuLibraryGetModule(CUmodule* pMod, CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4557
 * 
 * cdef CUresult _cuLibraryGetKernel(CUkernel* pKernel, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLibraryGetKernel             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLibraryGetKernel == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4556
 *     return err
 * 
 * cdef CUresult _cuLibraryGetKernel(CUkernel* pKernel, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLibraryGetKernel
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuLibraryGetKernel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4565
 *     return err
 * 
 * cdef CUresult _cuLibraryGetModule(CUmodule* pMod, CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLibraryGetModule
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLibraryGetModule(CUmodule *__pyx_v_pMod, CUlibrary __pyx_v_library) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuLibraryGetModule", 1);
  __Pyx_TraceCall("_cuLibraryGetModule", __pyx_f[0], 4565, 1, __PYX_ERR(0, 4565, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4566
 * 
 * cdef CUresult _cuLibraryGetModule(CUmodule* pMod, CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLibraryGetModule             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLibraryGetModule == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4567
 * cdef CUresult _cuLibraryGetModule(CUmodule* pMod, CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLibraryGetModule
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuLibraryGetModule == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4567, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4568
 *     global __cuLibraryGetModule
 *     cuPythonInit()
 *     if __cuLibraryGetModule == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryGetModule" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetModule == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4569
 *     cuPythonInit()
 *     if __cuLibraryGetModule == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLibraryGetModule" not found')
 *     err = (<CUresult (*)(CUmodule*, CUlibrary) nogil> __cuLibraryGetModule)(pMod, library)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4570
 *     if __cuLibraryGetModule == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryGetModule" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule*, CUlibrary) nogil> __cuLibraryGetModule)(pMod, library)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4570, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4570, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4569
 *     cuPythonInit()
 *     if __cuLibraryGetModule == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLibraryGetModule" not found')
 *     err = (<CUresult (*)(CUmodule*, CUlibrary) nogil> __cuLibraryGetModule)(pMod, library)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4568
 *     global __cuLibraryGetModule
 *     cuPythonInit()
 *     if __cuLibraryGetModule == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryGetModule" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4571
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryGetModule" not found')
 *     err = (<CUresult (*)(CUmodule*, CUlibrary) nogil> __cuLibraryGetModule)(pMod, library)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmodule *, CUlibrary))__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetModule)(__pyx_v_pMod, __pyx_v_library);

    /* "cuda/_cuda/ccuda.pyx":4572
 *             raise RuntimeError('Function "cuLibraryGetModule" not found')
 *     err = (<CUresult (*)(CUmodule*, CUlibrary) nogil> __cuLibraryGetModule)(pMod, library)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuKernelGetFunction(CUfunction* pFunc, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4566
 * 
 * cdef CUresult _cuLibraryGetModule(CUmodule* pMod, CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLibraryGetModule             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLibraryGetModule == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4565
 *     return err
 * 
 * cdef CUresult _cuLibraryGetModule(CUmodule* pMod, CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLibraryGetModule
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuLibraryGetModule", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4574
 *     return err
 * 
 * cdef CUresult _cuKernelGetFunction(CUfunction* pFunc, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuKernelGetFunction
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuKernelGetFunction(CUfunction *__pyx_v_pFunc, CUkernel __pyx_v_kernel) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuKernelGetFunction", 1);
  __Pyx_TraceCall("_cuKernelGetFunction", __pyx_f[0], 4574, 1, __PYX_ERR(0, 4574, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4575
 * 
 * cdef CUresult _cuKernelGetFunction(CUfunction* pFunc, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuKernelGetFunction             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuKernelGetFunction == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4576
 * cdef CUresult _cuKernelGetFunction(CUfunction* pFunc, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuKernelGetFunction
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuKernelGetFunction == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4576, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4577
 *     global __cuKernelGetFunction
 *     cuPythonInit()
 *     if __cuKernelGetFunction == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuKernelGetFunction" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuKernelGetFunction == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4578
 *     cuPythonInit()
 *     if __cuKernelGetFunction == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuKernelGetFunction" not found')
 *     err = (<CUresult (*)(CUfunction*, CUkernel) nogil> __cuKernelGetFunction)(pFunc, kernel)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4579
 *     if __cuKernelGetFunction == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuKernelGetFunction" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction*, CUkernel) nogil> __cuKernelGetFunction)(pFunc, kernel)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4579, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4579, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4578
 *     cuPythonInit()
 *     if __cuKernelGetFunction == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuKernelGetFunction" not found')
 *     err = (<CUresult (*)(CUfunction*, CUkernel) nogil> __cuKernelGetFunction)(pFunc, kernel)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4577
 *     global __cuKernelGetFunction
 *     cuPythonInit()
 *     if __cuKernelGetFunction == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuKernelGetFunction" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4580
 *         with gil:
 *             raise RuntimeError('Function "cuKernelGetFunction" not found')
 *     err = (<CUresult (*)(CUfunction*, CUkernel) nogil> __cuKernelGetFunction)(pFunc, kernel)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUfunction *, CUkernel))__pyx_v_4cuda_5_cuda_5ccuda___cuKernelGetFunction)(__pyx_v_pFunc, __pyx_v_kernel);

    /* "cuda/_cuda/ccuda.pyx":4581
 *             raise RuntimeError('Function "cuKernelGetFunction" not found')
 *     err = (<CUresult (*)(CUfunction*, CUkernel) nogil> __cuKernelGetFunction)(pFunc, kernel)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuLibraryGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4575
 * 
 * cdef CUresult _cuKernelGetFunction(CUfunction* pFunc, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuKernelGetFunction             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuKernelGetFunction == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4574
 *     return err
 * 
 * cdef CUresult _cuKernelGetFunction(CUfunction* pFunc, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuKernelGetFunction
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuKernelGetFunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4583
 *     return err
 * 
 * cdef CUresult _cuLibraryGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLibraryGetGlobal
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLibraryGetGlobal(CUdeviceptr *__pyx_v_dptr, size_t *__pyx_v_numbytes, CUlibrary __pyx_v_library, char const *__pyx_v_name) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuLibraryGetGlobal", 1);
  __Pyx_TraceCall("_cuLibraryGetGlobal", __pyx_f[0], 4583, 1, __PYX_ERR(0, 4583, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4584
 * 
 * cdef CUresult _cuLibraryGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLibraryGetGlobal             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLibraryGetGlobal == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4585
 * cdef CUresult _cuLibraryGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLibraryGetGlobal
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuLibraryGetGlobal == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4585, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4586
 *     global __cuLibraryGetGlobal
 *     cuPythonInit()
 *     if __cuLibraryGetGlobal == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryGetGlobal" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetGlobal == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4587
 *     cuPythonInit()
 *     if __cuLibraryGetGlobal == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLibraryGetGlobal" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUlibrary, const char*) nogil> __cuLibraryGetGlobal)(dptr, numbytes, library, name)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4588
 *     if __cuLibraryGetGlobal == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryGetGlobal" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUlibrary, const char*) nogil> __cuLibraryGetGlobal)(dptr, numbytes, library, name)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4588, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4588, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4587
 *     cuPythonInit()
 *     if __cuLibraryGetGlobal == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLibraryGetGlobal" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUlibrary, const char*) nogil> __cuLibraryGetGlobal)(dptr, numbytes, library, name)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4586
 *     global __cuLibraryGetGlobal
 *     cuPythonInit()
 *     if __cuLibraryGetGlobal == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryGetGlobal" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4589
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryGetGlobal" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUlibrary, const char*) nogil> __cuLibraryGetGlobal)(dptr, numbytes, library, name)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr *, size_t *, CUlibrary, char const *))__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetGlobal)(__pyx_v_dptr, __pyx_v_numbytes, __pyx_v_library, __pyx_v_name);

    /* "cuda/_cuda/ccuda.pyx":4590
 *             raise RuntimeError('Function "cuLibraryGetGlobal" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUlibrary, const char*) nogil> __cuLibraryGetGlobal)(dptr, numbytes, library, name)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuLibraryGetManaged(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4584
 * 
 * cdef CUresult _cuLibraryGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLibraryGetGlobal             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLibraryGetGlobal == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4583
 *     return err
 * 
 * cdef CUresult _cuLibraryGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLibraryGetGlobal
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuLibraryGetGlobal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4592
 *     return err
 * 
 * cdef CUresult _cuLibraryGetManaged(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLibraryGetManaged
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLibraryGetManaged(CUdeviceptr *__pyx_v_dptr, size_t *__pyx_v_numbytes, CUlibrary __pyx_v_library, char const *__pyx_v_name) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuLibraryGetManaged", 1);
  __Pyx_TraceCall("_cuLibraryGetManaged", __pyx_f[0], 4592, 1, __PYX_ERR(0, 4592, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4593
 * 
 * cdef CUresult _cuLibraryGetManaged(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLibraryGetManaged             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLibraryGetManaged == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4594
 * cdef CUresult _cuLibraryGetManaged(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLibraryGetManaged
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuLibraryGetManaged == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4594, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4595
 *     global __cuLibraryGetManaged
 *     cuPythonInit()
 *     if __cuLibraryGetManaged == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryGetManaged" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetManaged == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4596
 *     cuPythonInit()
 *     if __cuLibraryGetManaged == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLibraryGetManaged" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUlibrary, const char*) nogil> __cuLibraryGetManaged)(dptr, numbytes, library, name)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4597
 *     if __cuLibraryGetManaged == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryGetManaged" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUlibrary, const char*) nogil> __cuLibraryGetManaged)(dptr, numbytes, library, name)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4597, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4597, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4596
 *     cuPythonInit()
 *     if __cuLibraryGetManaged == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLibraryGetManaged" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUlibrary, const char*) nogil> __cuLibraryGetManaged)(dptr, numbytes, library, name)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4595
 *     global __cuLibraryGetManaged
 *     cuPythonInit()
 *     if __cuLibraryGetManaged == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryGetManaged" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4598
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryGetManaged" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUlibrary, const char*) nogil> __cuLibraryGetManaged)(dptr, numbytes, library, name)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr *, size_t *, CUlibrary, char const *))__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetManaged)(__pyx_v_dptr, __pyx_v_numbytes, __pyx_v_library, __pyx_v_name);

    /* "cuda/_cuda/ccuda.pyx":4599
 *             raise RuntimeError('Function "cuLibraryGetManaged" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUlibrary, const char*) nogil> __cuLibraryGetManaged)(dptr, numbytes, library, name)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuLibraryGetUnifiedFunction(void** fptr, CUlibrary library, const char* symbol) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4593
 * 
 * cdef CUresult _cuLibraryGetManaged(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLibraryGetManaged             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLibraryGetManaged == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4592
 *     return err
 * 
 * cdef CUresult _cuLibraryGetManaged(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLibraryGetManaged
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuLibraryGetManaged", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4601
 *     return err
 * 
 * cdef CUresult _cuLibraryGetUnifiedFunction(void** fptr, CUlibrary library, const char* symbol) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLibraryGetUnifiedFunction
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLibraryGetUnifiedFunction(void **__pyx_v_fptr, CUlibrary __pyx_v_library, char const *__pyx_v_symbol) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuLibraryGetUnifiedFunction", 1);
  __Pyx_TraceCall("_cuLibraryGetUnifiedFunction", __pyx_f[0], 4601, 1, __PYX_ERR(0, 4601, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4602
 * 
 * cdef CUresult _cuLibraryGetUnifiedFunction(void** fptr, CUlibrary library, const char* symbol) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLibraryGetUnifiedFunction             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLibraryGetUnifiedFunction == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4603
 * cdef CUresult _cuLibraryGetUnifiedFunction(void** fptr, CUlibrary library, const char* symbol) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLibraryGetUnifiedFunction
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuLibraryGetUnifiedFunction == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4603, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4604
 *     global __cuLibraryGetUnifiedFunction
 *     cuPythonInit()
 *     if __cuLibraryGetUnifiedFunction == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryGetUnifiedFunction" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetUnifiedFunction == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4605
 *     cuPythonInit()
 *     if __cuLibraryGetUnifiedFunction == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLibraryGetUnifiedFunction" not found')
 *     err = (<CUresult (*)(void**, CUlibrary, const char*) nogil> __cuLibraryGetUnifiedFunction)(fptr, library, symbol)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4606
 *     if __cuLibraryGetUnifiedFunction == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryGetUnifiedFunction" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void**, CUlibrary, const char*) nogil> __cuLibraryGetUnifiedFunction)(fptr, library, symbol)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4606, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4606, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4605
 *     cuPythonInit()
 *     if __cuLibraryGetUnifiedFunction == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLibraryGetUnifiedFunction" not found')
 *     err = (<CUresult (*)(void**, CUlibrary, const char*) nogil> __cuLibraryGetUnifiedFunction)(fptr, library, symbol)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4604
 *     global __cuLibraryGetUnifiedFunction
 *     cuPythonInit()
 *     if __cuLibraryGetUnifiedFunction == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryGetUnifiedFunction" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4607
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryGetUnifiedFunction" not found')
 *     err = (<CUresult (*)(void**, CUlibrary, const char*) nogil> __cuLibraryGetUnifiedFunction)(fptr, library, symbol)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(void **, CUlibrary, char const *))__pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetUnifiedFunction)(__pyx_v_fptr, __pyx_v_library, __pyx_v_symbol);

    /* "cuda/_cuda/ccuda.pyx":4608
 *             raise RuntimeError('Function "cuLibraryGetUnifiedFunction" not found')
 *     err = (<CUresult (*)(void**, CUlibrary, const char*) nogil> __cuLibraryGetUnifiedFunction)(fptr, library, symbol)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuKernelGetAttribute(int* pi, CUfunction_attribute attrib, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4602
 * 
 * cdef CUresult _cuLibraryGetUnifiedFunction(void** fptr, CUlibrary library, const char* symbol) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLibraryGetUnifiedFunction             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLibraryGetUnifiedFunction == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4601
 *     return err
 * 
 * cdef CUresult _cuLibraryGetUnifiedFunction(void** fptr, CUlibrary library, const char* symbol) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLibraryGetUnifiedFunction
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuLibraryGetUnifiedFunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4610
 *     return err
 * 
 * cdef CUresult _cuKernelGetAttribute(int* pi, CUfunction_attribute attrib, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuKernelGetAttribute
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuKernelGetAttribute(int *__pyx_v_pi, CUfunction_attribute __pyx_v_attrib, CUkernel __pyx_v_kernel, CUdevice __pyx_v_dev) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuKernelGetAttribute", 1);
  __Pyx_TraceCall("_cuKernelGetAttribute", __pyx_f[0], 4610, 1, __PYX_ERR(0, 4610, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4611
 * 
 * cdef CUresult _cuKernelGetAttribute(int* pi, CUfunction_attribute attrib, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuKernelGetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuKernelGetAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4612
 * cdef CUresult _cuKernelGetAttribute(int* pi, CUfunction_attribute attrib, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuKernelGetAttribute
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuKernelGetAttribute == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4612, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4613
 *     global __cuKernelGetAttribute
 *     cuPythonInit()
 *     if __cuKernelGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuKernelGetAttribute" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuKernelGetAttribute == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4614
 *     cuPythonInit()
 *     if __cuKernelGetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuKernelGetAttribute" not found')
 *     err = (<CUresult (*)(int*, CUfunction_attribute, CUkernel, CUdevice) nogil> __cuKernelGetAttribute)(pi, attrib, kernel, dev)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4615
 *     if __cuKernelGetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuKernelGetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, CUfunction_attribute, CUkernel, CUdevice) nogil> __cuKernelGetAttribute)(pi, attrib, kernel, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4615, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4615, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4614
 *     cuPythonInit()
 *     if __cuKernelGetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuKernelGetAttribute" not found')
 *     err = (<CUresult (*)(int*, CUfunction_attribute, CUkernel, CUdevice) nogil> __cuKernelGetAttribute)(pi, attrib, kernel, dev)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4613
 *     global __cuKernelGetAttribute
 *     cuPythonInit()
 *     if __cuKernelGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuKernelGetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4616
 *         with gil:
 *             raise RuntimeError('Function "cuKernelGetAttribute" not found')
 *     err = (<CUresult (*)(int*, CUfunction_attribute, CUkernel, CUdevice) nogil> __cuKernelGetAttribute)(pi, attrib, kernel, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(int *, CUfunction_attribute, CUkernel, CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuKernelGetAttribute)(__pyx_v_pi, __pyx_v_attrib, __pyx_v_kernel, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":4617
 *             raise RuntimeError('Function "cuKernelGetAttribute" not found')
 *     err = (<CUresult (*)(int*, CUfunction_attribute, CUkernel, CUdevice) nogil> __cuKernelGetAttribute)(pi, attrib, kernel, dev)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuKernelSetAttribute(CUfunction_attribute attrib, int val, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4611
 * 
 * cdef CUresult _cuKernelGetAttribute(int* pi, CUfunction_attribute attrib, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuKernelGetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuKernelGetAttribute == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4610
 *     return err
 * 
 * cdef CUresult _cuKernelGetAttribute(int* pi, CUfunction_attribute attrib, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuKernelGetAttribute
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuKernelGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4619
 *     return err
 * 
 * cdef CUresult _cuKernelSetAttribute(CUfunction_attribute attrib, int val, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuKernelSetAttribute
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuKernelSetAttribute(CUfunction_attribute __pyx_v_attrib, int __pyx_v_val, CUkernel __pyx_v_kernel, CUdevice __pyx_v_dev) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuKernelSetAttribute", 1);
  __Pyx_TraceCall("_cuKernelSetAttribute", __pyx_f[0], 4619, 1, __PYX_ERR(0, 4619, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4620
 * 
 * cdef CUresult _cuKernelSetAttribute(CUfunction_attribute attrib, int val, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuKernelSetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuKernelSetAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4621
 * cdef CUresult _cuKernelSetAttribute(CUfunction_attribute attrib, int val, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuKernelSetAttribute
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuKernelSetAttribute == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4621, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4622
 *     global __cuKernelSetAttribute
 *     cuPythonInit()
 *     if __cuKernelSetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuKernelSetAttribute" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuKernelSetAttribute == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4623
 *     cuPythonInit()
 *     if __cuKernelSetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuKernelSetAttribute" not found')
 *     err = (<CUresult (*)(CUfunction_attribute, int, CUkernel, CUdevice) nogil> __cuKernelSetAttribute)(attrib, val, kernel, dev)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4624
 *     if __cuKernelSetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuKernelSetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction_attribute, int, CUkernel, CUdevice) nogil> __cuKernelSetAttribute)(attrib, val, kernel, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__77, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4624, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4624, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4623
 *     cuPythonInit()
 *     if __cuKernelSetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuKernelSetAttribute" not found')
 *     err = (<CUresult (*)(CUfunction_attribute, int, CUkernel, CUdevice) nogil> __cuKernelSetAttribute)(attrib, val, kernel, dev)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4622
 *     global __cuKernelSetAttribute
 *     cuPythonInit()
 *     if __cuKernelSetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuKernelSetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4625
 *         with gil:
 *             raise RuntimeError('Function "cuKernelSetAttribute" not found')
 *     err = (<CUresult (*)(CUfunction_attribute, int, CUkernel, CUdevice) nogil> __cuKernelSetAttribute)(attrib, val, kernel, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUfunction_attribute, int, CUkernel, CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuKernelSetAttribute)(__pyx_v_attrib, __pyx_v_val, __pyx_v_kernel, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":4626
 *             raise RuntimeError('Function "cuKernelSetAttribute" not found')
 *     err = (<CUresult (*)(CUfunction_attribute, int, CUkernel, CUdevice) nogil> __cuKernelSetAttribute)(attrib, val, kernel, dev)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuKernelSetCacheConfig(CUkernel kernel, CUfunc_cache config, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4620
 * 
 * cdef CUresult _cuKernelSetAttribute(CUfunction_attribute attrib, int val, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuKernelSetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuKernelSetAttribute == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4619
 *     return err
 * 
 * cdef CUresult _cuKernelSetAttribute(CUfunction_attribute attrib, int val, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuKernelSetAttribute
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuKernelSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4628
 *     return err
 * 
 * cdef CUresult _cuKernelSetCacheConfig(CUkernel kernel, CUfunc_cache config, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuKernelSetCacheConfig
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuKernelSetCacheConfig(CUkernel __pyx_v_kernel, CUfunc_cache __pyx_v_config, CUdevice __pyx_v_dev) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuKernelSetCacheConfig", 1);
  __Pyx_TraceCall("_cuKernelSetCacheConfig", __pyx_f[0], 4628, 1, __PYX_ERR(0, 4628, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4629
 * 
 * cdef CUresult _cuKernelSetCacheConfig(CUkernel kernel, CUfunc_cache config, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuKernelSetCacheConfig             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuKernelSetCacheConfig == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4630
 * cdef CUresult _cuKernelSetCacheConfig(CUkernel kernel, CUfunc_cache config, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuKernelSetCacheConfig
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuKernelSetCacheConfig == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4630, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4631
 *     global __cuKernelSetCacheConfig
 *     cuPythonInit()
 *     if __cuKernelSetCacheConfig == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuKernelSetCacheConfig" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuKernelSetCacheConfig == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4632
 *     cuPythonInit()
 *     if __cuKernelSetCacheConfig == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuKernelSetCacheConfig" not found')
 *     err = (<CUresult (*)(CUkernel, CUfunc_cache, CUdevice) nogil> __cuKernelSetCacheConfig)(kernel, config, dev)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4633
 *     if __cuKernelSetCacheConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuKernelSetCacheConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUkernel, CUfunc_cache, CUdevice) nogil> __cuKernelSetCacheConfig)(kernel, config, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__78, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4633, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4633, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4632
 *     cuPythonInit()
 *     if __cuKernelSetCacheConfig == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuKernelSetCacheConfig" not found')
 *     err = (<CUresult (*)(CUkernel, CUfunc_cache, CUdevice) nogil> __cuKernelSetCacheConfig)(kernel, config, dev)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4631
 *     global __cuKernelSetCacheConfig
 *     cuPythonInit()
 *     if __cuKernelSetCacheConfig == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuKernelSetCacheConfig" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4634
 *         with gil:
 *             raise RuntimeError('Function "cuKernelSetCacheConfig" not found')
 *     err = (<CUresult (*)(CUkernel, CUfunc_cache, CUdevice) nogil> __cuKernelSetCacheConfig)(kernel, config, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUkernel, CUfunc_cache, CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuKernelSetCacheConfig)(__pyx_v_kernel, __pyx_v_config, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":4635
 *             raise RuntimeError('Function "cuKernelSetCacheConfig" not found')
 *     err = (<CUresult (*)(CUkernel, CUfunc_cache, CUdevice) nogil> __cuKernelSetCacheConfig)(kernel, config, dev)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemGetInfo_v2(size_t* free, size_t* total) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4629
 * 
 * cdef CUresult _cuKernelSetCacheConfig(CUkernel kernel, CUfunc_cache config, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuKernelSetCacheConfig             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuKernelSetCacheConfig == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4628
 *     return err
 * 
 * cdef CUresult _cuKernelSetCacheConfig(CUkernel kernel, CUfunc_cache config, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuKernelSetCacheConfig
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuKernelSetCacheConfig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4637
 *     return err
 * 
 * cdef CUresult _cuMemGetInfo_v2(size_t* free, size_t* total) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemGetInfo_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemGetInfo_v2(size_t *__pyx_v_free, size_t *__pyx_v_total) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemGetInfo_v2", 1);
  __Pyx_TraceCall("_cuMemGetInfo_v2", __pyx_f[0], 4637, 1, __PYX_ERR(0, 4637, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4638
 * 
 * cdef CUresult _cuMemGetInfo_v2(size_t* free, size_t* total) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemGetInfo_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemGetInfo_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4639
 * cdef CUresult _cuMemGetInfo_v2(size_t* free, size_t* total) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemGetInfo_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemGetInfo_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4639, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4640
 *     global __cuMemGetInfo_v2
 *     cuPythonInit()
 *     if __cuMemGetInfo_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetInfo_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetInfo_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4641
 *     cuPythonInit()
 *     if __cuMemGetInfo_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemGetInfo_v2" not found')
 *     err = (<CUresult (*)(size_t*, size_t*) nogil> __cuMemGetInfo_v2)(free, total)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4642
 *     if __cuMemGetInfo_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetInfo_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(size_t*, size_t*) nogil> __cuMemGetInfo_v2)(free, total)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4642, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4642, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4641
 *     cuPythonInit()
 *     if __cuMemGetInfo_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemGetInfo_v2" not found')
 *     err = (<CUresult (*)(size_t*, size_t*) nogil> __cuMemGetInfo_v2)(free, total)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4640
 *     global __cuMemGetInfo_v2
 *     cuPythonInit()
 *     if __cuMemGetInfo_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetInfo_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4643
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetInfo_v2" not found')
 *     err = (<CUresult (*)(size_t*, size_t*) nogil> __cuMemGetInfo_v2)(free, total)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(size_t *, size_t *))__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetInfo_v2)(__pyx_v_free, __pyx_v_total);

    /* "cuda/_cuda/ccuda.pyx":4644
 *             raise RuntimeError('Function "cuMemGetInfo_v2" not found')
 *     err = (<CUresult (*)(size_t*, size_t*) nogil> __cuMemGetInfo_v2)(free, total)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemAlloc_v2(CUdeviceptr* dptr, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4638
 * 
 * cdef CUresult _cuMemGetInfo_v2(size_t* free, size_t* total) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemGetInfo_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemGetInfo_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4637
 *     return err
 * 
 * cdef CUresult _cuMemGetInfo_v2(size_t* free, size_t* total) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemGetInfo_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemGetInfo_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4646
 *     return err
 * 
 * cdef CUresult _cuMemAlloc_v2(CUdeviceptr* dptr, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemAlloc_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemAlloc_v2(CUdeviceptr *__pyx_v_dptr, size_t __pyx_v_bytesize) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemAlloc_v2", 1);
  __Pyx_TraceCall("_cuMemAlloc_v2", __pyx_f[0], 4646, 1, __PYX_ERR(0, 4646, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4647
 * 
 * cdef CUresult _cuMemAlloc_v2(CUdeviceptr* dptr, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAlloc_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemAlloc_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4648
 * cdef CUresult _cuMemAlloc_v2(CUdeviceptr* dptr, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAlloc_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemAlloc_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4648, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4649
 *     global __cuMemAlloc_v2
 *     cuPythonInit()
 *     if __cuMemAlloc_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAlloc_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemAlloc_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4650
 *     cuPythonInit()
 *     if __cuMemAlloc_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemAlloc_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t) nogil> __cuMemAlloc_v2)(dptr, bytesize)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4651
 *     if __cuMemAlloc_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemAlloc_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, size_t) nogil> __cuMemAlloc_v2)(dptr, bytesize)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__80, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4651, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4651, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4650
 *     cuPythonInit()
 *     if __cuMemAlloc_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemAlloc_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t) nogil> __cuMemAlloc_v2)(dptr, bytesize)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4649
 *     global __cuMemAlloc_v2
 *     cuPythonInit()
 *     if __cuMemAlloc_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAlloc_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4652
 *         with gil:
 *             raise RuntimeError('Function "cuMemAlloc_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t) nogil> __cuMemAlloc_v2)(dptr, bytesize)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr *, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemAlloc_v2)(__pyx_v_dptr, __pyx_v_bytesize);

    /* "cuda/_cuda/ccuda.pyx":4653
 *             raise RuntimeError('Function "cuMemAlloc_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t) nogil> __cuMemAlloc_v2)(dptr, bytesize)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemAllocPitch_v2(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4647
 * 
 * cdef CUresult _cuMemAlloc_v2(CUdeviceptr* dptr, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAlloc_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemAlloc_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4646
 *     return err
 * 
 * cdef CUresult _cuMemAlloc_v2(CUdeviceptr* dptr, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemAlloc_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemAlloc_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4655
 *     return err
 * 
 * cdef CUresult _cuMemAllocPitch_v2(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemAllocPitch_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocPitch_v2(CUdeviceptr *__pyx_v_dptr, size_t *__pyx_v_pPitch, size_t __pyx_v_WidthInBytes, size_t __pyx_v_Height, unsigned int __pyx_v_ElementSizeBytes) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemAllocPitch_v2", 1);
  __Pyx_TraceCall("_cuMemAllocPitch_v2", __pyx_f[0], 4655, 1, __PYX_ERR(0, 4655, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4656
 * 
 * cdef CUresult _cuMemAllocPitch_v2(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAllocPitch_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemAllocPitch_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4657
 * cdef CUresult _cuMemAllocPitch_v2(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAllocPitch_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemAllocPitch_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4657, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4658
 *     global __cuMemAllocPitch_v2
 *     cuPythonInit()
 *     if __cuMemAllocPitch_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocPitch_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocPitch_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4659
 *     cuPythonInit()
 *     if __cuMemAllocPitch_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemAllocPitch_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, size_t, size_t, unsigned int) nogil> __cuMemAllocPitch_v2)(dptr, pPitch, WidthInBytes, Height, ElementSizeBytes)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4660
 *     if __cuMemAllocPitch_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocPitch_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, size_t, size_t, unsigned int) nogil> __cuMemAllocPitch_v2)(dptr, pPitch, WidthInBytes, Height, ElementSizeBytes)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4660, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4660, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4659
 *     cuPythonInit()
 *     if __cuMemAllocPitch_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemAllocPitch_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, size_t, size_t, unsigned int) nogil> __cuMemAllocPitch_v2)(dptr, pPitch, WidthInBytes, Height, ElementSizeBytes)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4658
 *     global __cuMemAllocPitch_v2
 *     cuPythonInit()
 *     if __cuMemAllocPitch_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocPitch_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4661
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocPitch_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, size_t, size_t, unsigned int) nogil> __cuMemAllocPitch_v2)(dptr, pPitch, WidthInBytes, Height, ElementSizeBytes)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr *, size_t *, size_t, size_t, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocPitch_v2)(__pyx_v_dptr, __pyx_v_pPitch, __pyx_v_WidthInBytes, __pyx_v_Height, __pyx_v_ElementSizeBytes);

    /* "cuda/_cuda/ccuda.pyx":4662
 *             raise RuntimeError('Function "cuMemAllocPitch_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, size_t, size_t, unsigned int) nogil> __cuMemAllocPitch_v2)(dptr, pPitch, WidthInBytes, Height, ElementSizeBytes)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemFree_v2(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4656
 * 
 * cdef CUresult _cuMemAllocPitch_v2(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAllocPitch_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemAllocPitch_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4655
 *     return err
 * 
 * cdef CUresult _cuMemAllocPitch_v2(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemAllocPitch_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemAllocPitch_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4664
 *     return err
 * 
 * cdef CUresult _cuMemFree_v2(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemFree_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemFree_v2(CUdeviceptr __pyx_v_dptr) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemFree_v2", 1);
  __Pyx_TraceCall("_cuMemFree_v2", __pyx_f[0], 4664, 1, __PYX_ERR(0, 4664, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4665
 * 
 * cdef CUresult _cuMemFree_v2(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemFree_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemFree_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4666
 * cdef CUresult _cuMemFree_v2(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemFree_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemFree_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4666, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4667
 *     global __cuMemFree_v2
 *     cuPythonInit()
 *     if __cuMemFree_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemFree_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemFree_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4668
 *     cuPythonInit()
 *     if __cuMemFree_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemFree_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr) nogil> __cuMemFree_v2)(dptr)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4669
 *     if __cuMemFree_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemFree_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr) nogil> __cuMemFree_v2)(dptr)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__82, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4669, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4669, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4668
 *     cuPythonInit()
 *     if __cuMemFree_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemFree_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr) nogil> __cuMemFree_v2)(dptr)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4667
 *     global __cuMemFree_v2
 *     cuPythonInit()
 *     if __cuMemFree_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemFree_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4670
 *         with gil:
 *             raise RuntimeError('Function "cuMemFree_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr) nogil> __cuMemFree_v2)(dptr)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr))__pyx_v_4cuda_5_cuda_5ccuda___cuMemFree_v2)(__pyx_v_dptr);

    /* "cuda/_cuda/ccuda.pyx":4671
 *             raise RuntimeError('Function "cuMemFree_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr) nogil> __cuMemFree_v2)(dptr)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemGetAddressRange_v2(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4665
 * 
 * cdef CUresult _cuMemFree_v2(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemFree_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemFree_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4664
 *     return err
 * 
 * cdef CUresult _cuMemFree_v2(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemFree_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemFree_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4673
 *     return err
 * 
 * cdef CUresult _cuMemGetAddressRange_v2(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemGetAddressRange_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAddressRange_v2(CUdeviceptr *__pyx_v_pbase, size_t *__pyx_v_psize, CUdeviceptr __pyx_v_dptr) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemGetAddressRange_v2", 1);
  __Pyx_TraceCall("_cuMemGetAddressRange_v2", __pyx_f[0], 4673, 1, __PYX_ERR(0, 4673, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4674
 * 
 * cdef CUresult _cuMemGetAddressRange_v2(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemGetAddressRange_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemGetAddressRange_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4675
 * cdef CUresult _cuMemGetAddressRange_v2(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemGetAddressRange_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemGetAddressRange_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4675, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4676
 *     global __cuMemGetAddressRange_v2
 *     cuPythonInit()
 *     if __cuMemGetAddressRange_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAddressRange_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAddressRange_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4677
 *     cuPythonInit()
 *     if __cuMemGetAddressRange_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemGetAddressRange_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUdeviceptr) nogil> __cuMemGetAddressRange_v2)(pbase, psize, dptr)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4678
 *     if __cuMemGetAddressRange_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAddressRange_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUdeviceptr) nogil> __cuMemGetAddressRange_v2)(pbase, psize, dptr)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__83, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4678, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4678, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4677
 *     cuPythonInit()
 *     if __cuMemGetAddressRange_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemGetAddressRange_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUdeviceptr) nogil> __cuMemGetAddressRange_v2)(pbase, psize, dptr)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4676
 *     global __cuMemGetAddressRange_v2
 *     cuPythonInit()
 *     if __cuMemGetAddressRange_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAddressRange_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4679
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAddressRange_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUdeviceptr) nogil> __cuMemGetAddressRange_v2)(pbase, psize, dptr)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr *, size_t *, CUdeviceptr))__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAddressRange_v2)(__pyx_v_pbase, __pyx_v_psize, __pyx_v_dptr);

    /* "cuda/_cuda/ccuda.pyx":4680
 *             raise RuntimeError('Function "cuMemGetAddressRange_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUdeviceptr) nogil> __cuMemGetAddressRange_v2)(pbase, psize, dptr)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemAllocHost_v2(void** pp, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4674
 * 
 * cdef CUresult _cuMemGetAddressRange_v2(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemGetAddressRange_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemGetAddressRange_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4673
 *     return err
 * 
 * cdef CUresult _cuMemGetAddressRange_v2(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemGetAddressRange_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemGetAddressRange_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4682
 *     return err
 * 
 * cdef CUresult _cuMemAllocHost_v2(void** pp, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemAllocHost_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocHost_v2(void **__pyx_v_pp, size_t __pyx_v_bytesize) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemAllocHost_v2", 1);
  __Pyx_TraceCall("_cuMemAllocHost_v2", __pyx_f[0], 4682, 1, __PYX_ERR(0, 4682, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4683
 * 
 * cdef CUresult _cuMemAllocHost_v2(void** pp, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAllocHost_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemAllocHost_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4684
 * cdef CUresult _cuMemAllocHost_v2(void** pp, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAllocHost_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemAllocHost_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4684, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4685
 *     global __cuMemAllocHost_v2
 *     cuPythonInit()
 *     if __cuMemAllocHost_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocHost_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocHost_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4686
 *     cuPythonInit()
 *     if __cuMemAllocHost_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemAllocHost_v2" not found')
 *     err = (<CUresult (*)(void**, size_t) nogil> __cuMemAllocHost_v2)(pp, bytesize)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4687
 *     if __cuMemAllocHost_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocHost_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void**, size_t) nogil> __cuMemAllocHost_v2)(pp, bytesize)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__84, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4687, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4687, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4686
 *     cuPythonInit()
 *     if __cuMemAllocHost_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemAllocHost_v2" not found')
 *     err = (<CUresult (*)(void**, size_t) nogil> __cuMemAllocHost_v2)(pp, bytesize)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4685
 *     global __cuMemAllocHost_v2
 *     cuPythonInit()
 *     if __cuMemAllocHost_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocHost_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4688
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocHost_v2" not found')
 *     err = (<CUresult (*)(void**, size_t) nogil> __cuMemAllocHost_v2)(pp, bytesize)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(void **, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocHost_v2)(__pyx_v_pp, __pyx_v_bytesize);

    /* "cuda/_cuda/ccuda.pyx":4689
 *             raise RuntimeError('Function "cuMemAllocHost_v2" not found')
 *     err = (<CUresult (*)(void**, size_t) nogil> __cuMemAllocHost_v2)(pp, bytesize)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemFreeHost(void* p) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4683
 * 
 * cdef CUresult _cuMemAllocHost_v2(void** pp, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAllocHost_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemAllocHost_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4682
 *     return err
 * 
 * cdef CUresult _cuMemAllocHost_v2(void** pp, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemAllocHost_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemAllocHost_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4691
 *     return err
 * 
 * cdef CUresult _cuMemFreeHost(void* p) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemFreeHost
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemFreeHost(void *__pyx_v_p) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemFreeHost", 1);
  __Pyx_TraceCall("_cuMemFreeHost", __pyx_f[0], 4691, 1, __PYX_ERR(0, 4691, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4692
 * 
 * cdef CUresult _cuMemFreeHost(void* p) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemFreeHost             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemFreeHost == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4693
 * cdef CUresult _cuMemFreeHost(void* p) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemFreeHost
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemFreeHost == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4693, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4694
 *     global __cuMemFreeHost
 *     cuPythonInit()
 *     if __cuMemFreeHost == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemFreeHost" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemFreeHost == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4695
 *     cuPythonInit()
 *     if __cuMemFreeHost == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemFreeHost" not found')
 *     err = (<CUresult (*)(void*) nogil> __cuMemFreeHost)(p)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4696
 *     if __cuMemFreeHost == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemFreeHost" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*) nogil> __cuMemFreeHost)(p)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__85, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4696, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4696, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4695
 *     cuPythonInit()
 *     if __cuMemFreeHost == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemFreeHost" not found')
 *     err = (<CUresult (*)(void*) nogil> __cuMemFreeHost)(p)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4694
 *     global __cuMemFreeHost
 *     cuPythonInit()
 *     if __cuMemFreeHost == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemFreeHost" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4697
 *         with gil:
 *             raise RuntimeError('Function "cuMemFreeHost" not found')
 *     err = (<CUresult (*)(void*) nogil> __cuMemFreeHost)(p)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(void *))__pyx_v_4cuda_5_cuda_5ccuda___cuMemFreeHost)(__pyx_v_p);

    /* "cuda/_cuda/ccuda.pyx":4698
 *             raise RuntimeError('Function "cuMemFreeHost" not found')
 *     err = (<CUresult (*)(void*) nogil> __cuMemFreeHost)(p)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4692
 * 
 * cdef CUresult _cuMemFreeHost(void* p) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemFreeHost             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemFreeHost == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4691
 *     return err
 * 
 * cdef CUresult _cuMemFreeHost(void* p) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemFreeHost
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemFreeHost", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4700
 *     return err
 * 
 * cdef CUresult _cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemHostAlloc
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemHostAlloc(void **__pyx_v_pp, size_t __pyx_v_bytesize, unsigned int __pyx_v_Flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemHostAlloc", 1);
  __Pyx_TraceCall("_cuMemHostAlloc", __pyx_f[0], 4700, 1, __PYX_ERR(0, 4700, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4701
 * 
 * cdef CUresult _cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemHostAlloc             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemHostAlloc == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4702
 * cdef CUresult _cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemHostAlloc
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemHostAlloc == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4702, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4703
 *     global __cuMemHostAlloc
 *     cuPythonInit()
 *     if __cuMemHostAlloc == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostAlloc" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostAlloc == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4704
 *     cuPythonInit()
 *     if __cuMemHostAlloc == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemHostAlloc" not found')
 *     err = (<CUresult (*)(void**, size_t, unsigned int) nogil> __cuMemHostAlloc)(pp, bytesize, Flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4705
 *     if __cuMemHostAlloc == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostAlloc" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void**, size_t, unsigned int) nogil> __cuMemHostAlloc)(pp, bytesize, Flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__86, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4705, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4705, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4704
 *     cuPythonInit()
 *     if __cuMemHostAlloc == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemHostAlloc" not found')
 *     err = (<CUresult (*)(void**, size_t, unsigned int) nogil> __cuMemHostAlloc)(pp, bytesize, Flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4703
 *     global __cuMemHostAlloc
 *     cuPythonInit()
 *     if __cuMemHostAlloc == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostAlloc" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4706
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostAlloc" not found')
 *     err = (<CUresult (*)(void**, size_t, unsigned int) nogil> __cuMemHostAlloc)(pp, bytesize, Flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(void **, size_t, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostAlloc)(__pyx_v_pp, __pyx_v_bytesize, __pyx_v_Flags);

    /* "cuda/_cuda/ccuda.pyx":4707
 *             raise RuntimeError('Function "cuMemHostAlloc" not found')
 *     err = (<CUresult (*)(void**, size_t, unsigned int) nogil> __cuMemHostAlloc)(pp, bytesize, Flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemHostGetDevicePointer_v2(CUdeviceptr* pdptr, void* p, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4701
 * 
 * cdef CUresult _cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemHostAlloc             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemHostAlloc == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4700
 *     return err
 * 
 * cdef CUresult _cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemHostAlloc
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemHostAlloc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4709
 *     return err
 * 
 * cdef CUresult _cuMemHostGetDevicePointer_v2(CUdeviceptr* pdptr, void* p, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemHostGetDevicePointer_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemHostGetDevicePointer_v2(CUdeviceptr *__pyx_v_pdptr, void *__pyx_v_p, unsigned int __pyx_v_Flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemHostGetDevicePointer_v2", 1);
  __Pyx_TraceCall("_cuMemHostGetDevicePointer_v2", __pyx_f[0], 4709, 1, __PYX_ERR(0, 4709, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4710
 * 
 * cdef CUresult _cuMemHostGetDevicePointer_v2(CUdeviceptr* pdptr, void* p, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemHostGetDevicePointer_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemHostGetDevicePointer_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4711
 * cdef CUresult _cuMemHostGetDevicePointer_v2(CUdeviceptr* pdptr, void* p, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemHostGetDevicePointer_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemHostGetDevicePointer_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4711, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4712
 *     global __cuMemHostGetDevicePointer_v2
 *     cuPythonInit()
 *     if __cuMemHostGetDevicePointer_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostGetDevicePointer_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostGetDevicePointer_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4713
 *     cuPythonInit()
 *     if __cuMemHostGetDevicePointer_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemHostGetDevicePointer_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, void*, unsigned int) nogil> __cuMemHostGetDevicePointer_v2)(pdptr, p, Flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4714
 *     if __cuMemHostGetDevicePointer_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostGetDevicePointer_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, void*, unsigned int) nogil> __cuMemHostGetDevicePointer_v2)(pdptr, p, Flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4714, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4714, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4713
 *     cuPythonInit()
 *     if __cuMemHostGetDevicePointer_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemHostGetDevicePointer_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, void*, unsigned int) nogil> __cuMemHostGetDevicePointer_v2)(pdptr, p, Flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4712
 *     global __cuMemHostGetDevicePointer_v2
 *     cuPythonInit()
 *     if __cuMemHostGetDevicePointer_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostGetDevicePointer_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4715
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostGetDevicePointer_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, void*, unsigned int) nogil> __cuMemHostGetDevicePointer_v2)(pdptr, p, Flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr *, void *, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostGetDevicePointer_v2)(__pyx_v_pdptr, __pyx_v_p, __pyx_v_Flags);

    /* "cuda/_cuda/ccuda.pyx":4716
 *             raise RuntimeError('Function "cuMemHostGetDevicePointer_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, void*, unsigned int) nogil> __cuMemHostGetDevicePointer_v2)(pdptr, p, Flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemHostGetFlags(unsigned int* pFlags, void* p) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4710
 * 
 * cdef CUresult _cuMemHostGetDevicePointer_v2(CUdeviceptr* pdptr, void* p, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemHostGetDevicePointer_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemHostGetDevicePointer_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4709
 *     return err
 * 
 * cdef CUresult _cuMemHostGetDevicePointer_v2(CUdeviceptr* pdptr, void* p, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemHostGetDevicePointer_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemHostGetDevicePointer_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4718
 *     return err
 * 
 * cdef CUresult _cuMemHostGetFlags(unsigned int* pFlags, void* p) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemHostGetFlags
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemHostGetFlags(unsigned int *__pyx_v_pFlags, void *__pyx_v_p) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemHostGetFlags", 1);
  __Pyx_TraceCall("_cuMemHostGetFlags", __pyx_f[0], 4718, 1, __PYX_ERR(0, 4718, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4719
 * 
 * cdef CUresult _cuMemHostGetFlags(unsigned int* pFlags, void* p) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemHostGetFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemHostGetFlags == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4720
 * cdef CUresult _cuMemHostGetFlags(unsigned int* pFlags, void* p) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemHostGetFlags
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemHostGetFlags == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4720, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4721
 *     global __cuMemHostGetFlags
 *     cuPythonInit()
 *     if __cuMemHostGetFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostGetFlags" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostGetFlags == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4722
 *     cuPythonInit()
 *     if __cuMemHostGetFlags == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemHostGetFlags" not found')
 *     err = (<CUresult (*)(unsigned int*, void*) nogil> __cuMemHostGetFlags)(pFlags, p)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4723
 *     if __cuMemHostGetFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostGetFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int*, void*) nogil> __cuMemHostGetFlags)(pFlags, p)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__88, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4723, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4723, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4722
 *     cuPythonInit()
 *     if __cuMemHostGetFlags == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemHostGetFlags" not found')
 *     err = (<CUresult (*)(unsigned int*, void*) nogil> __cuMemHostGetFlags)(pFlags, p)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4721
 *     global __cuMemHostGetFlags
 *     cuPythonInit()
 *     if __cuMemHostGetFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostGetFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4724
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostGetFlags" not found')
 *     err = (<CUresult (*)(unsigned int*, void*) nogil> __cuMemHostGetFlags)(pFlags, p)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(unsigned int *, void *))__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostGetFlags)(__pyx_v_pFlags, __pyx_v_p);

    /* "cuda/_cuda/ccuda.pyx":4725
 *             raise RuntimeError('Function "cuMemHostGetFlags" not found')
 *     err = (<CUresult (*)(unsigned int*, void*) nogil> __cuMemHostGetFlags)(pFlags, p)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4719
 * 
 * cdef CUresult _cuMemHostGetFlags(unsigned int* pFlags, void* p) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemHostGetFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemHostGetFlags == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4718
 *     return err
 * 
 * cdef CUresult _cuMemHostGetFlags(unsigned int* pFlags, void* p) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemHostGetFlags
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemHostGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4727
 *     return err
 * 
 * cdef CUresult _cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemAllocManaged
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocManaged(CUdeviceptr *__pyx_v_dptr, size_t __pyx_v_bytesize, unsigned int __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemAllocManaged", 1);
  __Pyx_TraceCall("_cuMemAllocManaged", __pyx_f[0], 4727, 1, __PYX_ERR(0, 4727, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4728
 * 
 * cdef CUresult _cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAllocManaged             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemAllocManaged == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4729
 * cdef CUresult _cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAllocManaged
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemAllocManaged == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4729, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4730
 *     global __cuMemAllocManaged
 *     cuPythonInit()
 *     if __cuMemAllocManaged == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocManaged" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocManaged == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4731
 *     cuPythonInit()
 *     if __cuMemAllocManaged == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemAllocManaged" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t, unsigned int) nogil> __cuMemAllocManaged)(dptr, bytesize, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4732
 *     if __cuMemAllocManaged == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocManaged" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, size_t, unsigned int) nogil> __cuMemAllocManaged)(dptr, bytesize, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__89, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4732, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4732, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4731
 *     cuPythonInit()
 *     if __cuMemAllocManaged == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemAllocManaged" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t, unsigned int) nogil> __cuMemAllocManaged)(dptr, bytesize, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4730
 *     global __cuMemAllocManaged
 *     cuPythonInit()
 *     if __cuMemAllocManaged == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocManaged" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4733
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocManaged" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t, unsigned int) nogil> __cuMemAllocManaged)(dptr, bytesize, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr *, size_t, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocManaged)(__pyx_v_dptr, __pyx_v_bytesize, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":4734
 *             raise RuntimeError('Function "cuMemAllocManaged" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t, unsigned int) nogil> __cuMemAllocManaged)(dptr, bytesize, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4728
 * 
 * cdef CUresult _cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAllocManaged             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemAllocManaged == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4727
 *     return err
 * 
 * cdef CUresult _cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemAllocManaged
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemAllocManaged", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4736
 *     return err
 * 
 * cdef CUresult _cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetByPCIBusId
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetByPCIBusId(CUdevice *__pyx_v_dev, char const *__pyx_v_pciBusId) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDeviceGetByPCIBusId", 1);
  __Pyx_TraceCall("_cuDeviceGetByPCIBusId", __pyx_f[0], 4736, 1, __PYX_ERR(0, 4736, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4737
 * 
 * cdef CUresult _cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetByPCIBusId             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetByPCIBusId == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4738
 * cdef CUresult _cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetByPCIBusId
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDeviceGetByPCIBusId == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4738, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4739
 *     global __cuDeviceGetByPCIBusId
 *     cuPythonInit()
 *     if __cuDeviceGetByPCIBusId == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetByPCIBusId" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetByPCIBusId == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4740
 *     cuPythonInit()
 *     if __cuDeviceGetByPCIBusId == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetByPCIBusId" not found')
 *     err = (<CUresult (*)(CUdevice*, const char*) nogil> __cuDeviceGetByPCIBusId)(dev, pciBusId)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4741
 *     if __cuDeviceGetByPCIBusId == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetByPCIBusId" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice*, const char*) nogil> __cuDeviceGetByPCIBusId)(dev, pciBusId)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__90, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4741, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4741, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4740
 *     cuPythonInit()
 *     if __cuDeviceGetByPCIBusId == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetByPCIBusId" not found')
 *     err = (<CUresult (*)(CUdevice*, const char*) nogil> __cuDeviceGetByPCIBusId)(dev, pciBusId)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4739
 *     global __cuDeviceGetByPCIBusId
 *     cuPythonInit()
 *     if __cuDeviceGetByPCIBusId == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetByPCIBusId" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4742
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetByPCIBusId" not found')
 *     err = (<CUresult (*)(CUdevice*, const char*) nogil> __cuDeviceGetByPCIBusId)(dev, pciBusId)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdevice *, char const *))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetByPCIBusId)(__pyx_v_dev, __pyx_v_pciBusId);

    /* "cuda/_cuda/ccuda.pyx":4743
 *             raise RuntimeError('Function "cuDeviceGetByPCIBusId" not found')
 *     err = (<CUresult (*)(CUdevice*, const char*) nogil> __cuDeviceGetByPCIBusId)(dev, pciBusId)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceGetPCIBusId(char* pciBusId, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4737
 * 
 * cdef CUresult _cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetByPCIBusId             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetByPCIBusId == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4736
 *     return err
 * 
 * cdef CUresult _cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetByPCIBusId
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDeviceGetByPCIBusId", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4745
 *     return err
 * 
 * cdef CUresult _cuDeviceGetPCIBusId(char* pciBusId, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetPCIBusId
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetPCIBusId(char *__pyx_v_pciBusId, int __pyx_v_length, CUdevice __pyx_v_dev) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDeviceGetPCIBusId", 1);
  __Pyx_TraceCall("_cuDeviceGetPCIBusId", __pyx_f[0], 4745, 1, __PYX_ERR(0, 4745, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4746
 * 
 * cdef CUresult _cuDeviceGetPCIBusId(char* pciBusId, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetPCIBusId             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetPCIBusId == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4747
 * cdef CUresult _cuDeviceGetPCIBusId(char* pciBusId, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetPCIBusId
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDeviceGetPCIBusId == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4747, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4748
 *     global __cuDeviceGetPCIBusId
 *     cuPythonInit()
 *     if __cuDeviceGetPCIBusId == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetPCIBusId" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetPCIBusId == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4749
 *     cuPythonInit()
 *     if __cuDeviceGetPCIBusId == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetPCIBusId" not found')
 *     err = (<CUresult (*)(char*, int, CUdevice) nogil> __cuDeviceGetPCIBusId)(pciBusId, length, dev)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4750
 *     if __cuDeviceGetPCIBusId == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetPCIBusId" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(char*, int, CUdevice) nogil> __cuDeviceGetPCIBusId)(pciBusId, length, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__91, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4750, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4750, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4749
 *     cuPythonInit()
 *     if __cuDeviceGetPCIBusId == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetPCIBusId" not found')
 *     err = (<CUresult (*)(char*, int, CUdevice) nogil> __cuDeviceGetPCIBusId)(pciBusId, length, dev)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4748
 *     global __cuDeviceGetPCIBusId
 *     cuPythonInit()
 *     if __cuDeviceGetPCIBusId == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetPCIBusId" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4751
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetPCIBusId" not found')
 *     err = (<CUresult (*)(char*, int, CUdevice) nogil> __cuDeviceGetPCIBusId)(pciBusId, length, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(char *, int, CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetPCIBusId)(__pyx_v_pciBusId, __pyx_v_length, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":4752
 *             raise RuntimeError('Function "cuDeviceGetPCIBusId" not found')
 *     err = (<CUresult (*)(char*, int, CUdevice) nogil> __cuDeviceGetPCIBusId)(pciBusId, length, dev)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4746
 * 
 * cdef CUresult _cuDeviceGetPCIBusId(char* pciBusId, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetPCIBusId             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetPCIBusId == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4745
 *     return err
 * 
 * cdef CUresult _cuDeviceGetPCIBusId(char* pciBusId, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetPCIBusId
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDeviceGetPCIBusId", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4754
 *     return err
 * 
 * cdef CUresult _cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuIpcGetEventHandle
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuIpcGetEventHandle(CUipcEventHandle *__pyx_v_pHandle, CUevent __pyx_v_event) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuIpcGetEventHandle", 1);
  __Pyx_TraceCall("_cuIpcGetEventHandle", __pyx_f[0], 4754, 1, __PYX_ERR(0, 4754, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4755
 * 
 * cdef CUresult _cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuIpcGetEventHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuIpcGetEventHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4756
 * cdef CUresult _cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuIpcGetEventHandle
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuIpcGetEventHandle == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4756, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4757
 *     global __cuIpcGetEventHandle
 *     cuPythonInit()
 *     if __cuIpcGetEventHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuIpcGetEventHandle" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuIpcGetEventHandle == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4758
 *     cuPythonInit()
 *     if __cuIpcGetEventHandle == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuIpcGetEventHandle" not found')
 *     err = (<CUresult (*)(CUipcEventHandle*, CUevent) nogil> __cuIpcGetEventHandle)(pHandle, event)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4759
 *     if __cuIpcGetEventHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuIpcGetEventHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUipcEventHandle*, CUevent) nogil> __cuIpcGetEventHandle)(pHandle, event)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__92, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4759, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4759, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4758
 *     cuPythonInit()
 *     if __cuIpcGetEventHandle == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuIpcGetEventHandle" not found')
 *     err = (<CUresult (*)(CUipcEventHandle*, CUevent) nogil> __cuIpcGetEventHandle)(pHandle, event)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4757
 *     global __cuIpcGetEventHandle
 *     cuPythonInit()
 *     if __cuIpcGetEventHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuIpcGetEventHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4760
 *         with gil:
 *             raise RuntimeError('Function "cuIpcGetEventHandle" not found')
 *     err = (<CUresult (*)(CUipcEventHandle*, CUevent) nogil> __cuIpcGetEventHandle)(pHandle, event)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUipcEventHandle *, CUevent))__pyx_v_4cuda_5_cuda_5ccuda___cuIpcGetEventHandle)(__pyx_v_pHandle, __pyx_v_event);

    /* "cuda/_cuda/ccuda.pyx":4761
 *             raise RuntimeError('Function "cuIpcGetEventHandle" not found')
 *     err = (<CUresult (*)(CUipcEventHandle*, CUevent) nogil> __cuIpcGetEventHandle)(pHandle, event)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4755
 * 
 * cdef CUresult _cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuIpcGetEventHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuIpcGetEventHandle == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4754
 *     return err
 * 
 * cdef CUresult _cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuIpcGetEventHandle
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuIpcGetEventHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4763
 *     return err
 * 
 * cdef CUresult _cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuIpcOpenEventHandle
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuIpcOpenEventHandle(CUevent *__pyx_v_phEvent, CUipcEventHandle __pyx_v_handle) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuIpcOpenEventHandle", 1);
  __Pyx_TraceCall("_cuIpcOpenEventHandle", __pyx_f[0], 4763, 1, __PYX_ERR(0, 4763, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4764
 * 
 * cdef CUresult _cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuIpcOpenEventHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuIpcOpenEventHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4765
 * cdef CUresult _cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuIpcOpenEventHandle
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuIpcOpenEventHandle == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4765, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4766
 *     global __cuIpcOpenEventHandle
 *     cuPythonInit()
 *     if __cuIpcOpenEventHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuIpcOpenEventHandle" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuIpcOpenEventHandle == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4767
 *     cuPythonInit()
 *     if __cuIpcOpenEventHandle == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuIpcOpenEventHandle" not found')
 *     err = (<CUresult (*)(CUevent*, CUipcEventHandle) nogil> __cuIpcOpenEventHandle)(phEvent, handle)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4768
 *     if __cuIpcOpenEventHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuIpcOpenEventHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent*, CUipcEventHandle) nogil> __cuIpcOpenEventHandle)(phEvent, handle)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__93, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4768, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4768, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4767
 *     cuPythonInit()
 *     if __cuIpcOpenEventHandle == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuIpcOpenEventHandle" not found')
 *     err = (<CUresult (*)(CUevent*, CUipcEventHandle) nogil> __cuIpcOpenEventHandle)(phEvent, handle)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4766
 *     global __cuIpcOpenEventHandle
 *     cuPythonInit()
 *     if __cuIpcOpenEventHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuIpcOpenEventHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4769
 *         with gil:
 *             raise RuntimeError('Function "cuIpcOpenEventHandle" not found')
 *     err = (<CUresult (*)(CUevent*, CUipcEventHandle) nogil> __cuIpcOpenEventHandle)(phEvent, handle)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUevent *, CUipcEventHandle))__pyx_v_4cuda_5_cuda_5ccuda___cuIpcOpenEventHandle)(__pyx_v_phEvent, __pyx_v_handle);

    /* "cuda/_cuda/ccuda.pyx":4770
 *             raise RuntimeError('Function "cuIpcOpenEventHandle" not found')
 *     err = (<CUresult (*)(CUevent*, CUipcEventHandle) nogil> __cuIpcOpenEventHandle)(phEvent, handle)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4764
 * 
 * cdef CUresult _cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuIpcOpenEventHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuIpcOpenEventHandle == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4763
 *     return err
 * 
 * cdef CUresult _cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuIpcOpenEventHandle
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuIpcOpenEventHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4772
 *     return err
 * 
 * cdef CUresult _cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuIpcGetMemHandle
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuIpcGetMemHandle(CUipcMemHandle *__pyx_v_pHandle, CUdeviceptr __pyx_v_dptr) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuIpcGetMemHandle", 1);
  __Pyx_TraceCall("_cuIpcGetMemHandle", __pyx_f[0], 4772, 1, __PYX_ERR(0, 4772, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4773
 * 
 * cdef CUresult _cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuIpcGetMemHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuIpcGetMemHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4774
 * cdef CUresult _cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuIpcGetMemHandle
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuIpcGetMemHandle == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4774, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4775
 *     global __cuIpcGetMemHandle
 *     cuPythonInit()
 *     if __cuIpcGetMemHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuIpcGetMemHandle" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuIpcGetMemHandle == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4776
 *     cuPythonInit()
 *     if __cuIpcGetMemHandle == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuIpcGetMemHandle" not found')
 *     err = (<CUresult (*)(CUipcMemHandle*, CUdeviceptr) nogil> __cuIpcGetMemHandle)(pHandle, dptr)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4777
 *     if __cuIpcGetMemHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuIpcGetMemHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUipcMemHandle*, CUdeviceptr) nogil> __cuIpcGetMemHandle)(pHandle, dptr)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__94, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4777, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4777, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4776
 *     cuPythonInit()
 *     if __cuIpcGetMemHandle == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuIpcGetMemHandle" not found')
 *     err = (<CUresult (*)(CUipcMemHandle*, CUdeviceptr) nogil> __cuIpcGetMemHandle)(pHandle, dptr)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4775
 *     global __cuIpcGetMemHandle
 *     cuPythonInit()
 *     if __cuIpcGetMemHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuIpcGetMemHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4778
 *         with gil:
 *             raise RuntimeError('Function "cuIpcGetMemHandle" not found')
 *     err = (<CUresult (*)(CUipcMemHandle*, CUdeviceptr) nogil> __cuIpcGetMemHandle)(pHandle, dptr)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUipcMemHandle *, CUdeviceptr))__pyx_v_4cuda_5_cuda_5ccuda___cuIpcGetMemHandle)(__pyx_v_pHandle, __pyx_v_dptr);

    /* "cuda/_cuda/ccuda.pyx":4779
 *             raise RuntimeError('Function "cuIpcGetMemHandle" not found')
 *     err = (<CUresult (*)(CUipcMemHandle*, CUdeviceptr) nogil> __cuIpcGetMemHandle)(pHandle, dptr)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuIpcOpenMemHandle_v2(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4773
 * 
 * cdef CUresult _cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuIpcGetMemHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuIpcGetMemHandle == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4772
 *     return err
 * 
 * cdef CUresult _cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuIpcGetMemHandle
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuIpcGetMemHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4781
 *     return err
 * 
 * cdef CUresult _cuIpcOpenMemHandle_v2(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuIpcOpenMemHandle_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuIpcOpenMemHandle_v2(CUdeviceptr *__pyx_v_pdptr, CUipcMemHandle __pyx_v_handle, unsigned int __pyx_v_Flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuIpcOpenMemHandle_v2", 1);
  __Pyx_TraceCall("_cuIpcOpenMemHandle_v2", __pyx_f[0], 4781, 1, __PYX_ERR(0, 4781, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4782
 * 
 * cdef CUresult _cuIpcOpenMemHandle_v2(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuIpcOpenMemHandle_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuIpcOpenMemHandle_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4783
 * cdef CUresult _cuIpcOpenMemHandle_v2(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuIpcOpenMemHandle_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuIpcOpenMemHandle_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4783, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4784
 *     global __cuIpcOpenMemHandle_v2
 *     cuPythonInit()
 *     if __cuIpcOpenMemHandle_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuIpcOpenMemHandle_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuIpcOpenMemHandle_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4785
 *     cuPythonInit()
 *     if __cuIpcOpenMemHandle_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuIpcOpenMemHandle_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, CUipcMemHandle, unsigned int) nogil> __cuIpcOpenMemHandle_v2)(pdptr, handle, Flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4786
 *     if __cuIpcOpenMemHandle_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuIpcOpenMemHandle_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, CUipcMemHandle, unsigned int) nogil> __cuIpcOpenMemHandle_v2)(pdptr, handle, Flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__95, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4786, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4786, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4785
 *     cuPythonInit()
 *     if __cuIpcOpenMemHandle_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuIpcOpenMemHandle_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, CUipcMemHandle, unsigned int) nogil> __cuIpcOpenMemHandle_v2)(pdptr, handle, Flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4784
 *     global __cuIpcOpenMemHandle_v2
 *     cuPythonInit()
 *     if __cuIpcOpenMemHandle_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuIpcOpenMemHandle_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4787
 *         with gil:
 *             raise RuntimeError('Function "cuIpcOpenMemHandle_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, CUipcMemHandle, unsigned int) nogil> __cuIpcOpenMemHandle_v2)(pdptr, handle, Flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr *, CUipcMemHandle, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuIpcOpenMemHandle_v2)(__pyx_v_pdptr, __pyx_v_handle, __pyx_v_Flags);

    /* "cuda/_cuda/ccuda.pyx":4788
 *             raise RuntimeError('Function "cuIpcOpenMemHandle_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, CUipcMemHandle, unsigned int) nogil> __cuIpcOpenMemHandle_v2)(pdptr, handle, Flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuIpcCloseMemHandle(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4782
 * 
 * cdef CUresult _cuIpcOpenMemHandle_v2(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuIpcOpenMemHandle_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuIpcOpenMemHandle_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4781
 *     return err
 * 
 * cdef CUresult _cuIpcOpenMemHandle_v2(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuIpcOpenMemHandle_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuIpcOpenMemHandle_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4790
 *     return err
 * 
 * cdef CUresult _cuIpcCloseMemHandle(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuIpcCloseMemHandle
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuIpcCloseMemHandle(CUdeviceptr __pyx_v_dptr) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuIpcCloseMemHandle", 1);
  __Pyx_TraceCall("_cuIpcCloseMemHandle", __pyx_f[0], 4790, 1, __PYX_ERR(0, 4790, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4791
 * 
 * cdef CUresult _cuIpcCloseMemHandle(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuIpcCloseMemHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuIpcCloseMemHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4792
 * cdef CUresult _cuIpcCloseMemHandle(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuIpcCloseMemHandle
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuIpcCloseMemHandle == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4792, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4793
 *     global __cuIpcCloseMemHandle
 *     cuPythonInit()
 *     if __cuIpcCloseMemHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuIpcCloseMemHandle" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuIpcCloseMemHandle == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4794
 *     cuPythonInit()
 *     if __cuIpcCloseMemHandle == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuIpcCloseMemHandle" not found')
 *     err = (<CUresult (*)(CUdeviceptr) nogil> __cuIpcCloseMemHandle)(dptr)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4795
 *     if __cuIpcCloseMemHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuIpcCloseMemHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr) nogil> __cuIpcCloseMemHandle)(dptr)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__96, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4795, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4795, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4794
 *     cuPythonInit()
 *     if __cuIpcCloseMemHandle == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuIpcCloseMemHandle" not found')
 *     err = (<CUresult (*)(CUdeviceptr) nogil> __cuIpcCloseMemHandle)(dptr)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4793
 *     global __cuIpcCloseMemHandle
 *     cuPythonInit()
 *     if __cuIpcCloseMemHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuIpcCloseMemHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4796
 *         with gil:
 *             raise RuntimeError('Function "cuIpcCloseMemHandle" not found')
 *     err = (<CUresult (*)(CUdeviceptr) nogil> __cuIpcCloseMemHandle)(dptr)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr))__pyx_v_4cuda_5_cuda_5ccuda___cuIpcCloseMemHandle)(__pyx_v_dptr);

    /* "cuda/_cuda/ccuda.pyx":4797
 *             raise RuntimeError('Function "cuIpcCloseMemHandle" not found')
 *     err = (<CUresult (*)(CUdeviceptr) nogil> __cuIpcCloseMemHandle)(dptr)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemHostRegister_v2(void* p, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4791
 * 
 * cdef CUresult _cuIpcCloseMemHandle(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuIpcCloseMemHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuIpcCloseMemHandle == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4790
 *     return err
 * 
 * cdef CUresult _cuIpcCloseMemHandle(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuIpcCloseMemHandle
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuIpcCloseMemHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4799
 *     return err
 * 
 * cdef CUresult _cuMemHostRegister_v2(void* p, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemHostRegister_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemHostRegister_v2(void *__pyx_v_p, size_t __pyx_v_bytesize, unsigned int __pyx_v_Flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemHostRegister_v2", 1);
  __Pyx_TraceCall("_cuMemHostRegister_v2", __pyx_f[0], 4799, 1, __PYX_ERR(0, 4799, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4800
 * 
 * cdef CUresult _cuMemHostRegister_v2(void* p, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemHostRegister_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemHostRegister_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4801
 * cdef CUresult _cuMemHostRegister_v2(void* p, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemHostRegister_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemHostRegister_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4801, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4802
 *     global __cuMemHostRegister_v2
 *     cuPythonInit()
 *     if __cuMemHostRegister_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostRegister_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostRegister_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4803
 *     cuPythonInit()
 *     if __cuMemHostRegister_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemHostRegister_v2" not found')
 *     err = (<CUresult (*)(void*, size_t, unsigned int) nogil> __cuMemHostRegister_v2)(p, bytesize, Flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4804
 *     if __cuMemHostRegister_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostRegister_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*, size_t, unsigned int) nogil> __cuMemHostRegister_v2)(p, bytesize, Flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4804, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4804, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4803
 *     cuPythonInit()
 *     if __cuMemHostRegister_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemHostRegister_v2" not found')
 *     err = (<CUresult (*)(void*, size_t, unsigned int) nogil> __cuMemHostRegister_v2)(p, bytesize, Flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4802
 *     global __cuMemHostRegister_v2
 *     cuPythonInit()
 *     if __cuMemHostRegister_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostRegister_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4805
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostRegister_v2" not found')
 *     err = (<CUresult (*)(void*, size_t, unsigned int) nogil> __cuMemHostRegister_v2)(p, bytesize, Flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(void *, size_t, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostRegister_v2)(__pyx_v_p, __pyx_v_bytesize, __pyx_v_Flags);

    /* "cuda/_cuda/ccuda.pyx":4806
 *             raise RuntimeError('Function "cuMemHostRegister_v2" not found')
 *     err = (<CUresult (*)(void*, size_t, unsigned int) nogil> __cuMemHostRegister_v2)(p, bytesize, Flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemHostUnregister(void* p) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4800
 * 
 * cdef CUresult _cuMemHostRegister_v2(void* p, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemHostRegister_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemHostRegister_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4799
 *     return err
 * 
 * cdef CUresult _cuMemHostRegister_v2(void* p, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemHostRegister_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemHostRegister_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4808
 *     return err
 * 
 * cdef CUresult _cuMemHostUnregister(void* p) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemHostUnregister
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemHostUnregister(void *__pyx_v_p) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemHostUnregister", 1);
  __Pyx_TraceCall("_cuMemHostUnregister", __pyx_f[0], 4808, 1, __PYX_ERR(0, 4808, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4809
 * 
 * cdef CUresult _cuMemHostUnregister(void* p) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemHostUnregister             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemHostUnregister == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4810
 * cdef CUresult _cuMemHostUnregister(void* p) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemHostUnregister
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemHostUnregister == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4810, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4811
 *     global __cuMemHostUnregister
 *     cuPythonInit()
 *     if __cuMemHostUnregister == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostUnregister" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostUnregister == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4812
 *     cuPythonInit()
 *     if __cuMemHostUnregister == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemHostUnregister" not found')
 *     err = (<CUresult (*)(void*) nogil> __cuMemHostUnregister)(p)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4813
 *     if __cuMemHostUnregister == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostUnregister" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*) nogil> __cuMemHostUnregister)(p)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__98, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4813, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4813, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4812
 *     cuPythonInit()
 *     if __cuMemHostUnregister == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemHostUnregister" not found')
 *     err = (<CUresult (*)(void*) nogil> __cuMemHostUnregister)(p)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4811
 *     global __cuMemHostUnregister
 *     cuPythonInit()
 *     if __cuMemHostUnregister == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostUnregister" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4814
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostUnregister" not found')
 *     err = (<CUresult (*)(void*) nogil> __cuMemHostUnregister)(p)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(void *))__pyx_v_4cuda_5_cuda_5ccuda___cuMemHostUnregister)(__pyx_v_p);

    /* "cuda/_cuda/ccuda.pyx":4815
 *             raise RuntimeError('Function "cuMemHostUnregister" not found')
 *     err = (<CUresult (*)(void*) nogil> __cuMemHostUnregister)(p)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4809
 * 
 * cdef CUresult _cuMemHostUnregister(void* p) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemHostUnregister             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemHostUnregister == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4808
 *     return err
 * 
 * cdef CUresult _cuMemHostUnregister(void* p) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemHostUnregister
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemHostUnregister", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4817
 *     return err
 * 
 * cdef CUresult _cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpy
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy(CUdeviceptr __pyx_v_dst, CUdeviceptr __pyx_v_src, size_t __pyx_v_ByteCount) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemcpy", 1);
  __Pyx_TraceCall("_cuMemcpy", __pyx_f[0], 4817, 1, __PYX_ERR(0, 4817, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4818
 * 
 * cdef CUresult _cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4819
 * cdef CUresult _cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpy
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemcpy == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4819, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4820
 *     global __cuMemcpy
 *     cuPythonInit()
 *     if __cuMemcpy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4821
 *     cuPythonInit()
 *     if __cuMemcpy == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpy" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUdeviceptr, size_t) nogil> __cuMemcpy)(dst, src, ByteCount)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4822
 *     if __cuMemcpy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, CUdeviceptr, size_t) nogil> __cuMemcpy)(dst, src, ByteCount)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__99, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4822, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4822, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4821
 *     cuPythonInit()
 *     if __cuMemcpy == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpy" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUdeviceptr, size_t) nogil> __cuMemcpy)(dst, src, ByteCount)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4820
 *     global __cuMemcpy
 *     cuPythonInit()
 *     if __cuMemcpy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4823
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUdeviceptr, size_t) nogil> __cuMemcpy)(dst, src, ByteCount)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, CUdeviceptr, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy)(__pyx_v_dst, __pyx_v_src, __pyx_v_ByteCount);

    /* "cuda/_cuda/ccuda.pyx":4824
 *             raise RuntimeError('Function "cuMemcpy" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUdeviceptr, size_t) nogil> __cuMemcpy)(dst, src, ByteCount)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4818
 * 
 * cdef CUresult _cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpy == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4817
 *     return err
 * 
 * cdef CUresult _cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpy
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemcpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4826
 *     return err
 * 
 * cdef CUresult _cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyPeer
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyPeer(CUdeviceptr __pyx_v_dstDevice, CUcontext __pyx_v_dstContext, CUdeviceptr __pyx_v_srcDevice, CUcontext __pyx_v_srcContext, size_t __pyx_v_ByteCount) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemcpyPeer", 1);
  __Pyx_TraceCall("_cuMemcpyPeer", __pyx_f[0], 4826, 1, __PYX_ERR(0, 4826, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4827
 * 
 * cdef CUresult _cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyPeer             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyPeer == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4828
 * cdef CUresult _cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyPeer
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemcpyPeer == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4828, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4829
 *     global __cuMemcpyPeer
 *     cuPythonInit()
 *     if __cuMemcpyPeer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyPeer" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyPeer == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4830
 *     cuPythonInit()
 *     if __cuMemcpyPeer == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyPeer" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t) nogil> __cuMemcpyPeer)(dstDevice, dstContext, srcDevice, srcContext, ByteCount)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4831
 *     if __cuMemcpyPeer == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyPeer" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t) nogil> __cuMemcpyPeer)(dstDevice, dstContext, srcDevice, srcContext, ByteCount)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__100, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4831, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4831, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4830
 *     cuPythonInit()
 *     if __cuMemcpyPeer == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyPeer" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t) nogil> __cuMemcpyPeer)(dstDevice, dstContext, srcDevice, srcContext, ByteCount)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4829
 *     global __cuMemcpyPeer
 *     cuPythonInit()
 *     if __cuMemcpyPeer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyPeer" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4832
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyPeer" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t) nogil> __cuMemcpyPeer)(dstDevice, dstContext, srcDevice, srcContext, ByteCount)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyPeer)(__pyx_v_dstDevice, __pyx_v_dstContext, __pyx_v_srcDevice, __pyx_v_srcContext, __pyx_v_ByteCount);

    /* "cuda/_cuda/ccuda.pyx":4833
 *             raise RuntimeError('Function "cuMemcpyPeer" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t) nogil> __cuMemcpyPeer)(dstDevice, dstContext, srcDevice, srcContext, ByteCount)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemcpyHtoD_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4827
 * 
 * cdef CUresult _cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyPeer             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyPeer == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4826
 *     return err
 * 
 * cdef CUresult _cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyPeer
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemcpyPeer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4835
 *     return err
 * 
 * cdef CUresult _cuMemcpyHtoD_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyHtoD_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoD_v2(CUdeviceptr __pyx_v_dstDevice, void const *__pyx_v_srcHost, size_t __pyx_v_ByteCount) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemcpyHtoD_v2", 1);
  __Pyx_TraceCall("_cuMemcpyHtoD_v2", __pyx_f[0], 4835, 1, __PYX_ERR(0, 4835, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4836
 * 
 * cdef CUresult _cuMemcpyHtoD_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyHtoD_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyHtoD_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4837
 * cdef CUresult _cuMemcpyHtoD_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyHtoD_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemcpyHtoD_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4837, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4838
 *     global __cuMemcpyHtoD_v2
 *     cuPythonInit()
 *     if __cuMemcpyHtoD_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyHtoD_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoD_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4839
 *     cuPythonInit()
 *     if __cuMemcpyHtoD_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyHtoD_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, const void*, size_t) nogil> __cuMemcpyHtoD_v2)(dstDevice, srcHost, ByteCount)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4840
 *     if __cuMemcpyHtoD_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyHtoD_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, const void*, size_t) nogil> __cuMemcpyHtoD_v2)(dstDevice, srcHost, ByteCount)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__101, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4840, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4840, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4839
 *     cuPythonInit()
 *     if __cuMemcpyHtoD_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyHtoD_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, const void*, size_t) nogil> __cuMemcpyHtoD_v2)(dstDevice, srcHost, ByteCount)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4838
 *     global __cuMemcpyHtoD_v2
 *     cuPythonInit()
 *     if __cuMemcpyHtoD_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyHtoD_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4841
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyHtoD_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, const void*, size_t) nogil> __cuMemcpyHtoD_v2)(dstDevice, srcHost, ByteCount)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, void const *, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoD_v2)(__pyx_v_dstDevice, __pyx_v_srcHost, __pyx_v_ByteCount);

    /* "cuda/_cuda/ccuda.pyx":4842
 *             raise RuntimeError('Function "cuMemcpyHtoD_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, const void*, size_t) nogil> __cuMemcpyHtoD_v2)(dstDevice, srcHost, ByteCount)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemcpyDtoH_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4836
 * 
 * cdef CUresult _cuMemcpyHtoD_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyHtoD_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyHtoD_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4835
 *     return err
 * 
 * cdef CUresult _cuMemcpyHtoD_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyHtoD_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemcpyHtoD_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4844
 *     return err
 * 
 * cdef CUresult _cuMemcpyDtoH_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyDtoH_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoH_v2(void *__pyx_v_dstHost, CUdeviceptr __pyx_v_srcDevice, size_t __pyx_v_ByteCount) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemcpyDtoH_v2", 1);
  __Pyx_TraceCall("_cuMemcpyDtoH_v2", __pyx_f[0], 4844, 1, __PYX_ERR(0, 4844, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4845
 * 
 * cdef CUresult _cuMemcpyDtoH_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyDtoH_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyDtoH_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4846
 * cdef CUresult _cuMemcpyDtoH_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyDtoH_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemcpyDtoH_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4846, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4847
 *     global __cuMemcpyDtoH_v2
 *     cuPythonInit()
 *     if __cuMemcpyDtoH_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoH_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoH_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4848
 *     cuPythonInit()
 *     if __cuMemcpyDtoH_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyDtoH_v2" not found')
 *     err = (<CUresult (*)(void*, CUdeviceptr, size_t) nogil> __cuMemcpyDtoH_v2)(dstHost, srcDevice, ByteCount)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4849
 *     if __cuMemcpyDtoH_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoH_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*, CUdeviceptr, size_t) nogil> __cuMemcpyDtoH_v2)(dstHost, srcDevice, ByteCount)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__102, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4849, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4849, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4848
 *     cuPythonInit()
 *     if __cuMemcpyDtoH_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyDtoH_v2" not found')
 *     err = (<CUresult (*)(void*, CUdeviceptr, size_t) nogil> __cuMemcpyDtoH_v2)(dstHost, srcDevice, ByteCount)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4847
 *     global __cuMemcpyDtoH_v2
 *     cuPythonInit()
 *     if __cuMemcpyDtoH_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoH_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4850
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoH_v2" not found')
 *     err = (<CUresult (*)(void*, CUdeviceptr, size_t) nogil> __cuMemcpyDtoH_v2)(dstHost, srcDevice, ByteCount)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(void *, CUdeviceptr, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoH_v2)(__pyx_v_dstHost, __pyx_v_srcDevice, __pyx_v_ByteCount);

    /* "cuda/_cuda/ccuda.pyx":4851
 *             raise RuntimeError('Function "cuMemcpyDtoH_v2" not found')
 *     err = (<CUresult (*)(void*, CUdeviceptr, size_t) nogil> __cuMemcpyDtoH_v2)(dstHost, srcDevice, ByteCount)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemcpyDtoD_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4845
 * 
 * cdef CUresult _cuMemcpyDtoH_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyDtoH_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyDtoH_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4844
 *     return err
 * 
 * cdef CUresult _cuMemcpyDtoH_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyDtoH_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemcpyDtoH_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4853
 *     return err
 * 
 * cdef CUresult _cuMemcpyDtoD_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyDtoD_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoD_v2(CUdeviceptr __pyx_v_dstDevice, CUdeviceptr __pyx_v_srcDevice, size_t __pyx_v_ByteCount) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemcpyDtoD_v2", 1);
  __Pyx_TraceCall("_cuMemcpyDtoD_v2", __pyx_f[0], 4853, 1, __PYX_ERR(0, 4853, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4854
 * 
 * cdef CUresult _cuMemcpyDtoD_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyDtoD_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyDtoD_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4855
 * cdef CUresult _cuMemcpyDtoD_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyDtoD_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemcpyDtoD_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4855, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4856
 *     global __cuMemcpyDtoD_v2
 *     cuPythonInit()
 *     if __cuMemcpyDtoD_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoD_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoD_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4857
 *     cuPythonInit()
 *     if __cuMemcpyDtoD_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyDtoD_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUdeviceptr, size_t) nogil> __cuMemcpyDtoD_v2)(dstDevice, srcDevice, ByteCount)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4858
 *     if __cuMemcpyDtoD_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoD_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, CUdeviceptr, size_t) nogil> __cuMemcpyDtoD_v2)(dstDevice, srcDevice, ByteCount)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__103, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4858, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4858, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4857
 *     cuPythonInit()
 *     if __cuMemcpyDtoD_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyDtoD_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUdeviceptr, size_t) nogil> __cuMemcpyDtoD_v2)(dstDevice, srcDevice, ByteCount)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4856
 *     global __cuMemcpyDtoD_v2
 *     cuPythonInit()
 *     if __cuMemcpyDtoD_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoD_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4859
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoD_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUdeviceptr, size_t) nogil> __cuMemcpyDtoD_v2)(dstDevice, srcDevice, ByteCount)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, CUdeviceptr, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoD_v2)(__pyx_v_dstDevice, __pyx_v_srcDevice, __pyx_v_ByteCount);

    /* "cuda/_cuda/ccuda.pyx":4860
 *             raise RuntimeError('Function "cuMemcpyDtoD_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUdeviceptr, size_t) nogil> __cuMemcpyDtoD_v2)(dstDevice, srcDevice, ByteCount)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemcpyDtoA_v2(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4854
 * 
 * cdef CUresult _cuMemcpyDtoD_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyDtoD_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyDtoD_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4853
 *     return err
 * 
 * cdef CUresult _cuMemcpyDtoD_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyDtoD_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemcpyDtoD_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4862
 *     return err
 * 
 * cdef CUresult _cuMemcpyDtoA_v2(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyDtoA_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoA_v2(CUarray __pyx_v_dstArray, size_t __pyx_v_dstOffset, CUdeviceptr __pyx_v_srcDevice, size_t __pyx_v_ByteCount) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemcpyDtoA_v2", 1);
  __Pyx_TraceCall("_cuMemcpyDtoA_v2", __pyx_f[0], 4862, 1, __PYX_ERR(0, 4862, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4863
 * 
 * cdef CUresult _cuMemcpyDtoA_v2(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyDtoA_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyDtoA_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4864
 * cdef CUresult _cuMemcpyDtoA_v2(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyDtoA_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemcpyDtoA_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4864, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4865
 *     global __cuMemcpyDtoA_v2
 *     cuPythonInit()
 *     if __cuMemcpyDtoA_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoA_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoA_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4866
 *     cuPythonInit()
 *     if __cuMemcpyDtoA_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyDtoA_v2" not found')
 *     err = (<CUresult (*)(CUarray, size_t, CUdeviceptr, size_t) nogil> __cuMemcpyDtoA_v2)(dstArray, dstOffset, srcDevice, ByteCount)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4867
 *     if __cuMemcpyDtoA_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoA_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray, size_t, CUdeviceptr, size_t) nogil> __cuMemcpyDtoA_v2)(dstArray, dstOffset, srcDevice, ByteCount)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__104, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4867, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4867, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4866
 *     cuPythonInit()
 *     if __cuMemcpyDtoA_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyDtoA_v2" not found')
 *     err = (<CUresult (*)(CUarray, size_t, CUdeviceptr, size_t) nogil> __cuMemcpyDtoA_v2)(dstArray, dstOffset, srcDevice, ByteCount)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4865
 *     global __cuMemcpyDtoA_v2
 *     cuPythonInit()
 *     if __cuMemcpyDtoA_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoA_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4868
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoA_v2" not found')
 *     err = (<CUresult (*)(CUarray, size_t, CUdeviceptr, size_t) nogil> __cuMemcpyDtoA_v2)(dstArray, dstOffset, srcDevice, ByteCount)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUarray, size_t, CUdeviceptr, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoA_v2)(__pyx_v_dstArray, __pyx_v_dstOffset, __pyx_v_srcDevice, __pyx_v_ByteCount);

    /* "cuda/_cuda/ccuda.pyx":4869
 *             raise RuntimeError('Function "cuMemcpyDtoA_v2" not found')
 *     err = (<CUresult (*)(CUarray, size_t, CUdeviceptr, size_t) nogil> __cuMemcpyDtoA_v2)(dstArray, dstOffset, srcDevice, ByteCount)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemcpyAtoD_v2(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4863
 * 
 * cdef CUresult _cuMemcpyDtoA_v2(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyDtoA_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyDtoA_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4862
 *     return err
 * 
 * cdef CUresult _cuMemcpyDtoA_v2(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyDtoA_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemcpyDtoA_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4871
 *     return err
 * 
 * cdef CUresult _cuMemcpyAtoD_v2(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyAtoD_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAtoD_v2(CUdeviceptr __pyx_v_dstDevice, CUarray __pyx_v_srcArray, size_t __pyx_v_srcOffset, size_t __pyx_v_ByteCount) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemcpyAtoD_v2", 1);
  __Pyx_TraceCall("_cuMemcpyAtoD_v2", __pyx_f[0], 4871, 1, __PYX_ERR(0, 4871, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4872
 * 
 * cdef CUresult _cuMemcpyAtoD_v2(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyAtoD_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyAtoD_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4873
 * cdef CUresult _cuMemcpyAtoD_v2(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyAtoD_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemcpyAtoD_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4873, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4874
 *     global __cuMemcpyAtoD_v2
 *     cuPythonInit()
 *     if __cuMemcpyAtoD_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAtoD_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoD_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4875
 *     cuPythonInit()
 *     if __cuMemcpyAtoD_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyAtoD_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUarray, size_t, size_t) nogil> __cuMemcpyAtoD_v2)(dstDevice, srcArray, srcOffset, ByteCount)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4876
 *     if __cuMemcpyAtoD_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAtoD_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, CUarray, size_t, size_t) nogil> __cuMemcpyAtoD_v2)(dstDevice, srcArray, srcOffset, ByteCount)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__105, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4876, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4876, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4875
 *     cuPythonInit()
 *     if __cuMemcpyAtoD_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyAtoD_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUarray, size_t, size_t) nogil> __cuMemcpyAtoD_v2)(dstDevice, srcArray, srcOffset, ByteCount)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4874
 *     global __cuMemcpyAtoD_v2
 *     cuPythonInit()
 *     if __cuMemcpyAtoD_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAtoD_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4877
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAtoD_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUarray, size_t, size_t) nogil> __cuMemcpyAtoD_v2)(dstDevice, srcArray, srcOffset, ByteCount)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, CUarray, size_t, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoD_v2)(__pyx_v_dstDevice, __pyx_v_srcArray, __pyx_v_srcOffset, __pyx_v_ByteCount);

    /* "cuda/_cuda/ccuda.pyx":4878
 *             raise RuntimeError('Function "cuMemcpyAtoD_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUarray, size_t, size_t) nogil> __cuMemcpyAtoD_v2)(dstDevice, srcArray, srcOffset, ByteCount)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemcpyHtoA_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4872
 * 
 * cdef CUresult _cuMemcpyAtoD_v2(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyAtoD_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyAtoD_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4871
 *     return err
 * 
 * cdef CUresult _cuMemcpyAtoD_v2(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyAtoD_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemcpyAtoD_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4880
 *     return err
 * 
 * cdef CUresult _cuMemcpyHtoA_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyHtoA_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoA_v2(CUarray __pyx_v_dstArray, size_t __pyx_v_dstOffset, void const *__pyx_v_srcHost, size_t __pyx_v_ByteCount) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemcpyHtoA_v2", 1);
  __Pyx_TraceCall("_cuMemcpyHtoA_v2", __pyx_f[0], 4880, 1, __PYX_ERR(0, 4880, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4881
 * 
 * cdef CUresult _cuMemcpyHtoA_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyHtoA_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyHtoA_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4882
 * cdef CUresult _cuMemcpyHtoA_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyHtoA_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemcpyHtoA_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4882, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4883
 *     global __cuMemcpyHtoA_v2
 *     cuPythonInit()
 *     if __cuMemcpyHtoA_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyHtoA_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoA_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4884
 *     cuPythonInit()
 *     if __cuMemcpyHtoA_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyHtoA_v2" not found')
 *     err = (<CUresult (*)(CUarray, size_t, const void*, size_t) nogil> __cuMemcpyHtoA_v2)(dstArray, dstOffset, srcHost, ByteCount)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4885
 *     if __cuMemcpyHtoA_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyHtoA_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray, size_t, const void*, size_t) nogil> __cuMemcpyHtoA_v2)(dstArray, dstOffset, srcHost, ByteCount)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__106, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4885, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4885, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4884
 *     cuPythonInit()
 *     if __cuMemcpyHtoA_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyHtoA_v2" not found')
 *     err = (<CUresult (*)(CUarray, size_t, const void*, size_t) nogil> __cuMemcpyHtoA_v2)(dstArray, dstOffset, srcHost, ByteCount)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4883
 *     global __cuMemcpyHtoA_v2
 *     cuPythonInit()
 *     if __cuMemcpyHtoA_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyHtoA_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4886
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyHtoA_v2" not found')
 *     err = (<CUresult (*)(CUarray, size_t, const void*, size_t) nogil> __cuMemcpyHtoA_v2)(dstArray, dstOffset, srcHost, ByteCount)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUarray, size_t, void const *, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoA_v2)(__pyx_v_dstArray, __pyx_v_dstOffset, __pyx_v_srcHost, __pyx_v_ByteCount);

    /* "cuda/_cuda/ccuda.pyx":4887
 *             raise RuntimeError('Function "cuMemcpyHtoA_v2" not found')
 *     err = (<CUresult (*)(CUarray, size_t, const void*, size_t) nogil> __cuMemcpyHtoA_v2)(dstArray, dstOffset, srcHost, ByteCount)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemcpyAtoH_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4881
 * 
 * cdef CUresult _cuMemcpyHtoA_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyHtoA_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyHtoA_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4880
 *     return err
 * 
 * cdef CUresult _cuMemcpyHtoA_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyHtoA_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemcpyHtoA_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4889
 *     return err
 * 
 * cdef CUresult _cuMemcpyAtoH_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyAtoH_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAtoH_v2(void *__pyx_v_dstHost, CUarray __pyx_v_srcArray, size_t __pyx_v_srcOffset, size_t __pyx_v_ByteCount) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemcpyAtoH_v2", 1);
  __Pyx_TraceCall("_cuMemcpyAtoH_v2", __pyx_f[0], 4889, 1, __PYX_ERR(0, 4889, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4890
 * 
 * cdef CUresult _cuMemcpyAtoH_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyAtoH_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyAtoH_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4891
 * cdef CUresult _cuMemcpyAtoH_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyAtoH_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemcpyAtoH_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4891, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4892
 *     global __cuMemcpyAtoH_v2
 *     cuPythonInit()
 *     if __cuMemcpyAtoH_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAtoH_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoH_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4893
 *     cuPythonInit()
 *     if __cuMemcpyAtoH_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyAtoH_v2" not found')
 *     err = (<CUresult (*)(void*, CUarray, size_t, size_t) nogil> __cuMemcpyAtoH_v2)(dstHost, srcArray, srcOffset, ByteCount)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4894
 *     if __cuMemcpyAtoH_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAtoH_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*, CUarray, size_t, size_t) nogil> __cuMemcpyAtoH_v2)(dstHost, srcArray, srcOffset, ByteCount)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__107, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4894, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4894, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4893
 *     cuPythonInit()
 *     if __cuMemcpyAtoH_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyAtoH_v2" not found')
 *     err = (<CUresult (*)(void*, CUarray, size_t, size_t) nogil> __cuMemcpyAtoH_v2)(dstHost, srcArray, srcOffset, ByteCount)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4892
 *     global __cuMemcpyAtoH_v2
 *     cuPythonInit()
 *     if __cuMemcpyAtoH_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAtoH_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4895
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAtoH_v2" not found')
 *     err = (<CUresult (*)(void*, CUarray, size_t, size_t) nogil> __cuMemcpyAtoH_v2)(dstHost, srcArray, srcOffset, ByteCount)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(void *, CUarray, size_t, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoH_v2)(__pyx_v_dstHost, __pyx_v_srcArray, __pyx_v_srcOffset, __pyx_v_ByteCount);

    /* "cuda/_cuda/ccuda.pyx":4896
 *             raise RuntimeError('Function "cuMemcpyAtoH_v2" not found')
 *     err = (<CUresult (*)(void*, CUarray, size_t, size_t) nogil> __cuMemcpyAtoH_v2)(dstHost, srcArray, srcOffset, ByteCount)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemcpyAtoA_v2(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4890
 * 
 * cdef CUresult _cuMemcpyAtoH_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyAtoH_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyAtoH_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4889
 *     return err
 * 
 * cdef CUresult _cuMemcpyAtoH_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyAtoH_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemcpyAtoH_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4898
 *     return err
 * 
 * cdef CUresult _cuMemcpyAtoA_v2(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyAtoA_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAtoA_v2(CUarray __pyx_v_dstArray, size_t __pyx_v_dstOffset, CUarray __pyx_v_srcArray, size_t __pyx_v_srcOffset, size_t __pyx_v_ByteCount) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemcpyAtoA_v2", 1);
  __Pyx_TraceCall("_cuMemcpyAtoA_v2", __pyx_f[0], 4898, 1, __PYX_ERR(0, 4898, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4899
 * 
 * cdef CUresult _cuMemcpyAtoA_v2(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyAtoA_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyAtoA_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4900
 * cdef CUresult _cuMemcpyAtoA_v2(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyAtoA_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemcpyAtoA_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4900, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4901
 *     global __cuMemcpyAtoA_v2
 *     cuPythonInit()
 *     if __cuMemcpyAtoA_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAtoA_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoA_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4902
 *     cuPythonInit()
 *     if __cuMemcpyAtoA_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyAtoA_v2" not found')
 *     err = (<CUresult (*)(CUarray, size_t, CUarray, size_t, size_t) nogil> __cuMemcpyAtoA_v2)(dstArray, dstOffset, srcArray, srcOffset, ByteCount)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4903
 *     if __cuMemcpyAtoA_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAtoA_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray, size_t, CUarray, size_t, size_t) nogil> __cuMemcpyAtoA_v2)(dstArray, dstOffset, srcArray, srcOffset, ByteCount)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__108, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4903, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4903, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4902
 *     cuPythonInit()
 *     if __cuMemcpyAtoA_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyAtoA_v2" not found')
 *     err = (<CUresult (*)(CUarray, size_t, CUarray, size_t, size_t) nogil> __cuMemcpyAtoA_v2)(dstArray, dstOffset, srcArray, srcOffset, ByteCount)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4901
 *     global __cuMemcpyAtoA_v2
 *     cuPythonInit()
 *     if __cuMemcpyAtoA_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAtoA_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4904
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAtoA_v2" not found')
 *     err = (<CUresult (*)(CUarray, size_t, CUarray, size_t, size_t) nogil> __cuMemcpyAtoA_v2)(dstArray, dstOffset, srcArray, srcOffset, ByteCount)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUarray, size_t, CUarray, size_t, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoA_v2)(__pyx_v_dstArray, __pyx_v_dstOffset, __pyx_v_srcArray, __pyx_v_srcOffset, __pyx_v_ByteCount);

    /* "cuda/_cuda/ccuda.pyx":4905
 *             raise RuntimeError('Function "cuMemcpyAtoA_v2" not found')
 *     err = (<CUresult (*)(CUarray, size_t, CUarray, size_t, size_t) nogil> __cuMemcpyAtoA_v2)(dstArray, dstOffset, srcArray, srcOffset, ByteCount)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemcpy2D_v2(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4899
 * 
 * cdef CUresult _cuMemcpyAtoA_v2(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyAtoA_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyAtoA_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4898
 *     return err
 * 
 * cdef CUresult _cuMemcpyAtoA_v2(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyAtoA_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemcpyAtoA_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4907
 *     return err
 * 
 * cdef CUresult _cuMemcpy2D_v2(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpy2D_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy2D_v2(CUDA_MEMCPY2D const *__pyx_v_pCopy) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemcpy2D_v2", 1);
  __Pyx_TraceCall("_cuMemcpy2D_v2", __pyx_f[0], 4907, 1, __PYX_ERR(0, 4907, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4908
 * 
 * cdef CUresult _cuMemcpy2D_v2(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpy2D_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpy2D_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4909
 * cdef CUresult _cuMemcpy2D_v2(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpy2D_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemcpy2D_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4909, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4910
 *     global __cuMemcpy2D_v2
 *     cuPythonInit()
 *     if __cuMemcpy2D_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy2D_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2D_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4911
 *     cuPythonInit()
 *     if __cuMemcpy2D_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpy2D_v2" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY2D*) nogil> __cuMemcpy2D_v2)(pCopy)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4912
 *     if __cuMemcpy2D_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy2D_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const CUDA_MEMCPY2D*) nogil> __cuMemcpy2D_v2)(pCopy)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__109, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4912, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4912, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4911
 *     cuPythonInit()
 *     if __cuMemcpy2D_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpy2D_v2" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY2D*) nogil> __cuMemcpy2D_v2)(pCopy)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4910
 *     global __cuMemcpy2D_v2
 *     cuPythonInit()
 *     if __cuMemcpy2D_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy2D_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4913
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy2D_v2" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY2D*) nogil> __cuMemcpy2D_v2)(pCopy)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUDA_MEMCPY2D const *))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2D_v2)(__pyx_v_pCopy);

    /* "cuda/_cuda/ccuda.pyx":4914
 *             raise RuntimeError('Function "cuMemcpy2D_v2" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY2D*) nogil> __cuMemcpy2D_v2)(pCopy)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemcpy2DUnaligned_v2(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4908
 * 
 * cdef CUresult _cuMemcpy2D_v2(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpy2D_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpy2D_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4907
 *     return err
 * 
 * cdef CUresult _cuMemcpy2D_v2(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpy2D_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemcpy2D_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4916
 *     return err
 * 
 * cdef CUresult _cuMemcpy2DUnaligned_v2(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpy2DUnaligned_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy2DUnaligned_v2(CUDA_MEMCPY2D const *__pyx_v_pCopy) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemcpy2DUnaligned_v2", 1);
  __Pyx_TraceCall("_cuMemcpy2DUnaligned_v2", __pyx_f[0], 4916, 1, __PYX_ERR(0, 4916, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4917
 * 
 * cdef CUresult _cuMemcpy2DUnaligned_v2(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpy2DUnaligned_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpy2DUnaligned_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4918
 * cdef CUresult _cuMemcpy2DUnaligned_v2(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpy2DUnaligned_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemcpy2DUnaligned_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4918, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4919
 *     global __cuMemcpy2DUnaligned_v2
 *     cuPythonInit()
 *     if __cuMemcpy2DUnaligned_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy2DUnaligned_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2DUnaligned_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4920
 *     cuPythonInit()
 *     if __cuMemcpy2DUnaligned_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpy2DUnaligned_v2" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY2D*) nogil> __cuMemcpy2DUnaligned_v2)(pCopy)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4921
 *     if __cuMemcpy2DUnaligned_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy2DUnaligned_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const CUDA_MEMCPY2D*) nogil> __cuMemcpy2DUnaligned_v2)(pCopy)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__110, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4921, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4921, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4920
 *     cuPythonInit()
 *     if __cuMemcpy2DUnaligned_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpy2DUnaligned_v2" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY2D*) nogil> __cuMemcpy2DUnaligned_v2)(pCopy)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4919
 *     global __cuMemcpy2DUnaligned_v2
 *     cuPythonInit()
 *     if __cuMemcpy2DUnaligned_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy2DUnaligned_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4922
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy2DUnaligned_v2" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY2D*) nogil> __cuMemcpy2DUnaligned_v2)(pCopy)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUDA_MEMCPY2D const *))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2DUnaligned_v2)(__pyx_v_pCopy);

    /* "cuda/_cuda/ccuda.pyx":4923
 *             raise RuntimeError('Function "cuMemcpy2DUnaligned_v2" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY2D*) nogil> __cuMemcpy2DUnaligned_v2)(pCopy)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemcpy3D_v2(const CUDA_MEMCPY3D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4917
 * 
 * cdef CUresult _cuMemcpy2DUnaligned_v2(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpy2DUnaligned_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpy2DUnaligned_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4916
 *     return err
 * 
 * cdef CUresult _cuMemcpy2DUnaligned_v2(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpy2DUnaligned_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemcpy2DUnaligned_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4925
 *     return err
 * 
 * cdef CUresult _cuMemcpy3D_v2(const CUDA_MEMCPY3D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpy3D_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3D_v2(CUDA_MEMCPY3D const *__pyx_v_pCopy) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemcpy3D_v2", 1);
  __Pyx_TraceCall("_cuMemcpy3D_v2", __pyx_f[0], 4925, 1, __PYX_ERR(0, 4925, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4926
 * 
 * cdef CUresult _cuMemcpy3D_v2(const CUDA_MEMCPY3D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpy3D_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpy3D_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4927
 * cdef CUresult _cuMemcpy3D_v2(const CUDA_MEMCPY3D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpy3D_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemcpy3D_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4927, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4928
 *     global __cuMemcpy3D_v2
 *     cuPythonInit()
 *     if __cuMemcpy3D_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3D_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3D_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4929
 *     cuPythonInit()
 *     if __cuMemcpy3D_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpy3D_v2" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY3D*) nogil> __cuMemcpy3D_v2)(pCopy)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4930
 *     if __cuMemcpy3D_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3D_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const CUDA_MEMCPY3D*) nogil> __cuMemcpy3D_v2)(pCopy)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__111, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4930, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4930, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4929
 *     cuPythonInit()
 *     if __cuMemcpy3D_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpy3D_v2" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY3D*) nogil> __cuMemcpy3D_v2)(pCopy)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4928
 *     global __cuMemcpy3D_v2
 *     cuPythonInit()
 *     if __cuMemcpy3D_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3D_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4931
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3D_v2" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY3D*) nogil> __cuMemcpy3D_v2)(pCopy)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUDA_MEMCPY3D const *))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3D_v2)(__pyx_v_pCopy);

    /* "cuda/_cuda/ccuda.pyx":4932
 *             raise RuntimeError('Function "cuMemcpy3D_v2" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY3D*) nogil> __cuMemcpy3D_v2)(pCopy)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4926
 * 
 * cdef CUresult _cuMemcpy3D_v2(const CUDA_MEMCPY3D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpy3D_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpy3D_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4925
 *     return err
 * 
 * cdef CUresult _cuMemcpy3D_v2(const CUDA_MEMCPY3D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpy3D_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemcpy3D_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4934
 *     return err
 * 
 * cdef CUresult _cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpy3DPeer
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DPeer(CUDA_MEMCPY3D_PEER const *__pyx_v_pCopy) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemcpy3DPeer", 1);
  __Pyx_TraceCall("_cuMemcpy3DPeer", __pyx_f[0], 4934, 1, __PYX_ERR(0, 4934, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4935
 * 
 * cdef CUresult _cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpy3DPeer             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpy3DPeer == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4936
 * cdef CUresult _cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpy3DPeer
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemcpy3DPeer == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4936, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4937
 *     global __cuMemcpy3DPeer
 *     cuPythonInit()
 *     if __cuMemcpy3DPeer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3DPeer" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DPeer == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4938
 *     cuPythonInit()
 *     if __cuMemcpy3DPeer == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpy3DPeer" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY3D_PEER*) nogil> __cuMemcpy3DPeer)(pCopy)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4939
 *     if __cuMemcpy3DPeer == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3DPeer" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const CUDA_MEMCPY3D_PEER*) nogil> __cuMemcpy3DPeer)(pCopy)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__112, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4939, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4939, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4938
 *     cuPythonInit()
 *     if __cuMemcpy3DPeer == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpy3DPeer" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY3D_PEER*) nogil> __cuMemcpy3DPeer)(pCopy)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4937
 *     global __cuMemcpy3DPeer
 *     cuPythonInit()
 *     if __cuMemcpy3DPeer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3DPeer" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4940
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3DPeer" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY3D_PEER*) nogil> __cuMemcpy3DPeer)(pCopy)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUDA_MEMCPY3D_PEER const *))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DPeer)(__pyx_v_pCopy);

    /* "cuda/_cuda/ccuda.pyx":4941
 *             raise RuntimeError('Function "cuMemcpy3DPeer" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY3D_PEER*) nogil> __cuMemcpy3DPeer)(pCopy)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4935
 * 
 * cdef CUresult _cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpy3DPeer             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpy3DPeer == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4934
 *     return err
 * 
 * cdef CUresult _cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpy3DPeer
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemcpy3DPeer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4943
 *     return err
 * 
 * cdef CUresult _cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyAsync
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAsync(CUdeviceptr __pyx_v_dst, CUdeviceptr __pyx_v_src, size_t __pyx_v_ByteCount, CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemcpyAsync", 1);
  __Pyx_TraceCall("_cuMemcpyAsync", __pyx_f[0], 4943, 1, __PYX_ERR(0, 4943, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4944
 * 
 * cdef CUresult _cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyAsync == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4945
 * cdef CUresult _cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyAsync
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemcpyAsync == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4945, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4946
 *     global __cuMemcpyAsync
 *     cuPythonInit()
 *     if __cuMemcpyAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAsync" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAsync == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4947
 *     cuPythonInit()
 *     if __cuMemcpyAsync == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyAsync" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUdeviceptr, size_t, CUstream) nogil> __cuMemcpyAsync)(dst, src, ByteCount, hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4948
 *     if __cuMemcpyAsync == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAsync" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, CUdeviceptr, size_t, CUstream) nogil> __cuMemcpyAsync)(dst, src, ByteCount, hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__113, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4948, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4948, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4947
 *     cuPythonInit()
 *     if __cuMemcpyAsync == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyAsync" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUdeviceptr, size_t, CUstream) nogil> __cuMemcpyAsync)(dst, src, ByteCount, hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4946
 *     global __cuMemcpyAsync
 *     cuPythonInit()
 *     if __cuMemcpyAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4949
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAsync" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUdeviceptr, size_t, CUstream) nogil> __cuMemcpyAsync)(dst, src, ByteCount, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, CUdeviceptr, size_t, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAsync)(__pyx_v_dst, __pyx_v_src, __pyx_v_ByteCount, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":4950
 *             raise RuntimeError('Function "cuMemcpyAsync" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUdeviceptr, size_t, CUstream) nogil> __cuMemcpyAsync)(dst, src, ByteCount, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4944
 * 
 * cdef CUresult _cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyAsync == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4943
 *     return err
 * 
 * cdef CUresult _cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyAsync
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemcpyAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4952
 *     return err
 * 
 * cdef CUresult _cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyPeerAsync
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyPeerAsync(CUdeviceptr __pyx_v_dstDevice, CUcontext __pyx_v_dstContext, CUdeviceptr __pyx_v_srcDevice, CUcontext __pyx_v_srcContext, size_t __pyx_v_ByteCount, CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemcpyPeerAsync", 1);
  __Pyx_TraceCall("_cuMemcpyPeerAsync", __pyx_f[0], 4952, 1, __PYX_ERR(0, 4952, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4953
 * 
 * cdef CUresult _cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyPeerAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyPeerAsync == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4954
 * cdef CUresult _cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyPeerAsync
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemcpyPeerAsync == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4954, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4955
 *     global __cuMemcpyPeerAsync
 *     cuPythonInit()
 *     if __cuMemcpyPeerAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyPeerAsync" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyPeerAsync == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4956
 *     cuPythonInit()
 *     if __cuMemcpyPeerAsync == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyPeerAsync" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t, CUstream) nogil> __cuMemcpyPeerAsync)(dstDevice, dstContext, srcDevice, srcContext, ByteCount, hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4957
 *     if __cuMemcpyPeerAsync == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyPeerAsync" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t, CUstream) nogil> __cuMemcpyPeerAsync)(dstDevice, dstContext, srcDevice, srcContext, ByteCount, hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__114, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4957, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4957, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4956
 *     cuPythonInit()
 *     if __cuMemcpyPeerAsync == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyPeerAsync" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t, CUstream) nogil> __cuMemcpyPeerAsync)(dstDevice, dstContext, srcDevice, srcContext, ByteCount, hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4955
 *     global __cuMemcpyPeerAsync
 *     cuPythonInit()
 *     if __cuMemcpyPeerAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyPeerAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4958
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyPeerAsync" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t, CUstream) nogil> __cuMemcpyPeerAsync)(dstDevice, dstContext, srcDevice, srcContext, ByteCount, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyPeerAsync)(__pyx_v_dstDevice, __pyx_v_dstContext, __pyx_v_srcDevice, __pyx_v_srcContext, __pyx_v_ByteCount, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":4959
 *             raise RuntimeError('Function "cuMemcpyPeerAsync" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t, CUstream) nogil> __cuMemcpyPeerAsync)(dstDevice, dstContext, srcDevice, srcContext, ByteCount, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemcpyHtoDAsync_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4953
 * 
 * cdef CUresult _cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyPeerAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyPeerAsync == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4952
 *     return err
 * 
 * cdef CUresult _cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyPeerAsync
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemcpyPeerAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4961
 *     return err
 * 
 * cdef CUresult _cuMemcpyHtoDAsync_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyHtoDAsync_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoDAsync_v2(CUdeviceptr __pyx_v_dstDevice, void const *__pyx_v_srcHost, size_t __pyx_v_ByteCount, CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemcpyHtoDAsync_v2", 1);
  __Pyx_TraceCall("_cuMemcpyHtoDAsync_v2", __pyx_f[0], 4961, 1, __PYX_ERR(0, 4961, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4962
 * 
 * cdef CUresult _cuMemcpyHtoDAsync_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyHtoDAsync_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyHtoDAsync_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4963
 * cdef CUresult _cuMemcpyHtoDAsync_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyHtoDAsync_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemcpyHtoDAsync_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4963, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4964
 *     global __cuMemcpyHtoDAsync_v2
 *     cuPythonInit()
 *     if __cuMemcpyHtoDAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyHtoDAsync_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoDAsync_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4965
 *     cuPythonInit()
 *     if __cuMemcpyHtoDAsync_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyHtoDAsync_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, const void*, size_t, CUstream) nogil> __cuMemcpyHtoDAsync_v2)(dstDevice, srcHost, ByteCount, hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4966
 *     if __cuMemcpyHtoDAsync_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyHtoDAsync_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, const void*, size_t, CUstream) nogil> __cuMemcpyHtoDAsync_v2)(dstDevice, srcHost, ByteCount, hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__115, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4966, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4966, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4965
 *     cuPythonInit()
 *     if __cuMemcpyHtoDAsync_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyHtoDAsync_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, const void*, size_t, CUstream) nogil> __cuMemcpyHtoDAsync_v2)(dstDevice, srcHost, ByteCount, hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4964
 *     global __cuMemcpyHtoDAsync_v2
 *     cuPythonInit()
 *     if __cuMemcpyHtoDAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyHtoDAsync_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4967
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyHtoDAsync_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, const void*, size_t, CUstream) nogil> __cuMemcpyHtoDAsync_v2)(dstDevice, srcHost, ByteCount, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, void const *, size_t, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoDAsync_v2)(__pyx_v_dstDevice, __pyx_v_srcHost, __pyx_v_ByteCount, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":4968
 *             raise RuntimeError('Function "cuMemcpyHtoDAsync_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, const void*, size_t, CUstream) nogil> __cuMemcpyHtoDAsync_v2)(dstDevice, srcHost, ByteCount, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemcpyDtoHAsync_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4962
 * 
 * cdef CUresult _cuMemcpyHtoDAsync_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyHtoDAsync_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyHtoDAsync_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4961
 *     return err
 * 
 * cdef CUresult _cuMemcpyHtoDAsync_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyHtoDAsync_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemcpyHtoDAsync_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4970
 *     return err
 * 
 * cdef CUresult _cuMemcpyDtoHAsync_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyDtoHAsync_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoHAsync_v2(void *__pyx_v_dstHost, CUdeviceptr __pyx_v_srcDevice, size_t __pyx_v_ByteCount, CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemcpyDtoHAsync_v2", 1);
  __Pyx_TraceCall("_cuMemcpyDtoHAsync_v2", __pyx_f[0], 4970, 1, __PYX_ERR(0, 4970, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4971
 * 
 * cdef CUresult _cuMemcpyDtoHAsync_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyDtoHAsync_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyDtoHAsync_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4972
 * cdef CUresult _cuMemcpyDtoHAsync_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyDtoHAsync_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemcpyDtoHAsync_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4972, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4973
 *     global __cuMemcpyDtoHAsync_v2
 *     cuPythonInit()
 *     if __cuMemcpyDtoHAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoHAsync_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoHAsync_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4974
 *     cuPythonInit()
 *     if __cuMemcpyDtoHAsync_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyDtoHAsync_v2" not found')
 *     err = (<CUresult (*)(void*, CUdeviceptr, size_t, CUstream) nogil> __cuMemcpyDtoHAsync_v2)(dstHost, srcDevice, ByteCount, hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4975
 *     if __cuMemcpyDtoHAsync_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoHAsync_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*, CUdeviceptr, size_t, CUstream) nogil> __cuMemcpyDtoHAsync_v2)(dstHost, srcDevice, ByteCount, hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__116, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4975, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4975, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4974
 *     cuPythonInit()
 *     if __cuMemcpyDtoHAsync_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyDtoHAsync_v2" not found')
 *     err = (<CUresult (*)(void*, CUdeviceptr, size_t, CUstream) nogil> __cuMemcpyDtoHAsync_v2)(dstHost, srcDevice, ByteCount, hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4973
 *     global __cuMemcpyDtoHAsync_v2
 *     cuPythonInit()
 *     if __cuMemcpyDtoHAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoHAsync_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4976
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoHAsync_v2" not found')
 *     err = (<CUresult (*)(void*, CUdeviceptr, size_t, CUstream) nogil> __cuMemcpyDtoHAsync_v2)(dstHost, srcDevice, ByteCount, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(void *, CUdeviceptr, size_t, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoHAsync_v2)(__pyx_v_dstHost, __pyx_v_srcDevice, __pyx_v_ByteCount, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":4977
 *             raise RuntimeError('Function "cuMemcpyDtoHAsync_v2" not found')
 *     err = (<CUresult (*)(void*, CUdeviceptr, size_t, CUstream) nogil> __cuMemcpyDtoHAsync_v2)(dstHost, srcDevice, ByteCount, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemcpyDtoDAsync_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4971
 * 
 * cdef CUresult _cuMemcpyDtoHAsync_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyDtoHAsync_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyDtoHAsync_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4970
 *     return err
 * 
 * cdef CUresult _cuMemcpyDtoHAsync_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyDtoHAsync_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemcpyDtoHAsync_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4979
 *     return err
 * 
 * cdef CUresult _cuMemcpyDtoDAsync_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyDtoDAsync_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoDAsync_v2(CUdeviceptr __pyx_v_dstDevice, CUdeviceptr __pyx_v_srcDevice, size_t __pyx_v_ByteCount, CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemcpyDtoDAsync_v2", 1);
  __Pyx_TraceCall("_cuMemcpyDtoDAsync_v2", __pyx_f[0], 4979, 1, __PYX_ERR(0, 4979, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4980
 * 
 * cdef CUresult _cuMemcpyDtoDAsync_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyDtoDAsync_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyDtoDAsync_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4981
 * cdef CUresult _cuMemcpyDtoDAsync_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyDtoDAsync_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemcpyDtoDAsync_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4981, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4982
 *     global __cuMemcpyDtoDAsync_v2
 *     cuPythonInit()
 *     if __cuMemcpyDtoDAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoDAsync_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoDAsync_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4983
 *     cuPythonInit()
 *     if __cuMemcpyDtoDAsync_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyDtoDAsync_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUdeviceptr, size_t, CUstream) nogil> __cuMemcpyDtoDAsync_v2)(dstDevice, srcDevice, ByteCount, hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4984
 *     if __cuMemcpyDtoDAsync_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoDAsync_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, CUdeviceptr, size_t, CUstream) nogil> __cuMemcpyDtoDAsync_v2)(dstDevice, srcDevice, ByteCount, hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__117, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4984, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4984, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4983
 *     cuPythonInit()
 *     if __cuMemcpyDtoDAsync_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyDtoDAsync_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUdeviceptr, size_t, CUstream) nogil> __cuMemcpyDtoDAsync_v2)(dstDevice, srcDevice, ByteCount, hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4982
 *     global __cuMemcpyDtoDAsync_v2
 *     cuPythonInit()
 *     if __cuMemcpyDtoDAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoDAsync_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4985
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoDAsync_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUdeviceptr, size_t, CUstream) nogil> __cuMemcpyDtoDAsync_v2)(dstDevice, srcDevice, ByteCount, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, CUdeviceptr, size_t, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoDAsync_v2)(__pyx_v_dstDevice, __pyx_v_srcDevice, __pyx_v_ByteCount, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":4986
 *             raise RuntimeError('Function "cuMemcpyDtoDAsync_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUdeviceptr, size_t, CUstream) nogil> __cuMemcpyDtoDAsync_v2)(dstDevice, srcDevice, ByteCount, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemcpyHtoAAsync_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4980
 * 
 * cdef CUresult _cuMemcpyDtoDAsync_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyDtoDAsync_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyDtoDAsync_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4979
 *     return err
 * 
 * cdef CUresult _cuMemcpyDtoDAsync_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyDtoDAsync_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemcpyDtoDAsync_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4988
 *     return err
 * 
 * cdef CUresult _cuMemcpyHtoAAsync_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyHtoAAsync_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoAAsync_v2(CUarray __pyx_v_dstArray, size_t __pyx_v_dstOffset, void const *__pyx_v_srcHost, size_t __pyx_v_ByteCount, CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemcpyHtoAAsync_v2", 1);
  __Pyx_TraceCall("_cuMemcpyHtoAAsync_v2", __pyx_f[0], 4988, 1, __PYX_ERR(0, 4988, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4989
 * 
 * cdef CUresult _cuMemcpyHtoAAsync_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyHtoAAsync_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyHtoAAsync_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4990
 * cdef CUresult _cuMemcpyHtoAAsync_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyHtoAAsync_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemcpyHtoAAsync_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4990, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4991
 *     global __cuMemcpyHtoAAsync_v2
 *     cuPythonInit()
 *     if __cuMemcpyHtoAAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyHtoAAsync_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoAAsync_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":4992
 *     cuPythonInit()
 *     if __cuMemcpyHtoAAsync_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyHtoAAsync_v2" not found')
 *     err = (<CUresult (*)(CUarray, size_t, const void*, size_t, CUstream) nogil> __cuMemcpyHtoAAsync_v2)(dstArray, dstOffset, srcHost, ByteCount, hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":4993
 *     if __cuMemcpyHtoAAsync_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyHtoAAsync_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray, size_t, const void*, size_t, CUstream) nogil> __cuMemcpyHtoAAsync_v2)(dstArray, dstOffset, srcHost, ByteCount, hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__118, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4993, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4993, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4992
 *     cuPythonInit()
 *     if __cuMemcpyHtoAAsync_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyHtoAAsync_v2" not found')
 *     err = (<CUresult (*)(CUarray, size_t, const void*, size_t, CUstream) nogil> __cuMemcpyHtoAAsync_v2)(dstArray, dstOffset, srcHost, ByteCount, hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":4991
 *     global __cuMemcpyHtoAAsync_v2
 *     cuPythonInit()
 *     if __cuMemcpyHtoAAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyHtoAAsync_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4994
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyHtoAAsync_v2" not found')
 *     err = (<CUresult (*)(CUarray, size_t, const void*, size_t, CUstream) nogil> __cuMemcpyHtoAAsync_v2)(dstArray, dstOffset, srcHost, ByteCount, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUarray, size_t, void const *, size_t, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoAAsync_v2)(__pyx_v_dstArray, __pyx_v_dstOffset, __pyx_v_srcHost, __pyx_v_ByteCount, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":4995
 *             raise RuntimeError('Function "cuMemcpyHtoAAsync_v2" not found')
 *     err = (<CUresult (*)(CUarray, size_t, const void*, size_t, CUstream) nogil> __cuMemcpyHtoAAsync_v2)(dstArray, dstOffset, srcHost, ByteCount, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemcpyAtoHAsync_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4989
 * 
 * cdef CUresult _cuMemcpyHtoAAsync_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyHtoAAsync_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyHtoAAsync_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4988
 *     return err
 * 
 * cdef CUresult _cuMemcpyHtoAAsync_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyHtoAAsync_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemcpyHtoAAsync_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":4997
 *     return err
 * 
 * cdef CUresult _cuMemcpyAtoHAsync_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyAtoHAsync_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAtoHAsync_v2(void *__pyx_v_dstHost, CUarray __pyx_v_srcArray, size_t __pyx_v_srcOffset, size_t __pyx_v_ByteCount, CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemcpyAtoHAsync_v2", 1);
  __Pyx_TraceCall("_cuMemcpyAtoHAsync_v2", __pyx_f[0], 4997, 1, __PYX_ERR(0, 4997, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4998
 * 
 * cdef CUresult _cuMemcpyAtoHAsync_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyAtoHAsync_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyAtoHAsync_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4999
 * cdef CUresult _cuMemcpyAtoHAsync_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyAtoHAsync_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemcpyAtoHAsync_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4999, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5000
 *     global __cuMemcpyAtoHAsync_v2
 *     cuPythonInit()
 *     if __cuMemcpyAtoHAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAtoHAsync_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoHAsync_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5001
 *     cuPythonInit()
 *     if __cuMemcpyAtoHAsync_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyAtoHAsync_v2" not found')
 *     err = (<CUresult (*)(void*, CUarray, size_t, size_t, CUstream) nogil> __cuMemcpyAtoHAsync_v2)(dstHost, srcArray, srcOffset, ByteCount, hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5002
 *     if __cuMemcpyAtoHAsync_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAtoHAsync_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*, CUarray, size_t, size_t, CUstream) nogil> __cuMemcpyAtoHAsync_v2)(dstHost, srcArray, srcOffset, ByteCount, hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__119, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5002, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5002, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5001
 *     cuPythonInit()
 *     if __cuMemcpyAtoHAsync_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpyAtoHAsync_v2" not found')
 *     err = (<CUresult (*)(void*, CUarray, size_t, size_t, CUstream) nogil> __cuMemcpyAtoHAsync_v2)(dstHost, srcArray, srcOffset, ByteCount, hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5000
 *     global __cuMemcpyAtoHAsync_v2
 *     cuPythonInit()
 *     if __cuMemcpyAtoHAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAtoHAsync_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5003
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAtoHAsync_v2" not found')
 *     err = (<CUresult (*)(void*, CUarray, size_t, size_t, CUstream) nogil> __cuMemcpyAtoHAsync_v2)(dstHost, srcArray, srcOffset, ByteCount, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(void *, CUarray, size_t, size_t, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoHAsync_v2)(__pyx_v_dstHost, __pyx_v_srcArray, __pyx_v_srcOffset, __pyx_v_ByteCount, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":5004
 *             raise RuntimeError('Function "cuMemcpyAtoHAsync_v2" not found')
 *     err = (<CUresult (*)(void*, CUarray, size_t, size_t, CUstream) nogil> __cuMemcpyAtoHAsync_v2)(dstHost, srcArray, srcOffset, ByteCount, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemcpy2DAsync_v2(const CUDA_MEMCPY2D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4998
 * 
 * cdef CUresult _cuMemcpyAtoHAsync_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpyAtoHAsync_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyAtoHAsync_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":4997
 *     return err
 * 
 * cdef CUresult _cuMemcpyAtoHAsync_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpyAtoHAsync_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemcpyAtoHAsync_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5006
 *     return err
 * 
 * cdef CUresult _cuMemcpy2DAsync_v2(const CUDA_MEMCPY2D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpy2DAsync_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy2DAsync_v2(CUDA_MEMCPY2D const *__pyx_v_pCopy, CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemcpy2DAsync_v2", 1);
  __Pyx_TraceCall("_cuMemcpy2DAsync_v2", __pyx_f[0], 5006, 1, __PYX_ERR(0, 5006, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5007
 * 
 * cdef CUresult _cuMemcpy2DAsync_v2(const CUDA_MEMCPY2D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpy2DAsync_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpy2DAsync_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5008
 * cdef CUresult _cuMemcpy2DAsync_v2(const CUDA_MEMCPY2D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpy2DAsync_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemcpy2DAsync_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5008, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5009
 *     global __cuMemcpy2DAsync_v2
 *     cuPythonInit()
 *     if __cuMemcpy2DAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy2DAsync_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2DAsync_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5010
 *     cuPythonInit()
 *     if __cuMemcpy2DAsync_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpy2DAsync_v2" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY2D*, CUstream) nogil> __cuMemcpy2DAsync_v2)(pCopy, hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5011
 *     if __cuMemcpy2DAsync_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy2DAsync_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const CUDA_MEMCPY2D*, CUstream) nogil> __cuMemcpy2DAsync_v2)(pCopy, hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__120, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5011, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5011, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5010
 *     cuPythonInit()
 *     if __cuMemcpy2DAsync_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpy2DAsync_v2" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY2D*, CUstream) nogil> __cuMemcpy2DAsync_v2)(pCopy, hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5009
 *     global __cuMemcpy2DAsync_v2
 *     cuPythonInit()
 *     if __cuMemcpy2DAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy2DAsync_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5012
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy2DAsync_v2" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY2D*, CUstream) nogil> __cuMemcpy2DAsync_v2)(pCopy, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUDA_MEMCPY2D const *, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2DAsync_v2)(__pyx_v_pCopy, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":5013
 *             raise RuntimeError('Function "cuMemcpy2DAsync_v2" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY2D*, CUstream) nogil> __cuMemcpy2DAsync_v2)(pCopy, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemcpy3DAsync_v2(const CUDA_MEMCPY3D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5007
 * 
 * cdef CUresult _cuMemcpy2DAsync_v2(const CUDA_MEMCPY2D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpy2DAsync_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpy2DAsync_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5006
 *     return err
 * 
 * cdef CUresult _cuMemcpy2DAsync_v2(const CUDA_MEMCPY2D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpy2DAsync_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemcpy2DAsync_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5015
 *     return err
 * 
 * cdef CUresult _cuMemcpy3DAsync_v2(const CUDA_MEMCPY3D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpy3DAsync_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DAsync_v2(CUDA_MEMCPY3D const *__pyx_v_pCopy, CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemcpy3DAsync_v2", 1);
  __Pyx_TraceCall("_cuMemcpy3DAsync_v2", __pyx_f[0], 5015, 1, __PYX_ERR(0, 5015, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5016
 * 
 * cdef CUresult _cuMemcpy3DAsync_v2(const CUDA_MEMCPY3D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpy3DAsync_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpy3DAsync_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5017
 * cdef CUresult _cuMemcpy3DAsync_v2(const CUDA_MEMCPY3D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpy3DAsync_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemcpy3DAsync_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5017, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5018
 *     global __cuMemcpy3DAsync_v2
 *     cuPythonInit()
 *     if __cuMemcpy3DAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3DAsync_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DAsync_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5019
 *     cuPythonInit()
 *     if __cuMemcpy3DAsync_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpy3DAsync_v2" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY3D*, CUstream) nogil> __cuMemcpy3DAsync_v2)(pCopy, hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5020
 *     if __cuMemcpy3DAsync_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3DAsync_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const CUDA_MEMCPY3D*, CUstream) nogil> __cuMemcpy3DAsync_v2)(pCopy, hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__121, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5020, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5020, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5019
 *     cuPythonInit()
 *     if __cuMemcpy3DAsync_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpy3DAsync_v2" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY3D*, CUstream) nogil> __cuMemcpy3DAsync_v2)(pCopy, hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5018
 *     global __cuMemcpy3DAsync_v2
 *     cuPythonInit()
 *     if __cuMemcpy3DAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3DAsync_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5021
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3DAsync_v2" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY3D*, CUstream) nogil> __cuMemcpy3DAsync_v2)(pCopy, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUDA_MEMCPY3D const *, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DAsync_v2)(__pyx_v_pCopy, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":5022
 *             raise RuntimeError('Function "cuMemcpy3DAsync_v2" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY3D*, CUstream) nogil> __cuMemcpy3DAsync_v2)(pCopy, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5016
 * 
 * cdef CUresult _cuMemcpy3DAsync_v2(const CUDA_MEMCPY3D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpy3DAsync_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpy3DAsync_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5015
 *     return err
 * 
 * cdef CUresult _cuMemcpy3DAsync_v2(const CUDA_MEMCPY3D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpy3DAsync_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemcpy3DAsync_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5024
 *     return err
 * 
 * cdef CUresult _cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpy3DPeerAsync
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DPeerAsync(CUDA_MEMCPY3D_PEER const *__pyx_v_pCopy, CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemcpy3DPeerAsync", 1);
  __Pyx_TraceCall("_cuMemcpy3DPeerAsync", __pyx_f[0], 5024, 1, __PYX_ERR(0, 5024, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5025
 * 
 * cdef CUresult _cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpy3DPeerAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpy3DPeerAsync == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5026
 * cdef CUresult _cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpy3DPeerAsync
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemcpy3DPeerAsync == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5026, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5027
 *     global __cuMemcpy3DPeerAsync
 *     cuPythonInit()
 *     if __cuMemcpy3DPeerAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3DPeerAsync" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DPeerAsync == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5028
 *     cuPythonInit()
 *     if __cuMemcpy3DPeerAsync == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpy3DPeerAsync" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY3D_PEER*, CUstream) nogil> __cuMemcpy3DPeerAsync)(pCopy, hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5029
 *     if __cuMemcpy3DPeerAsync == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3DPeerAsync" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const CUDA_MEMCPY3D_PEER*, CUstream) nogil> __cuMemcpy3DPeerAsync)(pCopy, hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__122, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5029, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5029, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5028
 *     cuPythonInit()
 *     if __cuMemcpy3DPeerAsync == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemcpy3DPeerAsync" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY3D_PEER*, CUstream) nogil> __cuMemcpy3DPeerAsync)(pCopy, hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5027
 *     global __cuMemcpy3DPeerAsync
 *     cuPythonInit()
 *     if __cuMemcpy3DPeerAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3DPeerAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5030
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3DPeerAsync" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY3D_PEER*, CUstream) nogil> __cuMemcpy3DPeerAsync)(pCopy, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUDA_MEMCPY3D_PEER const *, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DPeerAsync)(__pyx_v_pCopy, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":5031
 *             raise RuntimeError('Function "cuMemcpy3DPeerAsync" not found')
 *     err = (<CUresult (*)(const CUDA_MEMCPY3D_PEER*, CUstream) nogil> __cuMemcpy3DPeerAsync)(pCopy, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemsetD8_v2(CUdeviceptr dstDevice, unsigned char uc, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5025
 * 
 * cdef CUresult _cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemcpy3DPeerAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpy3DPeerAsync == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5024
 *     return err
 * 
 * cdef CUresult _cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemcpy3DPeerAsync
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemcpy3DPeerAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5033
 *     return err
 * 
 * cdef CUresult _cuMemsetD8_v2(CUdeviceptr dstDevice, unsigned char uc, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD8_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD8_v2(CUdeviceptr __pyx_v_dstDevice, unsigned char __pyx_v_uc, size_t __pyx_v_N) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemsetD8_v2", 1);
  __Pyx_TraceCall("_cuMemsetD8_v2", __pyx_f[0], 5033, 1, __PYX_ERR(0, 5033, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5034
 * 
 * cdef CUresult _cuMemsetD8_v2(CUdeviceptr dstDevice, unsigned char uc, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemsetD8_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD8_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5035
 * cdef CUresult _cuMemsetD8_v2(CUdeviceptr dstDevice, unsigned char uc, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemsetD8_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemsetD8_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5035, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5036
 *     global __cuMemsetD8_v2
 *     cuPythonInit()
 *     if __cuMemsetD8_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD8_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD8_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5037
 *     cuPythonInit()
 *     if __cuMemsetD8_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemsetD8_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, unsigned char, size_t) nogil> __cuMemsetD8_v2)(dstDevice, uc, N)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5038
 *     if __cuMemsetD8_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD8_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, unsigned char, size_t) nogil> __cuMemsetD8_v2)(dstDevice, uc, N)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__123, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5038, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5038, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5037
 *     cuPythonInit()
 *     if __cuMemsetD8_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemsetD8_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, unsigned char, size_t) nogil> __cuMemsetD8_v2)(dstDevice, uc, N)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5036
 *     global __cuMemsetD8_v2
 *     cuPythonInit()
 *     if __cuMemsetD8_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD8_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5039
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD8_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, unsigned char, size_t) nogil> __cuMemsetD8_v2)(dstDevice, uc, N)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, unsigned char, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD8_v2)(__pyx_v_dstDevice, __pyx_v_uc, __pyx_v_N);

    /* "cuda/_cuda/ccuda.pyx":5040
 *             raise RuntimeError('Function "cuMemsetD8_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, unsigned char, size_t) nogil> __cuMemsetD8_v2)(dstDevice, uc, N)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemsetD16_v2(CUdeviceptr dstDevice, unsigned short us, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5034
 * 
 * cdef CUresult _cuMemsetD8_v2(CUdeviceptr dstDevice, unsigned char uc, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemsetD8_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD8_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5033
 *     return err
 * 
 * cdef CUresult _cuMemsetD8_v2(CUdeviceptr dstDevice, unsigned char uc, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD8_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemsetD8_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5042
 *     return err
 * 
 * cdef CUresult _cuMemsetD16_v2(CUdeviceptr dstDevice, unsigned short us, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD16_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD16_v2(CUdeviceptr __pyx_v_dstDevice, unsigned short __pyx_v_us, size_t __pyx_v_N) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemsetD16_v2", 1);
  __Pyx_TraceCall("_cuMemsetD16_v2", __pyx_f[0], 5042, 1, __PYX_ERR(0, 5042, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5043
 * 
 * cdef CUresult _cuMemsetD16_v2(CUdeviceptr dstDevice, unsigned short us, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemsetD16_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD16_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5044
 * cdef CUresult _cuMemsetD16_v2(CUdeviceptr dstDevice, unsigned short us, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemsetD16_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemsetD16_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5044, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5045
 *     global __cuMemsetD16_v2
 *     cuPythonInit()
 *     if __cuMemsetD16_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD16_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD16_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5046
 *     cuPythonInit()
 *     if __cuMemsetD16_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemsetD16_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, unsigned short, size_t) nogil> __cuMemsetD16_v2)(dstDevice, us, N)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5047
 *     if __cuMemsetD16_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD16_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, unsigned short, size_t) nogil> __cuMemsetD16_v2)(dstDevice, us, N)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__124, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5047, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5047, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5046
 *     cuPythonInit()
 *     if __cuMemsetD16_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemsetD16_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, unsigned short, size_t) nogil> __cuMemsetD16_v2)(dstDevice, us, N)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5045
 *     global __cuMemsetD16_v2
 *     cuPythonInit()
 *     if __cuMemsetD16_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD16_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5048
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD16_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, unsigned short, size_t) nogil> __cuMemsetD16_v2)(dstDevice, us, N)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, unsigned short, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD16_v2)(__pyx_v_dstDevice, __pyx_v_us, __pyx_v_N);

    /* "cuda/_cuda/ccuda.pyx":5049
 *             raise RuntimeError('Function "cuMemsetD16_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, unsigned short, size_t) nogil> __cuMemsetD16_v2)(dstDevice, us, N)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemsetD32_v2(CUdeviceptr dstDevice, unsigned int ui, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5043
 * 
 * cdef CUresult _cuMemsetD16_v2(CUdeviceptr dstDevice, unsigned short us, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemsetD16_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD16_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5042
 *     return err
 * 
 * cdef CUresult _cuMemsetD16_v2(CUdeviceptr dstDevice, unsigned short us, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD16_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemsetD16_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5051
 *     return err
 * 
 * cdef CUresult _cuMemsetD32_v2(CUdeviceptr dstDevice, unsigned int ui, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD32_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD32_v2(CUdeviceptr __pyx_v_dstDevice, unsigned int __pyx_v_ui, size_t __pyx_v_N) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemsetD32_v2", 1);
  __Pyx_TraceCall("_cuMemsetD32_v2", __pyx_f[0], 5051, 1, __PYX_ERR(0, 5051, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5052
 * 
 * cdef CUresult _cuMemsetD32_v2(CUdeviceptr dstDevice, unsigned int ui, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemsetD32_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD32_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5053
 * cdef CUresult _cuMemsetD32_v2(CUdeviceptr dstDevice, unsigned int ui, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemsetD32_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemsetD32_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5053, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5054
 *     global __cuMemsetD32_v2
 *     cuPythonInit()
 *     if __cuMemsetD32_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD32_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD32_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5055
 *     cuPythonInit()
 *     if __cuMemsetD32_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemsetD32_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, unsigned int, size_t) nogil> __cuMemsetD32_v2)(dstDevice, ui, N)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5056
 *     if __cuMemsetD32_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD32_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, unsigned int, size_t) nogil> __cuMemsetD32_v2)(dstDevice, ui, N)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__125, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5056, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5056, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5055
 *     cuPythonInit()
 *     if __cuMemsetD32_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemsetD32_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, unsigned int, size_t) nogil> __cuMemsetD32_v2)(dstDevice, ui, N)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5054
 *     global __cuMemsetD32_v2
 *     cuPythonInit()
 *     if __cuMemsetD32_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD32_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5057
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD32_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, unsigned int, size_t) nogil> __cuMemsetD32_v2)(dstDevice, ui, N)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, unsigned int, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD32_v2)(__pyx_v_dstDevice, __pyx_v_ui, __pyx_v_N);

    /* "cuda/_cuda/ccuda.pyx":5058
 *             raise RuntimeError('Function "cuMemsetD32_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, unsigned int, size_t) nogil> __cuMemsetD32_v2)(dstDevice, ui, N)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemsetD2D8_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5052
 * 
 * cdef CUresult _cuMemsetD32_v2(CUdeviceptr dstDevice, unsigned int ui, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemsetD32_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD32_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5051
 *     return err
 * 
 * cdef CUresult _cuMemsetD32_v2(CUdeviceptr dstDevice, unsigned int ui, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD32_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemsetD32_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5060
 *     return err
 * 
 * cdef CUresult _cuMemsetD2D8_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD2D8_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D8_v2(CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned char __pyx_v_uc, size_t __pyx_v_Width, size_t __pyx_v_Height) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemsetD2D8_v2", 1);
  __Pyx_TraceCall("_cuMemsetD2D8_v2", __pyx_f[0], 5060, 1, __PYX_ERR(0, 5060, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5061
 * 
 * cdef CUresult _cuMemsetD2D8_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemsetD2D8_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD2D8_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5062
 * cdef CUresult _cuMemsetD2D8_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemsetD2D8_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemsetD2D8_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5062, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5063
 *     global __cuMemsetD2D8_v2
 *     cuPythonInit()
 *     if __cuMemsetD2D8_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D8_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D8_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5064
 *     cuPythonInit()
 *     if __cuMemsetD2D8_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemsetD2D8_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned char, size_t, size_t) nogil> __cuMemsetD2D8_v2)(dstDevice, dstPitch, uc, Width, Height)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5065
 *     if __cuMemsetD2D8_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D8_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned char, size_t, size_t) nogil> __cuMemsetD2D8_v2)(dstDevice, dstPitch, uc, Width, Height)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__126, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5065, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5065, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5064
 *     cuPythonInit()
 *     if __cuMemsetD2D8_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemsetD2D8_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned char, size_t, size_t) nogil> __cuMemsetD2D8_v2)(dstDevice, dstPitch, uc, Width, Height)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5063
 *     global __cuMemsetD2D8_v2
 *     cuPythonInit()
 *     if __cuMemsetD2D8_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D8_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5066
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D8_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned char, size_t, size_t) nogil> __cuMemsetD2D8_v2)(dstDevice, dstPitch, uc, Width, Height)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, size_t, unsigned char, size_t, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D8_v2)(__pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_uc, __pyx_v_Width, __pyx_v_Height);

    /* "cuda/_cuda/ccuda.pyx":5067
 *             raise RuntimeError('Function "cuMemsetD2D8_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned char, size_t, size_t) nogil> __cuMemsetD2D8_v2)(dstDevice, dstPitch, uc, Width, Height)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemsetD2D16_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5061
 * 
 * cdef CUresult _cuMemsetD2D8_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemsetD2D8_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD2D8_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5060
 *     return err
 * 
 * cdef CUresult _cuMemsetD2D8_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD2D8_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemsetD2D8_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5069
 *     return err
 * 
 * cdef CUresult _cuMemsetD2D16_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD2D16_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D16_v2(CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned short __pyx_v_us, size_t __pyx_v_Width, size_t __pyx_v_Height) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemsetD2D16_v2", 1);
  __Pyx_TraceCall("_cuMemsetD2D16_v2", __pyx_f[0], 5069, 1, __PYX_ERR(0, 5069, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5070
 * 
 * cdef CUresult _cuMemsetD2D16_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemsetD2D16_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD2D16_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5071
 * cdef CUresult _cuMemsetD2D16_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemsetD2D16_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemsetD2D16_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5071, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5072
 *     global __cuMemsetD2D16_v2
 *     cuPythonInit()
 *     if __cuMemsetD2D16_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D16_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D16_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5073
 *     cuPythonInit()
 *     if __cuMemsetD2D16_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemsetD2D16_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned short, size_t, size_t) nogil> __cuMemsetD2D16_v2)(dstDevice, dstPitch, us, Width, Height)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5074
 *     if __cuMemsetD2D16_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D16_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned short, size_t, size_t) nogil> __cuMemsetD2D16_v2)(dstDevice, dstPitch, us, Width, Height)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__127, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5074, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5074, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5073
 *     cuPythonInit()
 *     if __cuMemsetD2D16_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemsetD2D16_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned short, size_t, size_t) nogil> __cuMemsetD2D16_v2)(dstDevice, dstPitch, us, Width, Height)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5072
 *     global __cuMemsetD2D16_v2
 *     cuPythonInit()
 *     if __cuMemsetD2D16_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D16_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5075
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D16_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned short, size_t, size_t) nogil> __cuMemsetD2D16_v2)(dstDevice, dstPitch, us, Width, Height)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, size_t, unsigned short, size_t, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D16_v2)(__pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_us, __pyx_v_Width, __pyx_v_Height);

    /* "cuda/_cuda/ccuda.pyx":5076
 *             raise RuntimeError('Function "cuMemsetD2D16_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned short, size_t, size_t) nogil> __cuMemsetD2D16_v2)(dstDevice, dstPitch, us, Width, Height)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemsetD2D32_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5070
 * 
 * cdef CUresult _cuMemsetD2D16_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemsetD2D16_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD2D16_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5069
 *     return err
 * 
 * cdef CUresult _cuMemsetD2D16_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD2D16_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemsetD2D16_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5078
 *     return err
 * 
 * cdef CUresult _cuMemsetD2D32_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD2D32_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D32_v2(CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned int __pyx_v_ui, size_t __pyx_v_Width, size_t __pyx_v_Height) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemsetD2D32_v2", 1);
  __Pyx_TraceCall("_cuMemsetD2D32_v2", __pyx_f[0], 5078, 1, __PYX_ERR(0, 5078, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5079
 * 
 * cdef CUresult _cuMemsetD2D32_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemsetD2D32_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD2D32_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5080
 * cdef CUresult _cuMemsetD2D32_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemsetD2D32_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemsetD2D32_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5080, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5081
 *     global __cuMemsetD2D32_v2
 *     cuPythonInit()
 *     if __cuMemsetD2D32_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D32_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D32_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5082
 *     cuPythonInit()
 *     if __cuMemsetD2D32_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemsetD2D32_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned int, size_t, size_t) nogil> __cuMemsetD2D32_v2)(dstDevice, dstPitch, ui, Width, Height)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5083
 *     if __cuMemsetD2D32_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D32_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned int, size_t, size_t) nogil> __cuMemsetD2D32_v2)(dstDevice, dstPitch, ui, Width, Height)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__128, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5083, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5083, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5082
 *     cuPythonInit()
 *     if __cuMemsetD2D32_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemsetD2D32_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned int, size_t, size_t) nogil> __cuMemsetD2D32_v2)(dstDevice, dstPitch, ui, Width, Height)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5081
 *     global __cuMemsetD2D32_v2
 *     cuPythonInit()
 *     if __cuMemsetD2D32_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D32_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5084
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D32_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned int, size_t, size_t) nogil> __cuMemsetD2D32_v2)(dstDevice, dstPitch, ui, Width, Height)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, size_t, unsigned int, size_t, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D32_v2)(__pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_ui, __pyx_v_Width, __pyx_v_Height);

    /* "cuda/_cuda/ccuda.pyx":5085
 *             raise RuntimeError('Function "cuMemsetD2D32_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned int, size_t, size_t) nogil> __cuMemsetD2D32_v2)(dstDevice, dstPitch, ui, Width, Height)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5079
 * 
 * cdef CUresult _cuMemsetD2D32_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemsetD2D32_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD2D32_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5078
 *     return err
 * 
 * cdef CUresult _cuMemsetD2D32_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD2D32_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemsetD2D32_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5087
 *     return err
 * 
 * cdef CUresult _cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD8Async
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD8Async(CUdeviceptr __pyx_v_dstDevice, unsigned char __pyx_v_uc, size_t __pyx_v_N, CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemsetD8Async", 1);
  __Pyx_TraceCall("_cuMemsetD8Async", __pyx_f[0], 5087, 1, __PYX_ERR(0, 5087, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5088
 * 
 * cdef CUresult _cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemsetD8Async             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD8Async == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5089
 * cdef CUresult _cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemsetD8Async
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemsetD8Async == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5089, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5090
 *     global __cuMemsetD8Async
 *     cuPythonInit()
 *     if __cuMemsetD8Async == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD8Async" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD8Async == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5091
 *     cuPythonInit()
 *     if __cuMemsetD8Async == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemsetD8Async" not found')
 *     err = (<CUresult (*)(CUdeviceptr, unsigned char, size_t, CUstream) nogil> __cuMemsetD8Async)(dstDevice, uc, N, hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5092
 *     if __cuMemsetD8Async == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD8Async" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, unsigned char, size_t, CUstream) nogil> __cuMemsetD8Async)(dstDevice, uc, N, hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__129, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5092, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5092, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5091
 *     cuPythonInit()
 *     if __cuMemsetD8Async == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemsetD8Async" not found')
 *     err = (<CUresult (*)(CUdeviceptr, unsigned char, size_t, CUstream) nogil> __cuMemsetD8Async)(dstDevice, uc, N, hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5090
 *     global __cuMemsetD8Async
 *     cuPythonInit()
 *     if __cuMemsetD8Async == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD8Async" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5093
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD8Async" not found')
 *     err = (<CUresult (*)(CUdeviceptr, unsigned char, size_t, CUstream) nogil> __cuMemsetD8Async)(dstDevice, uc, N, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, unsigned char, size_t, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD8Async)(__pyx_v_dstDevice, __pyx_v_uc, __pyx_v_N, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":5094
 *             raise RuntimeError('Function "cuMemsetD8Async" not found')
 *     err = (<CUresult (*)(CUdeviceptr, unsigned char, size_t, CUstream) nogil> __cuMemsetD8Async)(dstDevice, uc, N, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5088
 * 
 * cdef CUresult _cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemsetD8Async             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD8Async == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5087
 *     return err
 * 
 * cdef CUresult _cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD8Async
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemsetD8Async", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5096
 *     return err
 * 
 * cdef CUresult _cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD16Async
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD16Async(CUdeviceptr __pyx_v_dstDevice, unsigned short __pyx_v_us, size_t __pyx_v_N, CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemsetD16Async", 1);
  __Pyx_TraceCall("_cuMemsetD16Async", __pyx_f[0], 5096, 1, __PYX_ERR(0, 5096, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5097
 * 
 * cdef CUresult _cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemsetD16Async             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD16Async == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5098
 * cdef CUresult _cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemsetD16Async
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemsetD16Async == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5098, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5099
 *     global __cuMemsetD16Async
 *     cuPythonInit()
 *     if __cuMemsetD16Async == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD16Async" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD16Async == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5100
 *     cuPythonInit()
 *     if __cuMemsetD16Async == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemsetD16Async" not found')
 *     err = (<CUresult (*)(CUdeviceptr, unsigned short, size_t, CUstream) nogil> __cuMemsetD16Async)(dstDevice, us, N, hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5101
 *     if __cuMemsetD16Async == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD16Async" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, unsigned short, size_t, CUstream) nogil> __cuMemsetD16Async)(dstDevice, us, N, hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__130, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5101, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5101, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5100
 *     cuPythonInit()
 *     if __cuMemsetD16Async == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemsetD16Async" not found')
 *     err = (<CUresult (*)(CUdeviceptr, unsigned short, size_t, CUstream) nogil> __cuMemsetD16Async)(dstDevice, us, N, hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5099
 *     global __cuMemsetD16Async
 *     cuPythonInit()
 *     if __cuMemsetD16Async == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD16Async" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5102
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD16Async" not found')
 *     err = (<CUresult (*)(CUdeviceptr, unsigned short, size_t, CUstream) nogil> __cuMemsetD16Async)(dstDevice, us, N, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, unsigned short, size_t, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD16Async)(__pyx_v_dstDevice, __pyx_v_us, __pyx_v_N, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":5103
 *             raise RuntimeError('Function "cuMemsetD16Async" not found')
 *     err = (<CUresult (*)(CUdeviceptr, unsigned short, size_t, CUstream) nogil> __cuMemsetD16Async)(dstDevice, us, N, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5097
 * 
 * cdef CUresult _cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemsetD16Async             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD16Async == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5096
 *     return err
 * 
 * cdef CUresult _cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD16Async
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemsetD16Async", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5105
 *     return err
 * 
 * cdef CUresult _cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD32Async
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD32Async(CUdeviceptr __pyx_v_dstDevice, unsigned int __pyx_v_ui, size_t __pyx_v_N, CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemsetD32Async", 1);
  __Pyx_TraceCall("_cuMemsetD32Async", __pyx_f[0], 5105, 1, __PYX_ERR(0, 5105, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5106
 * 
 * cdef CUresult _cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemsetD32Async             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD32Async == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5107
 * cdef CUresult _cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemsetD32Async
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemsetD32Async == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5107, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5108
 *     global __cuMemsetD32Async
 *     cuPythonInit()
 *     if __cuMemsetD32Async == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD32Async" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD32Async == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5109
 *     cuPythonInit()
 *     if __cuMemsetD32Async == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemsetD32Async" not found')
 *     err = (<CUresult (*)(CUdeviceptr, unsigned int, size_t, CUstream) nogil> __cuMemsetD32Async)(dstDevice, ui, N, hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5110
 *     if __cuMemsetD32Async == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD32Async" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, unsigned int, size_t, CUstream) nogil> __cuMemsetD32Async)(dstDevice, ui, N, hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__131, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5110, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5110, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5109
 *     cuPythonInit()
 *     if __cuMemsetD32Async == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemsetD32Async" not found')
 *     err = (<CUresult (*)(CUdeviceptr, unsigned int, size_t, CUstream) nogil> __cuMemsetD32Async)(dstDevice, ui, N, hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5108
 *     global __cuMemsetD32Async
 *     cuPythonInit()
 *     if __cuMemsetD32Async == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD32Async" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5111
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD32Async" not found')
 *     err = (<CUresult (*)(CUdeviceptr, unsigned int, size_t, CUstream) nogil> __cuMemsetD32Async)(dstDevice, ui, N, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, unsigned int, size_t, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD32Async)(__pyx_v_dstDevice, __pyx_v_ui, __pyx_v_N, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":5112
 *             raise RuntimeError('Function "cuMemsetD32Async" not found')
 *     err = (<CUresult (*)(CUdeviceptr, unsigned int, size_t, CUstream) nogil> __cuMemsetD32Async)(dstDevice, ui, N, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * 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:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5106
 * 
 * cdef CUresult _cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemsetD32Async             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD32Async == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5105
 *     return err
 * 
 * cdef CUresult _cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD32Async
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemsetD32Async", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5114
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD2D8Async
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D8Async(CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned char __pyx_v_uc, size_t __pyx_v_Width, size_t __pyx_v_Height, CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemsetD2D8Async", 1);
  __Pyx_TraceCall("_cuMemsetD2D8Async", __pyx_f[0], 5114, 1, __PYX_ERR(0, 5114, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5115
 * 
 * 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:
 *     global __cuMemsetD2D8Async             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD2D8Async == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5116
 * 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:
 *     global __cuMemsetD2D8Async
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemsetD2D8Async == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5116, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5117
 *     global __cuMemsetD2D8Async
 *     cuPythonInit()
 *     if __cuMemsetD2D8Async == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D8Async" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D8Async == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5118
 *     cuPythonInit()
 *     if __cuMemsetD2D8Async == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemsetD2D8Async" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned char, size_t, size_t, CUstream) nogil> __cuMemsetD2D8Async)(dstDevice, dstPitch, uc, Width, Height, hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5119
 *     if __cuMemsetD2D8Async == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D8Async" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned char, size_t, size_t, CUstream) nogil> __cuMemsetD2D8Async)(dstDevice, dstPitch, uc, Width, Height, hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__132, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5119, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5119, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5118
 *     cuPythonInit()
 *     if __cuMemsetD2D8Async == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemsetD2D8Async" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned char, size_t, size_t, CUstream) nogil> __cuMemsetD2D8Async)(dstDevice, dstPitch, uc, Width, Height, hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5117
 *     global __cuMemsetD2D8Async
 *     cuPythonInit()
 *     if __cuMemsetD2D8Async == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D8Async" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5120
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D8Async" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned char, size_t, size_t, CUstream) nogil> __cuMemsetD2D8Async)(dstDevice, dstPitch, uc, Width, Height, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, size_t, unsigned char, size_t, size_t, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D8Async)(__pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_uc, __pyx_v_Width, __pyx_v_Height, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":5121
 *             raise RuntimeError('Function "cuMemsetD2D8Async" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned char, size_t, size_t, CUstream) nogil> __cuMemsetD2D8Async)(dstDevice, dstPitch, uc, Width, Height, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * 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:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5115
 * 
 * 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:
 *     global __cuMemsetD2D8Async             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD2D8Async == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5114
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD2D8Async
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemsetD2D8Async", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5123
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD2D16Async
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D16Async(CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned short __pyx_v_us, size_t __pyx_v_Width, size_t __pyx_v_Height, CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemsetD2D16Async", 1);
  __Pyx_TraceCall("_cuMemsetD2D16Async", __pyx_f[0], 5123, 1, __PYX_ERR(0, 5123, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5124
 * 
 * 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:
 *     global __cuMemsetD2D16Async             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD2D16Async == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5125
 * 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:
 *     global __cuMemsetD2D16Async
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemsetD2D16Async == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5125, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5126
 *     global __cuMemsetD2D16Async
 *     cuPythonInit()
 *     if __cuMemsetD2D16Async == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D16Async" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D16Async == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5127
 *     cuPythonInit()
 *     if __cuMemsetD2D16Async == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemsetD2D16Async" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned short, size_t, size_t, CUstream) nogil> __cuMemsetD2D16Async)(dstDevice, dstPitch, us, Width, Height, hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5128
 *     if __cuMemsetD2D16Async == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D16Async" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned short, size_t, size_t, CUstream) nogil> __cuMemsetD2D16Async)(dstDevice, dstPitch, us, Width, Height, hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__133, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5128, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5128, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5127
 *     cuPythonInit()
 *     if __cuMemsetD2D16Async == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemsetD2D16Async" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned short, size_t, size_t, CUstream) nogil> __cuMemsetD2D16Async)(dstDevice, dstPitch, us, Width, Height, hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5126
 *     global __cuMemsetD2D16Async
 *     cuPythonInit()
 *     if __cuMemsetD2D16Async == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D16Async" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5129
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D16Async" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned short, size_t, size_t, CUstream) nogil> __cuMemsetD2D16Async)(dstDevice, dstPitch, us, Width, Height, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, size_t, unsigned short, size_t, size_t, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D16Async)(__pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_us, __pyx_v_Width, __pyx_v_Height, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":5130
 *             raise RuntimeError('Function "cuMemsetD2D16Async" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned short, size_t, size_t, CUstream) nogil> __cuMemsetD2D16Async)(dstDevice, dstPitch, us, Width, Height, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * 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:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5124
 * 
 * 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:
 *     global __cuMemsetD2D16Async             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD2D16Async == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5123
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD2D16Async
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemsetD2D16Async", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5132
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD2D32Async
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D32Async(CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned int __pyx_v_ui, size_t __pyx_v_Width, size_t __pyx_v_Height, CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemsetD2D32Async", 1);
  __Pyx_TraceCall("_cuMemsetD2D32Async", __pyx_f[0], 5132, 1, __PYX_ERR(0, 5132, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5133
 * 
 * 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:
 *     global __cuMemsetD2D32Async             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD2D32Async == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5134
 * 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:
 *     global __cuMemsetD2D32Async
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemsetD2D32Async == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5134, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5135
 *     global __cuMemsetD2D32Async
 *     cuPythonInit()
 *     if __cuMemsetD2D32Async == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D32Async" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D32Async == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5136
 *     cuPythonInit()
 *     if __cuMemsetD2D32Async == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemsetD2D32Async" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned int, size_t, size_t, CUstream) nogil> __cuMemsetD2D32Async)(dstDevice, dstPitch, ui, Width, Height, hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5137
 *     if __cuMemsetD2D32Async == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D32Async" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned int, size_t, size_t, CUstream) nogil> __cuMemsetD2D32Async)(dstDevice, dstPitch, ui, Width, Height, hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__134, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5137, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5137, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5136
 *     cuPythonInit()
 *     if __cuMemsetD2D32Async == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemsetD2D32Async" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned int, size_t, size_t, CUstream) nogil> __cuMemsetD2D32Async)(dstDevice, dstPitch, ui, Width, Height, hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5135
 *     global __cuMemsetD2D32Async
 *     cuPythonInit()
 *     if __cuMemsetD2D32Async == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D32Async" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5138
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D32Async" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned int, size_t, size_t, CUstream) nogil> __cuMemsetD2D32Async)(dstDevice, dstPitch, ui, Width, Height, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, size_t, unsigned int, size_t, size_t, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D32Async)(__pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_ui, __pyx_v_Width, __pyx_v_Height, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":5139
 *             raise RuntimeError('Function "cuMemsetD2D32Async" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned int, size_t, size_t, CUstream) nogil> __cuMemsetD2D32Async)(dstDevice, dstPitch, ui, Width, Height, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuArrayCreate_v2(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5133
 * 
 * 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:
 *     global __cuMemsetD2D32Async             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD2D32Async == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5132
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuMemsetD2D32Async
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemsetD2D32Async", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5141
 *     return err
 * 
 * cdef CUresult _cuArrayCreate_v2(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuArrayCreate_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuArrayCreate_v2(CUarray *__pyx_v_pHandle, CUDA_ARRAY_DESCRIPTOR const *__pyx_v_pAllocateArray) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuArrayCreate_v2", 1);
  __Pyx_TraceCall("_cuArrayCreate_v2", __pyx_f[0], 5141, 1, __PYX_ERR(0, 5141, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5142
 * 
 * cdef CUresult _cuArrayCreate_v2(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuArrayCreate_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuArrayCreate_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5143
 * cdef CUresult _cuArrayCreate_v2(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuArrayCreate_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuArrayCreate_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5143, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5144
 *     global __cuArrayCreate_v2
 *     cuPythonInit()
 *     if __cuArrayCreate_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArrayCreate_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuArrayCreate_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5145
 *     cuPythonInit()
 *     if __cuArrayCreate_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuArrayCreate_v2" not found')
 *     err = (<CUresult (*)(CUarray*, const CUDA_ARRAY_DESCRIPTOR*) nogil> __cuArrayCreate_v2)(pHandle, pAllocateArray)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5146
 *     if __cuArrayCreate_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuArrayCreate_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray*, const CUDA_ARRAY_DESCRIPTOR*) nogil> __cuArrayCreate_v2)(pHandle, pAllocateArray)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__135, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5146, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5146, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5145
 *     cuPythonInit()
 *     if __cuArrayCreate_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuArrayCreate_v2" not found')
 *     err = (<CUresult (*)(CUarray*, const CUDA_ARRAY_DESCRIPTOR*) nogil> __cuArrayCreate_v2)(pHandle, pAllocateArray)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5144
 *     global __cuArrayCreate_v2
 *     cuPythonInit()
 *     if __cuArrayCreate_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArrayCreate_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5147
 *         with gil:
 *             raise RuntimeError('Function "cuArrayCreate_v2" not found')
 *     err = (<CUresult (*)(CUarray*, const CUDA_ARRAY_DESCRIPTOR*) nogil> __cuArrayCreate_v2)(pHandle, pAllocateArray)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUarray *, CUDA_ARRAY_DESCRIPTOR const *))__pyx_v_4cuda_5_cuda_5ccuda___cuArrayCreate_v2)(__pyx_v_pHandle, __pyx_v_pAllocateArray);

    /* "cuda/_cuda/ccuda.pyx":5148
 *             raise RuntimeError('Function "cuArrayCreate_v2" not found')
 *     err = (<CUresult (*)(CUarray*, const CUDA_ARRAY_DESCRIPTOR*) nogil> __cuArrayCreate_v2)(pHandle, pAllocateArray)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuArrayGetDescriptor_v2(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5142
 * 
 * cdef CUresult _cuArrayCreate_v2(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuArrayCreate_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuArrayCreate_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5141
 *     return err
 * 
 * cdef CUresult _cuArrayCreate_v2(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuArrayCreate_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuArrayCreate_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5150
 *     return err
 * 
 * cdef CUresult _cuArrayGetDescriptor_v2(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuArrayGetDescriptor_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetDescriptor_v2(CUDA_ARRAY_DESCRIPTOR *__pyx_v_pArrayDescriptor, CUarray __pyx_v_hArray) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuArrayGetDescriptor_v2", 1);
  __Pyx_TraceCall("_cuArrayGetDescriptor_v2", __pyx_f[0], 5150, 1, __PYX_ERR(0, 5150, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5151
 * 
 * cdef CUresult _cuArrayGetDescriptor_v2(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuArrayGetDescriptor_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuArrayGetDescriptor_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5152
 * cdef CUresult _cuArrayGetDescriptor_v2(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuArrayGetDescriptor_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuArrayGetDescriptor_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5152, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5153
 *     global __cuArrayGetDescriptor_v2
 *     cuPythonInit()
 *     if __cuArrayGetDescriptor_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetDescriptor_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetDescriptor_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5154
 *     cuPythonInit()
 *     if __cuArrayGetDescriptor_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuArrayGetDescriptor_v2" not found')
 *     err = (<CUresult (*)(CUDA_ARRAY_DESCRIPTOR*, CUarray) nogil> __cuArrayGetDescriptor_v2)(pArrayDescriptor, hArray)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5155
 *     if __cuArrayGetDescriptor_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetDescriptor_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUDA_ARRAY_DESCRIPTOR*, CUarray) nogil> __cuArrayGetDescriptor_v2)(pArrayDescriptor, hArray)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__136, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5155, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5155, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5154
 *     cuPythonInit()
 *     if __cuArrayGetDescriptor_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuArrayGetDescriptor_v2" not found')
 *     err = (<CUresult (*)(CUDA_ARRAY_DESCRIPTOR*, CUarray) nogil> __cuArrayGetDescriptor_v2)(pArrayDescriptor, hArray)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5153
 *     global __cuArrayGetDescriptor_v2
 *     cuPythonInit()
 *     if __cuArrayGetDescriptor_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetDescriptor_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5156
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetDescriptor_v2" not found')
 *     err = (<CUresult (*)(CUDA_ARRAY_DESCRIPTOR*, CUarray) nogil> __cuArrayGetDescriptor_v2)(pArrayDescriptor, hArray)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUDA_ARRAY_DESCRIPTOR *, CUarray))__pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetDescriptor_v2)(__pyx_v_pArrayDescriptor, __pyx_v_hArray);

    /* "cuda/_cuda/ccuda.pyx":5157
 *             raise RuntimeError('Function "cuArrayGetDescriptor_v2" not found')
 *     err = (<CUresult (*)(CUDA_ARRAY_DESCRIPTOR*, CUarray) nogil> __cuArrayGetDescriptor_v2)(pArrayDescriptor, hArray)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5151
 * 
 * cdef CUresult _cuArrayGetDescriptor_v2(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuArrayGetDescriptor_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuArrayGetDescriptor_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5150
 *     return err
 * 
 * cdef CUresult _cuArrayGetDescriptor_v2(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuArrayGetDescriptor_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuArrayGetDescriptor_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5159
 *     return err
 * 
 * cdef CUresult _cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuArrayGetSparseProperties
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES *__pyx_v_sparseProperties, CUarray __pyx_v_array) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuArrayGetSparseProperties", 1);
  __Pyx_TraceCall("_cuArrayGetSparseProperties", __pyx_f[0], 5159, 1, __PYX_ERR(0, 5159, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5160
 * 
 * cdef CUresult _cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuArrayGetSparseProperties             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuArrayGetSparseProperties == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5161
 * cdef CUresult _cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuArrayGetSparseProperties
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuArrayGetSparseProperties == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5161, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5162
 *     global __cuArrayGetSparseProperties
 *     cuPythonInit()
 *     if __cuArrayGetSparseProperties == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetSparseProperties" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetSparseProperties == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5163
 *     cuPythonInit()
 *     if __cuArrayGetSparseProperties == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuArrayGetSparseProperties" not found')
 *     err = (<CUresult (*)(CUDA_ARRAY_SPARSE_PROPERTIES*, CUarray) nogil> __cuArrayGetSparseProperties)(sparseProperties, array)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5164
 *     if __cuArrayGetSparseProperties == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetSparseProperties" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUDA_ARRAY_SPARSE_PROPERTIES*, CUarray) nogil> __cuArrayGetSparseProperties)(sparseProperties, array)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__137, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5164, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5164, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5163
 *     cuPythonInit()
 *     if __cuArrayGetSparseProperties == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuArrayGetSparseProperties" not found')
 *     err = (<CUresult (*)(CUDA_ARRAY_SPARSE_PROPERTIES*, CUarray) nogil> __cuArrayGetSparseProperties)(sparseProperties, array)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5162
 *     global __cuArrayGetSparseProperties
 *     cuPythonInit()
 *     if __cuArrayGetSparseProperties == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetSparseProperties" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5165
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetSparseProperties" not found')
 *     err = (<CUresult (*)(CUDA_ARRAY_SPARSE_PROPERTIES*, CUarray) nogil> __cuArrayGetSparseProperties)(sparseProperties, array)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUDA_ARRAY_SPARSE_PROPERTIES *, CUarray))__pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetSparseProperties)(__pyx_v_sparseProperties, __pyx_v_array);

    /* "cuda/_cuda/ccuda.pyx":5166
 *             raise RuntimeError('Function "cuArrayGetSparseProperties" not found')
 *     err = (<CUresult (*)(CUDA_ARRAY_SPARSE_PROPERTIES*, CUarray) nogil> __cuArrayGetSparseProperties)(sparseProperties, array)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5160
 * 
 * cdef CUresult _cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuArrayGetSparseProperties             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuArrayGetSparseProperties == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5159
 *     return err
 * 
 * cdef CUresult _cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuArrayGetSparseProperties
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuArrayGetSparseProperties", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5168
 *     return err
 * 
 * cdef CUresult _cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMipmappedArrayGetSparseProperties
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES *__pyx_v_sparseProperties, CUmipmappedArray __pyx_v_mipmap) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMipmappedArrayGetSparseProperties", 1);
  __Pyx_TraceCall("_cuMipmappedArrayGetSparseProperties", __pyx_f[0], 5168, 1, __PYX_ERR(0, 5168, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5169
 * 
 * cdef CUresult _cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMipmappedArrayGetSparseProperties             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMipmappedArrayGetSparseProperties == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5170
 * cdef CUresult _cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMipmappedArrayGetSparseProperties
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMipmappedArrayGetSparseProperties == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5170, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5171
 *     global __cuMipmappedArrayGetSparseProperties
 *     cuPythonInit()
 *     if __cuMipmappedArrayGetSparseProperties == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayGetSparseProperties" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetSparseProperties == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5172
 *     cuPythonInit()
 *     if __cuMipmappedArrayGetSparseProperties == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMipmappedArrayGetSparseProperties" not found')
 *     err = (<CUresult (*)(CUDA_ARRAY_SPARSE_PROPERTIES*, CUmipmappedArray) nogil> __cuMipmappedArrayGetSparseProperties)(sparseProperties, mipmap)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5173
 *     if __cuMipmappedArrayGetSparseProperties == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayGetSparseProperties" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUDA_ARRAY_SPARSE_PROPERTIES*, CUmipmappedArray) nogil> __cuMipmappedArrayGetSparseProperties)(sparseProperties, mipmap)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__138, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5173, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5173, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5172
 *     cuPythonInit()
 *     if __cuMipmappedArrayGetSparseProperties == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMipmappedArrayGetSparseProperties" not found')
 *     err = (<CUresult (*)(CUDA_ARRAY_SPARSE_PROPERTIES*, CUmipmappedArray) nogil> __cuMipmappedArrayGetSparseProperties)(sparseProperties, mipmap)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5171
 *     global __cuMipmappedArrayGetSparseProperties
 *     cuPythonInit()
 *     if __cuMipmappedArrayGetSparseProperties == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayGetSparseProperties" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5174
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayGetSparseProperties" not found')
 *     err = (<CUresult (*)(CUDA_ARRAY_SPARSE_PROPERTIES*, CUmipmappedArray) nogil> __cuMipmappedArrayGetSparseProperties)(sparseProperties, mipmap)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUDA_ARRAY_SPARSE_PROPERTIES *, CUmipmappedArray))__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetSparseProperties)(__pyx_v_sparseProperties, __pyx_v_mipmap);

    /* "cuda/_cuda/ccuda.pyx":5175
 *             raise RuntimeError('Function "cuMipmappedArrayGetSparseProperties" not found')
 *     err = (<CUresult (*)(CUDA_ARRAY_SPARSE_PROPERTIES*, CUmipmappedArray) nogil> __cuMipmappedArrayGetSparseProperties)(sparseProperties, mipmap)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5169
 * 
 * cdef CUresult _cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMipmappedArrayGetSparseProperties             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMipmappedArrayGetSparseProperties == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5168
 *     return err
 * 
 * cdef CUresult _cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMipmappedArrayGetSparseProperties
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMipmappedArrayGetSparseProperties", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5177
 *     return err
 * 
 * cdef CUresult _cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuArrayGetMemoryRequirements
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS *__pyx_v_memoryRequirements, CUarray __pyx_v_array, CUdevice __pyx_v_device) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuArrayGetMemoryRequirements", 1);
  __Pyx_TraceCall("_cuArrayGetMemoryRequirements", __pyx_f[0], 5177, 1, __PYX_ERR(0, 5177, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5178
 * 
 * cdef CUresult _cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuArrayGetMemoryRequirements             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuArrayGetMemoryRequirements == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5179
 * cdef CUresult _cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuArrayGetMemoryRequirements
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuArrayGetMemoryRequirements == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5179, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5180
 *     global __cuArrayGetMemoryRequirements
 *     cuPythonInit()
 *     if __cuArrayGetMemoryRequirements == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetMemoryRequirements" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetMemoryRequirements == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5181
 *     cuPythonInit()
 *     if __cuArrayGetMemoryRequirements == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuArrayGetMemoryRequirements" not found')
 *     err = (<CUresult (*)(CUDA_ARRAY_MEMORY_REQUIREMENTS*, CUarray, CUdevice) nogil> __cuArrayGetMemoryRequirements)(memoryRequirements, array, device)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5182
 *     if __cuArrayGetMemoryRequirements == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetMemoryRequirements" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUDA_ARRAY_MEMORY_REQUIREMENTS*, CUarray, CUdevice) nogil> __cuArrayGetMemoryRequirements)(memoryRequirements, array, device)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__139, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5182, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5182, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5181
 *     cuPythonInit()
 *     if __cuArrayGetMemoryRequirements == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuArrayGetMemoryRequirements" not found')
 *     err = (<CUresult (*)(CUDA_ARRAY_MEMORY_REQUIREMENTS*, CUarray, CUdevice) nogil> __cuArrayGetMemoryRequirements)(memoryRequirements, array, device)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5180
 *     global __cuArrayGetMemoryRequirements
 *     cuPythonInit()
 *     if __cuArrayGetMemoryRequirements == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetMemoryRequirements" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5183
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetMemoryRequirements" not found')
 *     err = (<CUresult (*)(CUDA_ARRAY_MEMORY_REQUIREMENTS*, CUarray, CUdevice) nogil> __cuArrayGetMemoryRequirements)(memoryRequirements, array, device)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUDA_ARRAY_MEMORY_REQUIREMENTS *, CUarray, CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetMemoryRequirements)(__pyx_v_memoryRequirements, __pyx_v_array, __pyx_v_device);

    /* "cuda/_cuda/ccuda.pyx":5184
 *             raise RuntimeError('Function "cuArrayGetMemoryRequirements" not found')
 *     err = (<CUresult (*)(CUDA_ARRAY_MEMORY_REQUIREMENTS*, CUarray, CUdevice) nogil> __cuArrayGetMemoryRequirements)(memoryRequirements, array, device)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5178
 * 
 * cdef CUresult _cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuArrayGetMemoryRequirements             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuArrayGetMemoryRequirements == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5177
 *     return err
 * 
 * cdef CUresult _cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuArrayGetMemoryRequirements
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuArrayGetMemoryRequirements", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5186
 *     return err
 * 
 * cdef CUresult _cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMipmappedArrayGetMemoryRequirements
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS *__pyx_v_memoryRequirements, CUmipmappedArray __pyx_v_mipmap, CUdevice __pyx_v_device) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMipmappedArrayGetMemoryRequirements", 1);
  __Pyx_TraceCall("_cuMipmappedArrayGetMemoryRequirements", __pyx_f[0], 5186, 1, __PYX_ERR(0, 5186, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5187
 * 
 * cdef CUresult _cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMipmappedArrayGetMemoryRequirements             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMipmappedArrayGetMemoryRequirements == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5188
 * cdef CUresult _cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMipmappedArrayGetMemoryRequirements
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMipmappedArrayGetMemoryRequirements == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5188, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5189
 *     global __cuMipmappedArrayGetMemoryRequirements
 *     cuPythonInit()
 *     if __cuMipmappedArrayGetMemoryRequirements == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayGetMemoryRequirements" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetMemoryRequirements == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5190
 *     cuPythonInit()
 *     if __cuMipmappedArrayGetMemoryRequirements == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMipmappedArrayGetMemoryRequirements" not found')
 *     err = (<CUresult (*)(CUDA_ARRAY_MEMORY_REQUIREMENTS*, CUmipmappedArray, CUdevice) nogil> __cuMipmappedArrayGetMemoryRequirements)(memoryRequirements, mipmap, device)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5191
 *     if __cuMipmappedArrayGetMemoryRequirements == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayGetMemoryRequirements" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUDA_ARRAY_MEMORY_REQUIREMENTS*, CUmipmappedArray, CUdevice) nogil> __cuMipmappedArrayGetMemoryRequirements)(memoryRequirements, mipmap, device)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__140, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5191, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5191, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5190
 *     cuPythonInit()
 *     if __cuMipmappedArrayGetMemoryRequirements == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMipmappedArrayGetMemoryRequirements" not found')
 *     err = (<CUresult (*)(CUDA_ARRAY_MEMORY_REQUIREMENTS*, CUmipmappedArray, CUdevice) nogil> __cuMipmappedArrayGetMemoryRequirements)(memoryRequirements, mipmap, device)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5189
 *     global __cuMipmappedArrayGetMemoryRequirements
 *     cuPythonInit()
 *     if __cuMipmappedArrayGetMemoryRequirements == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayGetMemoryRequirements" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5192
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayGetMemoryRequirements" not found')
 *     err = (<CUresult (*)(CUDA_ARRAY_MEMORY_REQUIREMENTS*, CUmipmappedArray, CUdevice) nogil> __cuMipmappedArrayGetMemoryRequirements)(memoryRequirements, mipmap, device)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUDA_ARRAY_MEMORY_REQUIREMENTS *, CUmipmappedArray, CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetMemoryRequirements)(__pyx_v_memoryRequirements, __pyx_v_mipmap, __pyx_v_device);

    /* "cuda/_cuda/ccuda.pyx":5193
 *             raise RuntimeError('Function "cuMipmappedArrayGetMemoryRequirements" not found')
 *     err = (<CUresult (*)(CUDA_ARRAY_MEMORY_REQUIREMENTS*, CUmipmappedArray, CUdevice) nogil> __cuMipmappedArrayGetMemoryRequirements)(memoryRequirements, mipmap, device)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5187
 * 
 * cdef CUresult _cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMipmappedArrayGetMemoryRequirements             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMipmappedArrayGetMemoryRequirements == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5186
 *     return err
 * 
 * cdef CUresult _cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMipmappedArrayGetMemoryRequirements
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMipmappedArrayGetMemoryRequirements", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5195
 *     return err
 * 
 * cdef CUresult _cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuArrayGetPlane
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetPlane(CUarray *__pyx_v_pPlaneArray, CUarray __pyx_v_hArray, unsigned int __pyx_v_planeIdx) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuArrayGetPlane", 1);
  __Pyx_TraceCall("_cuArrayGetPlane", __pyx_f[0], 5195, 1, __PYX_ERR(0, 5195, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5196
 * 
 * cdef CUresult _cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuArrayGetPlane             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuArrayGetPlane == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5197
 * cdef CUresult _cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuArrayGetPlane
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuArrayGetPlane == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5197, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5198
 *     global __cuArrayGetPlane
 *     cuPythonInit()
 *     if __cuArrayGetPlane == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetPlane" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetPlane == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5199
 *     cuPythonInit()
 *     if __cuArrayGetPlane == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuArrayGetPlane" not found')
 *     err = (<CUresult (*)(CUarray*, CUarray, unsigned int) nogil> __cuArrayGetPlane)(pPlaneArray, hArray, planeIdx)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5200
 *     if __cuArrayGetPlane == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetPlane" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray*, CUarray, unsigned int) nogil> __cuArrayGetPlane)(pPlaneArray, hArray, planeIdx)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__141, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5200, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5200, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5199
 *     cuPythonInit()
 *     if __cuArrayGetPlane == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuArrayGetPlane" not found')
 *     err = (<CUresult (*)(CUarray*, CUarray, unsigned int) nogil> __cuArrayGetPlane)(pPlaneArray, hArray, planeIdx)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5198
 *     global __cuArrayGetPlane
 *     cuPythonInit()
 *     if __cuArrayGetPlane == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetPlane" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5201
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetPlane" not found')
 *     err = (<CUresult (*)(CUarray*, CUarray, unsigned int) nogil> __cuArrayGetPlane)(pPlaneArray, hArray, planeIdx)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUarray *, CUarray, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetPlane)(__pyx_v_pPlaneArray, __pyx_v_hArray, __pyx_v_planeIdx);

    /* "cuda/_cuda/ccuda.pyx":5202
 *             raise RuntimeError('Function "cuArrayGetPlane" not found')
 *     err = (<CUresult (*)(CUarray*, CUarray, unsigned int) nogil> __cuArrayGetPlane)(pPlaneArray, hArray, planeIdx)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuArrayDestroy(CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5196
 * 
 * cdef CUresult _cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuArrayGetPlane             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuArrayGetPlane == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5195
 *     return err
 * 
 * cdef CUresult _cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuArrayGetPlane
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuArrayGetPlane", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5204
 *     return err
 * 
 * cdef CUresult _cuArrayDestroy(CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuArrayDestroy
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuArrayDestroy(CUarray __pyx_v_hArray) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuArrayDestroy", 1);
  __Pyx_TraceCall("_cuArrayDestroy", __pyx_f[0], 5204, 1, __PYX_ERR(0, 5204, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5205
 * 
 * cdef CUresult _cuArrayDestroy(CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuArrayDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuArrayDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5206
 * cdef CUresult _cuArrayDestroy(CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuArrayDestroy
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuArrayDestroy == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5206, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5207
 *     global __cuArrayDestroy
 *     cuPythonInit()
 *     if __cuArrayDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArrayDestroy" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuArrayDestroy == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5208
 *     cuPythonInit()
 *     if __cuArrayDestroy == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuArrayDestroy" not found')
 *     err = (<CUresult (*)(CUarray) nogil> __cuArrayDestroy)(hArray)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5209
 *     if __cuArrayDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuArrayDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray) nogil> __cuArrayDestroy)(hArray)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__142, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5209, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5209, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5208
 *     cuPythonInit()
 *     if __cuArrayDestroy == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuArrayDestroy" not found')
 *     err = (<CUresult (*)(CUarray) nogil> __cuArrayDestroy)(hArray)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5207
 *     global __cuArrayDestroy
 *     cuPythonInit()
 *     if __cuArrayDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArrayDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5210
 *         with gil:
 *             raise RuntimeError('Function "cuArrayDestroy" not found')
 *     err = (<CUresult (*)(CUarray) nogil> __cuArrayDestroy)(hArray)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUarray))__pyx_v_4cuda_5_cuda_5ccuda___cuArrayDestroy)(__pyx_v_hArray);

    /* "cuda/_cuda/ccuda.pyx":5211
 *             raise RuntimeError('Function "cuArrayDestroy" not found')
 *     err = (<CUresult (*)(CUarray) nogil> __cuArrayDestroy)(hArray)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuArray3DCreate_v2(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5205
 * 
 * cdef CUresult _cuArrayDestroy(CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuArrayDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuArrayDestroy == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5204
 *     return err
 * 
 * cdef CUresult _cuArrayDestroy(CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuArrayDestroy
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuArrayDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5213
 *     return err
 * 
 * cdef CUresult _cuArray3DCreate_v2(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuArray3DCreate_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuArray3DCreate_v2(CUarray *__pyx_v_pHandle, CUDA_ARRAY3D_DESCRIPTOR const *__pyx_v_pAllocateArray) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuArray3DCreate_v2", 1);
  __Pyx_TraceCall("_cuArray3DCreate_v2", __pyx_f[0], 5213, 1, __PYX_ERR(0, 5213, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5214
 * 
 * cdef CUresult _cuArray3DCreate_v2(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuArray3DCreate_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuArray3DCreate_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5215
 * cdef CUresult _cuArray3DCreate_v2(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuArray3DCreate_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuArray3DCreate_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5215, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5216
 *     global __cuArray3DCreate_v2
 *     cuPythonInit()
 *     if __cuArray3DCreate_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArray3DCreate_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuArray3DCreate_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5217
 *     cuPythonInit()
 *     if __cuArray3DCreate_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuArray3DCreate_v2" not found')
 *     err = (<CUresult (*)(CUarray*, const CUDA_ARRAY3D_DESCRIPTOR*) nogil> __cuArray3DCreate_v2)(pHandle, pAllocateArray)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5218
 *     if __cuArray3DCreate_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuArray3DCreate_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray*, const CUDA_ARRAY3D_DESCRIPTOR*) nogil> __cuArray3DCreate_v2)(pHandle, pAllocateArray)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__143, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5218, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5218, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5217
 *     cuPythonInit()
 *     if __cuArray3DCreate_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuArray3DCreate_v2" not found')
 *     err = (<CUresult (*)(CUarray*, const CUDA_ARRAY3D_DESCRIPTOR*) nogil> __cuArray3DCreate_v2)(pHandle, pAllocateArray)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5216
 *     global __cuArray3DCreate_v2
 *     cuPythonInit()
 *     if __cuArray3DCreate_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArray3DCreate_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5219
 *         with gil:
 *             raise RuntimeError('Function "cuArray3DCreate_v2" not found')
 *     err = (<CUresult (*)(CUarray*, const CUDA_ARRAY3D_DESCRIPTOR*) nogil> __cuArray3DCreate_v2)(pHandle, pAllocateArray)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUarray *, CUDA_ARRAY3D_DESCRIPTOR const *))__pyx_v_4cuda_5_cuda_5ccuda___cuArray3DCreate_v2)(__pyx_v_pHandle, __pyx_v_pAllocateArray);

    /* "cuda/_cuda/ccuda.pyx":5220
 *             raise RuntimeError('Function "cuArray3DCreate_v2" not found')
 *     err = (<CUresult (*)(CUarray*, const CUDA_ARRAY3D_DESCRIPTOR*) nogil> __cuArray3DCreate_v2)(pHandle, pAllocateArray)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuArray3DGetDescriptor_v2(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5214
 * 
 * cdef CUresult _cuArray3DCreate_v2(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuArray3DCreate_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuArray3DCreate_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5213
 *     return err
 * 
 * cdef CUresult _cuArray3DCreate_v2(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuArray3DCreate_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuArray3DCreate_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5222
 *     return err
 * 
 * cdef CUresult _cuArray3DGetDescriptor_v2(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuArray3DGetDescriptor_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuArray3DGetDescriptor_v2(CUDA_ARRAY3D_DESCRIPTOR *__pyx_v_pArrayDescriptor, CUarray __pyx_v_hArray) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuArray3DGetDescriptor_v2", 1);
  __Pyx_TraceCall("_cuArray3DGetDescriptor_v2", __pyx_f[0], 5222, 1, __PYX_ERR(0, 5222, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5223
 * 
 * cdef CUresult _cuArray3DGetDescriptor_v2(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuArray3DGetDescriptor_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuArray3DGetDescriptor_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5224
 * cdef CUresult _cuArray3DGetDescriptor_v2(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuArray3DGetDescriptor_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuArray3DGetDescriptor_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5224, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5225
 *     global __cuArray3DGetDescriptor_v2
 *     cuPythonInit()
 *     if __cuArray3DGetDescriptor_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArray3DGetDescriptor_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuArray3DGetDescriptor_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5226
 *     cuPythonInit()
 *     if __cuArray3DGetDescriptor_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuArray3DGetDescriptor_v2" not found')
 *     err = (<CUresult (*)(CUDA_ARRAY3D_DESCRIPTOR*, CUarray) nogil> __cuArray3DGetDescriptor_v2)(pArrayDescriptor, hArray)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5227
 *     if __cuArray3DGetDescriptor_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuArray3DGetDescriptor_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUDA_ARRAY3D_DESCRIPTOR*, CUarray) nogil> __cuArray3DGetDescriptor_v2)(pArrayDescriptor, hArray)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__144, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5227, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5227, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5226
 *     cuPythonInit()
 *     if __cuArray3DGetDescriptor_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuArray3DGetDescriptor_v2" not found')
 *     err = (<CUresult (*)(CUDA_ARRAY3D_DESCRIPTOR*, CUarray) nogil> __cuArray3DGetDescriptor_v2)(pArrayDescriptor, hArray)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5225
 *     global __cuArray3DGetDescriptor_v2
 *     cuPythonInit()
 *     if __cuArray3DGetDescriptor_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArray3DGetDescriptor_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5228
 *         with gil:
 *             raise RuntimeError('Function "cuArray3DGetDescriptor_v2" not found')
 *     err = (<CUresult (*)(CUDA_ARRAY3D_DESCRIPTOR*, CUarray) nogil> __cuArray3DGetDescriptor_v2)(pArrayDescriptor, hArray)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUDA_ARRAY3D_DESCRIPTOR *, CUarray))__pyx_v_4cuda_5_cuda_5ccuda___cuArray3DGetDescriptor_v2)(__pyx_v_pArrayDescriptor, __pyx_v_hArray);

    /* "cuda/_cuda/ccuda.pyx":5229
 *             raise RuntimeError('Function "cuArray3DGetDescriptor_v2" not found')
 *     err = (<CUresult (*)(CUDA_ARRAY3D_DESCRIPTOR*, CUarray) nogil> __cuArray3DGetDescriptor_v2)(pArrayDescriptor, hArray)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5223
 * 
 * cdef CUresult _cuArray3DGetDescriptor_v2(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuArray3DGetDescriptor_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuArray3DGetDescriptor_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5222
 *     return err
 * 
 * cdef CUresult _cuArray3DGetDescriptor_v2(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuArray3DGetDescriptor_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuArray3DGetDescriptor_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5231
 *     return err
 * 
 * cdef CUresult _cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMipmappedArrayCreate
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayCreate(CUmipmappedArray *__pyx_v_pHandle, CUDA_ARRAY3D_DESCRIPTOR const *__pyx_v_pMipmappedArrayDesc, unsigned int __pyx_v_numMipmapLevels) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMipmappedArrayCreate", 1);
  __Pyx_TraceCall("_cuMipmappedArrayCreate", __pyx_f[0], 5231, 1, __PYX_ERR(0, 5231, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5232
 * 
 * cdef CUresult _cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMipmappedArrayCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMipmappedArrayCreate == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5233
 * cdef CUresult _cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMipmappedArrayCreate
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMipmappedArrayCreate == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5233, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5234
 *     global __cuMipmappedArrayCreate
 *     cuPythonInit()
 *     if __cuMipmappedArrayCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayCreate" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayCreate == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5235
 *     cuPythonInit()
 *     if __cuMipmappedArrayCreate == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMipmappedArrayCreate" not found')
 *     err = (<CUresult (*)(CUmipmappedArray*, const CUDA_ARRAY3D_DESCRIPTOR*, unsigned int) nogil> __cuMipmappedArrayCreate)(pHandle, pMipmappedArrayDesc, numMipmapLevels)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5236
 *     if __cuMipmappedArrayCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmipmappedArray*, const CUDA_ARRAY3D_DESCRIPTOR*, unsigned int) nogil> __cuMipmappedArrayCreate)(pHandle, pMipmappedArrayDesc, numMipmapLevels)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__145, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5236, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5236, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5235
 *     cuPythonInit()
 *     if __cuMipmappedArrayCreate == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMipmappedArrayCreate" not found')
 *     err = (<CUresult (*)(CUmipmappedArray*, const CUDA_ARRAY3D_DESCRIPTOR*, unsigned int) nogil> __cuMipmappedArrayCreate)(pHandle, pMipmappedArrayDesc, numMipmapLevels)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5234
 *     global __cuMipmappedArrayCreate
 *     cuPythonInit()
 *     if __cuMipmappedArrayCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5237
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayCreate" not found')
 *     err = (<CUresult (*)(CUmipmappedArray*, const CUDA_ARRAY3D_DESCRIPTOR*, unsigned int) nogil> __cuMipmappedArrayCreate)(pHandle, pMipmappedArrayDesc, numMipmapLevels)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmipmappedArray *, CUDA_ARRAY3D_DESCRIPTOR const *, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayCreate)(__pyx_v_pHandle, __pyx_v_pMipmappedArrayDesc, __pyx_v_numMipmapLevels);

    /* "cuda/_cuda/ccuda.pyx":5238
 *             raise RuntimeError('Function "cuMipmappedArrayCreate" not found')
 *     err = (<CUresult (*)(CUmipmappedArray*, const CUDA_ARRAY3D_DESCRIPTOR*, unsigned int) nogil> __cuMipmappedArrayCreate)(pHandle, pMipmappedArrayDesc, numMipmapLevels)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5232
 * 
 * cdef CUresult _cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMipmappedArrayCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMipmappedArrayCreate == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5231
 *     return err
 * 
 * cdef CUresult _cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMipmappedArrayCreate
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMipmappedArrayCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5240
 *     return err
 * 
 * cdef CUresult _cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMipmappedArrayGetLevel
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayGetLevel(CUarray *__pyx_v_pLevelArray, CUmipmappedArray __pyx_v_hMipmappedArray, unsigned int __pyx_v_level) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMipmappedArrayGetLevel", 1);
  __Pyx_TraceCall("_cuMipmappedArrayGetLevel", __pyx_f[0], 5240, 1, __PYX_ERR(0, 5240, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5241
 * 
 * cdef CUresult _cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMipmappedArrayGetLevel             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMipmappedArrayGetLevel == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5242
 * cdef CUresult _cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMipmappedArrayGetLevel
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMipmappedArrayGetLevel == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5242, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5243
 *     global __cuMipmappedArrayGetLevel
 *     cuPythonInit()
 *     if __cuMipmappedArrayGetLevel == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayGetLevel" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetLevel == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5244
 *     cuPythonInit()
 *     if __cuMipmappedArrayGetLevel == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMipmappedArrayGetLevel" not found')
 *     err = (<CUresult (*)(CUarray*, CUmipmappedArray, unsigned int) nogil> __cuMipmappedArrayGetLevel)(pLevelArray, hMipmappedArray, level)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5245
 *     if __cuMipmappedArrayGetLevel == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayGetLevel" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray*, CUmipmappedArray, unsigned int) nogil> __cuMipmappedArrayGetLevel)(pLevelArray, hMipmappedArray, level)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__146, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5245, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5245, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5244
 *     cuPythonInit()
 *     if __cuMipmappedArrayGetLevel == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMipmappedArrayGetLevel" not found')
 *     err = (<CUresult (*)(CUarray*, CUmipmappedArray, unsigned int) nogil> __cuMipmappedArrayGetLevel)(pLevelArray, hMipmappedArray, level)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5243
 *     global __cuMipmappedArrayGetLevel
 *     cuPythonInit()
 *     if __cuMipmappedArrayGetLevel == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayGetLevel" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5246
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayGetLevel" not found')
 *     err = (<CUresult (*)(CUarray*, CUmipmappedArray, unsigned int) nogil> __cuMipmappedArrayGetLevel)(pLevelArray, hMipmappedArray, level)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUarray *, CUmipmappedArray, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetLevel)(__pyx_v_pLevelArray, __pyx_v_hMipmappedArray, __pyx_v_level);

    /* "cuda/_cuda/ccuda.pyx":5247
 *             raise RuntimeError('Function "cuMipmappedArrayGetLevel" not found')
 *     err = (<CUresult (*)(CUarray*, CUmipmappedArray, unsigned int) nogil> __cuMipmappedArrayGetLevel)(pLevelArray, hMipmappedArray, level)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5241
 * 
 * cdef CUresult _cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMipmappedArrayGetLevel             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMipmappedArrayGetLevel == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5240
 *     return err
 * 
 * cdef CUresult _cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMipmappedArrayGetLevel
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMipmappedArrayGetLevel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5249
 *     return err
 * 
 * cdef CUresult _cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMipmappedArrayDestroy
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayDestroy(CUmipmappedArray __pyx_v_hMipmappedArray) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMipmappedArrayDestroy", 1);
  __Pyx_TraceCall("_cuMipmappedArrayDestroy", __pyx_f[0], 5249, 1, __PYX_ERR(0, 5249, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5250
 * 
 * cdef CUresult _cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMipmappedArrayDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMipmappedArrayDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5251
 * cdef CUresult _cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMipmappedArrayDestroy
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMipmappedArrayDestroy == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5251, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5252
 *     global __cuMipmappedArrayDestroy
 *     cuPythonInit()
 *     if __cuMipmappedArrayDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayDestroy" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayDestroy == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5253
 *     cuPythonInit()
 *     if __cuMipmappedArrayDestroy == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMipmappedArrayDestroy" not found')
 *     err = (<CUresult (*)(CUmipmappedArray) nogil> __cuMipmappedArrayDestroy)(hMipmappedArray)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5254
 *     if __cuMipmappedArrayDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmipmappedArray) nogil> __cuMipmappedArrayDestroy)(hMipmappedArray)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__147, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5254, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5254, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5253
 *     cuPythonInit()
 *     if __cuMipmappedArrayDestroy == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMipmappedArrayDestroy" not found')
 *     err = (<CUresult (*)(CUmipmappedArray) nogil> __cuMipmappedArrayDestroy)(hMipmappedArray)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5252
 *     global __cuMipmappedArrayDestroy
 *     cuPythonInit()
 *     if __cuMipmappedArrayDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5255
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayDestroy" not found')
 *     err = (<CUresult (*)(CUmipmappedArray) nogil> __cuMipmappedArrayDestroy)(hMipmappedArray)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmipmappedArray))__pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayDestroy)(__pyx_v_hMipmappedArray);

    /* "cuda/_cuda/ccuda.pyx":5256
 *             raise RuntimeError('Function "cuMipmappedArrayDestroy" not found')
 *     err = (<CUresult (*)(CUmipmappedArray) nogil> __cuMipmappedArrayDestroy)(hMipmappedArray)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5250
 * 
 * cdef CUresult _cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMipmappedArrayDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMipmappedArrayDestroy == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5249
 *     return err
 * 
 * cdef CUresult _cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMipmappedArrayDestroy
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMipmappedArrayDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5258
 *     return err
 * 
 * cdef CUresult _cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemGetHandleForAddressRange
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemGetHandleForAddressRange(void *__pyx_v_handle, CUdeviceptr __pyx_v_dptr, size_t __pyx_v_size, CUmemRangeHandleType __pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemGetHandleForAddressRange", 1);
  __Pyx_TraceCall("_cuMemGetHandleForAddressRange", __pyx_f[0], 5258, 1, __PYX_ERR(0, 5258, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5259
 * 
 * cdef CUresult _cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemGetHandleForAddressRange             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemGetHandleForAddressRange == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5260
 * cdef CUresult _cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemGetHandleForAddressRange
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemGetHandleForAddressRange == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5260, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5261
 *     global __cuMemGetHandleForAddressRange
 *     cuPythonInit()
 *     if __cuMemGetHandleForAddressRange == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetHandleForAddressRange" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetHandleForAddressRange == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5262
 *     cuPythonInit()
 *     if __cuMemGetHandleForAddressRange == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemGetHandleForAddressRange" not found')
 *     err = (<CUresult (*)(void*, CUdeviceptr, size_t, CUmemRangeHandleType, unsigned long long) nogil> __cuMemGetHandleForAddressRange)(handle, dptr, size, handleType, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5263
 *     if __cuMemGetHandleForAddressRange == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetHandleForAddressRange" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*, CUdeviceptr, size_t, CUmemRangeHandleType, unsigned long long) nogil> __cuMemGetHandleForAddressRange)(handle, dptr, size, handleType, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__148, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5263, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5263, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5262
 *     cuPythonInit()
 *     if __cuMemGetHandleForAddressRange == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemGetHandleForAddressRange" not found')
 *     err = (<CUresult (*)(void*, CUdeviceptr, size_t, CUmemRangeHandleType, unsigned long long) nogil> __cuMemGetHandleForAddressRange)(handle, dptr, size, handleType, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5261
 *     global __cuMemGetHandleForAddressRange
 *     cuPythonInit()
 *     if __cuMemGetHandleForAddressRange == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetHandleForAddressRange" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5264
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetHandleForAddressRange" not found')
 *     err = (<CUresult (*)(void*, CUdeviceptr, size_t, CUmemRangeHandleType, unsigned long long) nogil> __cuMemGetHandleForAddressRange)(handle, dptr, size, handleType, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(void *, CUdeviceptr, size_t, CUmemRangeHandleType, unsigned PY_LONG_LONG))__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetHandleForAddressRange)(__pyx_v_handle, __pyx_v_dptr, __pyx_v_size, __pyx_v_handleType, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":5265
 *             raise RuntimeError('Function "cuMemGetHandleForAddressRange" not found')
 *     err = (<CUresult (*)(void*, CUdeviceptr, size_t, CUmemRangeHandleType, unsigned long long) nogil> __cuMemGetHandleForAddressRange)(handle, dptr, size, handleType, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5259
 * 
 * cdef CUresult _cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemGetHandleForAddressRange             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemGetHandleForAddressRange == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5258
 *     return err
 * 
 * cdef CUresult _cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemGetHandleForAddressRange
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemGetHandleForAddressRange", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5267
 *     return err
 * 
 * cdef CUresult _cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemAddressReserve
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemAddressReserve(CUdeviceptr *__pyx_v_ptr, size_t __pyx_v_size, size_t __pyx_v_alignment, CUdeviceptr __pyx_v_addr, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemAddressReserve", 1);
  __Pyx_TraceCall("_cuMemAddressReserve", __pyx_f[0], 5267, 1, __PYX_ERR(0, 5267, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5268
 * 
 * cdef CUresult _cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAddressReserve             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemAddressReserve == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5269
 * cdef CUresult _cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAddressReserve
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemAddressReserve == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5269, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5270
 *     global __cuMemAddressReserve
 *     cuPythonInit()
 *     if __cuMemAddressReserve == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAddressReserve" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemAddressReserve == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5271
 *     cuPythonInit()
 *     if __cuMemAddressReserve == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemAddressReserve" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t, size_t, CUdeviceptr, unsigned long long) nogil> __cuMemAddressReserve)(ptr, size, alignment, addr, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5272
 *     if __cuMemAddressReserve == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemAddressReserve" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, size_t, size_t, CUdeviceptr, unsigned long long) nogil> __cuMemAddressReserve)(ptr, size, alignment, addr, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__149, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5272, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5272, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5271
 *     cuPythonInit()
 *     if __cuMemAddressReserve == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemAddressReserve" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t, size_t, CUdeviceptr, unsigned long long) nogil> __cuMemAddressReserve)(ptr, size, alignment, addr, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5270
 *     global __cuMemAddressReserve
 *     cuPythonInit()
 *     if __cuMemAddressReserve == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAddressReserve" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5273
 *         with gil:
 *             raise RuntimeError('Function "cuMemAddressReserve" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t, size_t, CUdeviceptr, unsigned long long) nogil> __cuMemAddressReserve)(ptr, size, alignment, addr, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr *, size_t, size_t, CUdeviceptr, unsigned PY_LONG_LONG))__pyx_v_4cuda_5_cuda_5ccuda___cuMemAddressReserve)(__pyx_v_ptr, __pyx_v_size, __pyx_v_alignment, __pyx_v_addr, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":5274
 *             raise RuntimeError('Function "cuMemAddressReserve" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t, size_t, CUdeviceptr, unsigned long long) nogil> __cuMemAddressReserve)(ptr, size, alignment, addr, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemAddressFree(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5268
 * 
 * cdef CUresult _cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAddressReserve             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemAddressReserve == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5267
 *     return err
 * 
 * cdef CUresult _cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemAddressReserve
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemAddressReserve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5276
 *     return err
 * 
 * cdef CUresult _cuMemAddressFree(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemAddressFree
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemAddressFree(CUdeviceptr __pyx_v_ptr, size_t __pyx_v_size) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemAddressFree", 1);
  __Pyx_TraceCall("_cuMemAddressFree", __pyx_f[0], 5276, 1, __PYX_ERR(0, 5276, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5277
 * 
 * cdef CUresult _cuMemAddressFree(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAddressFree             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemAddressFree == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5278
 * cdef CUresult _cuMemAddressFree(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAddressFree
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemAddressFree == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5278, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5279
 *     global __cuMemAddressFree
 *     cuPythonInit()
 *     if __cuMemAddressFree == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAddressFree" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemAddressFree == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5280
 *     cuPythonInit()
 *     if __cuMemAddressFree == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemAddressFree" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t) nogil> __cuMemAddressFree)(ptr, size)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5281
 *     if __cuMemAddressFree == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemAddressFree" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t) nogil> __cuMemAddressFree)(ptr, size)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__150, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5281, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5281, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5280
 *     cuPythonInit()
 *     if __cuMemAddressFree == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemAddressFree" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t) nogil> __cuMemAddressFree)(ptr, size)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5279
 *     global __cuMemAddressFree
 *     cuPythonInit()
 *     if __cuMemAddressFree == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAddressFree" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5282
 *         with gil:
 *             raise RuntimeError('Function "cuMemAddressFree" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t) nogil> __cuMemAddressFree)(ptr, size)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemAddressFree)(__pyx_v_ptr, __pyx_v_size);

    /* "cuda/_cuda/ccuda.pyx":5283
 *             raise RuntimeError('Function "cuMemAddressFree" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t) nogil> __cuMemAddressFree)(ptr, size)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5277
 * 
 * cdef CUresult _cuMemAddressFree(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAddressFree             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemAddressFree == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5276
 *     return err
 * 
 * cdef CUresult _cuMemAddressFree(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemAddressFree
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemAddressFree", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5285
 *     return err
 * 
 * cdef CUresult _cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemCreate
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemCreate(CUmemGenericAllocationHandle *__pyx_v_handle, size_t __pyx_v_size, CUmemAllocationProp const *__pyx_v_prop, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemCreate", 1);
  __Pyx_TraceCall("_cuMemCreate", __pyx_f[0], 5285, 1, __PYX_ERR(0, 5285, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5286
 * 
 * cdef CUresult _cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemCreate == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5287
 * cdef CUresult _cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemCreate
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemCreate == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5287, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5288
 *     global __cuMemCreate
 *     cuPythonInit()
 *     if __cuMemCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemCreate" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemCreate == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5289
 *     cuPythonInit()
 *     if __cuMemCreate == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemCreate" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, size_t, const CUmemAllocationProp*, unsigned long long) nogil> __cuMemCreate)(handle, size, prop, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5290
 *     if __cuMemCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, size_t, const CUmemAllocationProp*, unsigned long long) nogil> __cuMemCreate)(handle, size, prop, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__151, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5290, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5290, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5289
 *     cuPythonInit()
 *     if __cuMemCreate == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemCreate" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, size_t, const CUmemAllocationProp*, unsigned long long) nogil> __cuMemCreate)(handle, size, prop, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5288
 *     global __cuMemCreate
 *     cuPythonInit()
 *     if __cuMemCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5291
 *         with gil:
 *             raise RuntimeError('Function "cuMemCreate" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, size_t, const CUmemAllocationProp*, unsigned long long) nogil> __cuMemCreate)(handle, size, prop, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmemGenericAllocationHandle *, size_t, CUmemAllocationProp const *, unsigned PY_LONG_LONG))__pyx_v_4cuda_5_cuda_5ccuda___cuMemCreate)(__pyx_v_handle, __pyx_v_size, __pyx_v_prop, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":5292
 *             raise RuntimeError('Function "cuMemCreate" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, size_t, const CUmemAllocationProp*, unsigned long long) nogil> __cuMemCreate)(handle, size, prop, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemRelease(CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5286
 * 
 * cdef CUresult _cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemCreate == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5285
 *     return err
 * 
 * cdef CUresult _cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemCreate
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5294
 *     return err
 * 
 * cdef CUresult _cuMemRelease(CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemRelease
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemRelease(CUmemGenericAllocationHandle __pyx_v_handle) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemRelease", 1);
  __Pyx_TraceCall("_cuMemRelease", __pyx_f[0], 5294, 1, __PYX_ERR(0, 5294, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5295
 * 
 * cdef CUresult _cuMemRelease(CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemRelease             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemRelease == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5296
 * cdef CUresult _cuMemRelease(CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemRelease
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemRelease == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5296, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5297
 *     global __cuMemRelease
 *     cuPythonInit()
 *     if __cuMemRelease == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemRelease" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemRelease == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5298
 *     cuPythonInit()
 *     if __cuMemRelease == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemRelease" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle) nogil> __cuMemRelease)(handle)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5299
 *     if __cuMemRelease == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemRelease" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle) nogil> __cuMemRelease)(handle)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__152, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5299, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5299, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5298
 *     cuPythonInit()
 *     if __cuMemRelease == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemRelease" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle) nogil> __cuMemRelease)(handle)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5297
 *     global __cuMemRelease
 *     cuPythonInit()
 *     if __cuMemRelease == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemRelease" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5300
 *         with gil:
 *             raise RuntimeError('Function "cuMemRelease" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle) nogil> __cuMemRelease)(handle)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmemGenericAllocationHandle))__pyx_v_4cuda_5_cuda_5ccuda___cuMemRelease)(__pyx_v_handle);

    /* "cuda/_cuda/ccuda.pyx":5301
 *             raise RuntimeError('Function "cuMemRelease" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle) nogil> __cuMemRelease)(handle)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5295
 * 
 * cdef CUresult _cuMemRelease(CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemRelease             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemRelease == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5294
 *     return err
 * 
 * cdef CUresult _cuMemRelease(CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemRelease
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemRelease", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5303
 *     return err
 * 
 * cdef CUresult _cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemMap
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemMap(CUdeviceptr __pyx_v_ptr, size_t __pyx_v_size, size_t __pyx_v_offset, CUmemGenericAllocationHandle __pyx_v_handle, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemMap", 1);
  __Pyx_TraceCall("_cuMemMap", __pyx_f[0], 5303, 1, __PYX_ERR(0, 5303, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5304
 * 
 * cdef CUresult _cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemMap             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemMap == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5305
 * cdef CUresult _cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemMap
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemMap == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5305, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5306
 *     global __cuMemMap
 *     cuPythonInit()
 *     if __cuMemMap == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemMap" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemMap == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5307
 *     cuPythonInit()
 *     if __cuMemMap == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemMap" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, size_t, CUmemGenericAllocationHandle, unsigned long long) nogil> __cuMemMap)(ptr, size, offset, handle, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5308
 *     if __cuMemMap == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemMap" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t, size_t, CUmemGenericAllocationHandle, unsigned long long) nogil> __cuMemMap)(ptr, size, offset, handle, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__153, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5308, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5308, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5307
 *     cuPythonInit()
 *     if __cuMemMap == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemMap" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, size_t, CUmemGenericAllocationHandle, unsigned long long) nogil> __cuMemMap)(ptr, size, offset, handle, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5306
 *     global __cuMemMap
 *     cuPythonInit()
 *     if __cuMemMap == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemMap" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5309
 *         with gil:
 *             raise RuntimeError('Function "cuMemMap" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, size_t, CUmemGenericAllocationHandle, unsigned long long) nogil> __cuMemMap)(ptr, size, offset, handle, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, size_t, size_t, CUmemGenericAllocationHandle, unsigned PY_LONG_LONG))__pyx_v_4cuda_5_cuda_5ccuda___cuMemMap)(__pyx_v_ptr, __pyx_v_size, __pyx_v_offset, __pyx_v_handle, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":5310
 *             raise RuntimeError('Function "cuMemMap" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, size_t, CUmemGenericAllocationHandle, unsigned long long) nogil> __cuMemMap)(ptr, size, offset, handle, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5304
 * 
 * cdef CUresult _cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemMap             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemMap == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5303
 *     return err
 * 
 * cdef CUresult _cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemMap
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemMap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5312
 *     return err
 * 
 * cdef CUresult _cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemMapArrayAsync
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemMapArrayAsync(CUarrayMapInfo *__pyx_v_mapInfoList, unsigned int __pyx_v_count, CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemMapArrayAsync", 1);
  __Pyx_TraceCall("_cuMemMapArrayAsync", __pyx_f[0], 5312, 1, __PYX_ERR(0, 5312, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5313
 * 
 * cdef CUresult _cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemMapArrayAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemMapArrayAsync == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5314
 * cdef CUresult _cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemMapArrayAsync
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemMapArrayAsync == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5314, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5315
 *     global __cuMemMapArrayAsync
 *     cuPythonInit()
 *     if __cuMemMapArrayAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemMapArrayAsync" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemMapArrayAsync == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5316
 *     cuPythonInit()
 *     if __cuMemMapArrayAsync == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemMapArrayAsync" not found')
 *     err = (<CUresult (*)(CUarrayMapInfo*, unsigned int, CUstream) nogil> __cuMemMapArrayAsync)(mapInfoList, count, hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5317
 *     if __cuMemMapArrayAsync == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemMapArrayAsync" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarrayMapInfo*, unsigned int, CUstream) nogil> __cuMemMapArrayAsync)(mapInfoList, count, hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__154, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5317, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5317, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5316
 *     cuPythonInit()
 *     if __cuMemMapArrayAsync == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemMapArrayAsync" not found')
 *     err = (<CUresult (*)(CUarrayMapInfo*, unsigned int, CUstream) nogil> __cuMemMapArrayAsync)(mapInfoList, count, hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5315
 *     global __cuMemMapArrayAsync
 *     cuPythonInit()
 *     if __cuMemMapArrayAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemMapArrayAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5318
 *         with gil:
 *             raise RuntimeError('Function "cuMemMapArrayAsync" not found')
 *     err = (<CUresult (*)(CUarrayMapInfo*, unsigned int, CUstream) nogil> __cuMemMapArrayAsync)(mapInfoList, count, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUarrayMapInfo *, unsigned int, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemMapArrayAsync)(__pyx_v_mapInfoList, __pyx_v_count, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":5319
 *             raise RuntimeError('Function "cuMemMapArrayAsync" not found')
 *     err = (<CUresult (*)(CUarrayMapInfo*, unsigned int, CUstream) nogil> __cuMemMapArrayAsync)(mapInfoList, count, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemUnmap(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5313
 * 
 * cdef CUresult _cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemMapArrayAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemMapArrayAsync == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5312
 *     return err
 * 
 * cdef CUresult _cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemMapArrayAsync
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemMapArrayAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5321
 *     return err
 * 
 * cdef CUresult _cuMemUnmap(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemUnmap
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemUnmap(CUdeviceptr __pyx_v_ptr, size_t __pyx_v_size) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemUnmap", 1);
  __Pyx_TraceCall("_cuMemUnmap", __pyx_f[0], 5321, 1, __PYX_ERR(0, 5321, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5322
 * 
 * cdef CUresult _cuMemUnmap(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemUnmap             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemUnmap == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5323
 * cdef CUresult _cuMemUnmap(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemUnmap
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemUnmap == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5323, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5324
 *     global __cuMemUnmap
 *     cuPythonInit()
 *     if __cuMemUnmap == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemUnmap" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemUnmap == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5325
 *     cuPythonInit()
 *     if __cuMemUnmap == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemUnmap" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t) nogil> __cuMemUnmap)(ptr, size)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5326
 *     if __cuMemUnmap == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemUnmap" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t) nogil> __cuMemUnmap)(ptr, size)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__155, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5326, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5326, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5325
 *     cuPythonInit()
 *     if __cuMemUnmap == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemUnmap" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t) nogil> __cuMemUnmap)(ptr, size)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5324
 *     global __cuMemUnmap
 *     cuPythonInit()
 *     if __cuMemUnmap == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemUnmap" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5327
 *         with gil:
 *             raise RuntimeError('Function "cuMemUnmap" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t) nogil> __cuMemUnmap)(ptr, size)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemUnmap)(__pyx_v_ptr, __pyx_v_size);

    /* "cuda/_cuda/ccuda.pyx":5328
 *             raise RuntimeError('Function "cuMemUnmap" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t) nogil> __cuMemUnmap)(ptr, size)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5322
 * 
 * cdef CUresult _cuMemUnmap(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemUnmap             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemUnmap == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5321
 *     return err
 * 
 * cdef CUresult _cuMemUnmap(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemUnmap
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemUnmap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5330
 *     return err
 * 
 * cdef CUresult _cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemSetAccess
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemSetAccess(CUdeviceptr __pyx_v_ptr, size_t __pyx_v_size, CUmemAccessDesc const *__pyx_v_desc, size_t __pyx_v_count) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemSetAccess", 1);
  __Pyx_TraceCall("_cuMemSetAccess", __pyx_f[0], 5330, 1, __PYX_ERR(0, 5330, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5331
 * 
 * cdef CUresult _cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemSetAccess             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemSetAccess == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5332
 * cdef CUresult _cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemSetAccess
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemSetAccess == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5332, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5333
 *     global __cuMemSetAccess
 *     cuPythonInit()
 *     if __cuMemSetAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemSetAccess" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemSetAccess == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5334
 *     cuPythonInit()
 *     if __cuMemSetAccess == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemSetAccess" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, const CUmemAccessDesc*, size_t) nogil> __cuMemSetAccess)(ptr, size, desc, count)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5335
 *     if __cuMemSetAccess == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemSetAccess" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t, const CUmemAccessDesc*, size_t) nogil> __cuMemSetAccess)(ptr, size, desc, count)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__156, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5335, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5335, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5334
 *     cuPythonInit()
 *     if __cuMemSetAccess == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemSetAccess" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, const CUmemAccessDesc*, size_t) nogil> __cuMemSetAccess)(ptr, size, desc, count)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5333
 *     global __cuMemSetAccess
 *     cuPythonInit()
 *     if __cuMemSetAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemSetAccess" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5336
 *         with gil:
 *             raise RuntimeError('Function "cuMemSetAccess" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, const CUmemAccessDesc*, size_t) nogil> __cuMemSetAccess)(ptr, size, desc, count)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, size_t, CUmemAccessDesc const *, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemSetAccess)(__pyx_v_ptr, __pyx_v_size, __pyx_v_desc, __pyx_v_count);

    /* "cuda/_cuda/ccuda.pyx":5337
 *             raise RuntimeError('Function "cuMemSetAccess" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, const CUmemAccessDesc*, size_t) nogil> __cuMemSetAccess)(ptr, size, desc, count)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5331
 * 
 * cdef CUresult _cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemSetAccess             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemSetAccess == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5330
 *     return err
 * 
 * cdef CUresult _cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemSetAccess
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemSetAccess", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5339
 *     return err
 * 
 * cdef CUresult _cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemGetAccess
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAccess(unsigned PY_LONG_LONG *__pyx_v_flags, CUmemLocation const *__pyx_v_location, CUdeviceptr __pyx_v_ptr) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemGetAccess", 1);
  __Pyx_TraceCall("_cuMemGetAccess", __pyx_f[0], 5339, 1, __PYX_ERR(0, 5339, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5340
 * 
 * cdef CUresult _cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemGetAccess             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemGetAccess == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5341
 * cdef CUresult _cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemGetAccess
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemGetAccess == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5341, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5342
 *     global __cuMemGetAccess
 *     cuPythonInit()
 *     if __cuMemGetAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAccess" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAccess == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5343
 *     cuPythonInit()
 *     if __cuMemGetAccess == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemGetAccess" not found')
 *     err = (<CUresult (*)(unsigned long long*, const CUmemLocation*, CUdeviceptr) nogil> __cuMemGetAccess)(flags, location, ptr)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5344
 *     if __cuMemGetAccess == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAccess" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned long long*, const CUmemLocation*, CUdeviceptr) nogil> __cuMemGetAccess)(flags, location, ptr)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__157, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5344, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5344, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5343
 *     cuPythonInit()
 *     if __cuMemGetAccess == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemGetAccess" not found')
 *     err = (<CUresult (*)(unsigned long long*, const CUmemLocation*, CUdeviceptr) nogil> __cuMemGetAccess)(flags, location, ptr)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5342
 *     global __cuMemGetAccess
 *     cuPythonInit()
 *     if __cuMemGetAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAccess" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5345
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAccess" not found')
 *     err = (<CUresult (*)(unsigned long long*, const CUmemLocation*, CUdeviceptr) nogil> __cuMemGetAccess)(flags, location, ptr)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(unsigned PY_LONG_LONG *, CUmemLocation const *, CUdeviceptr))__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAccess)(__pyx_v_flags, __pyx_v_location, __pyx_v_ptr);

    /* "cuda/_cuda/ccuda.pyx":5346
 *             raise RuntimeError('Function "cuMemGetAccess" not found')
 *     err = (<CUresult (*)(unsigned long long*, const CUmemLocation*, CUdeviceptr) nogil> __cuMemGetAccess)(flags, location, ptr)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5340
 * 
 * cdef CUresult _cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemGetAccess             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemGetAccess == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5339
 *     return err
 * 
 * cdef CUresult _cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemGetAccess
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemGetAccess", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5348
 *     return err
 * 
 * cdef CUresult _cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemExportToShareableHandle
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemExportToShareableHandle(void *__pyx_v_shareableHandle, CUmemGenericAllocationHandle __pyx_v_handle, CUmemAllocationHandleType __pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemExportToShareableHandle", 1);
  __Pyx_TraceCall("_cuMemExportToShareableHandle", __pyx_f[0], 5348, 1, __PYX_ERR(0, 5348, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5349
 * 
 * cdef CUresult _cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemExportToShareableHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemExportToShareableHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5350
 * cdef CUresult _cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemExportToShareableHandle
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemExportToShareableHandle == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5350, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5351
 *     global __cuMemExportToShareableHandle
 *     cuPythonInit()
 *     if __cuMemExportToShareableHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemExportToShareableHandle" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemExportToShareableHandle == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5352
 *     cuPythonInit()
 *     if __cuMemExportToShareableHandle == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemExportToShareableHandle" not found')
 *     err = (<CUresult (*)(void*, CUmemGenericAllocationHandle, CUmemAllocationHandleType, unsigned long long) nogil> __cuMemExportToShareableHandle)(shareableHandle, handle, handleType, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5353
 *     if __cuMemExportToShareableHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemExportToShareableHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*, CUmemGenericAllocationHandle, CUmemAllocationHandleType, unsigned long long) nogil> __cuMemExportToShareableHandle)(shareableHandle, handle, handleType, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__158, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5353, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5353, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5352
 *     cuPythonInit()
 *     if __cuMemExportToShareableHandle == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemExportToShareableHandle" not found')
 *     err = (<CUresult (*)(void*, CUmemGenericAllocationHandle, CUmemAllocationHandleType, unsigned long long) nogil> __cuMemExportToShareableHandle)(shareableHandle, handle, handleType, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5351
 *     global __cuMemExportToShareableHandle
 *     cuPythonInit()
 *     if __cuMemExportToShareableHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemExportToShareableHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5354
 *         with gil:
 *             raise RuntimeError('Function "cuMemExportToShareableHandle" not found')
 *     err = (<CUresult (*)(void*, CUmemGenericAllocationHandle, CUmemAllocationHandleType, unsigned long long) nogil> __cuMemExportToShareableHandle)(shareableHandle, handle, handleType, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(void *, CUmemGenericAllocationHandle, CUmemAllocationHandleType, unsigned PY_LONG_LONG))__pyx_v_4cuda_5_cuda_5ccuda___cuMemExportToShareableHandle)(__pyx_v_shareableHandle, __pyx_v_handle, __pyx_v_handleType, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":5355
 *             raise RuntimeError('Function "cuMemExportToShareableHandle" not found')
 *     err = (<CUresult (*)(void*, CUmemGenericAllocationHandle, CUmemAllocationHandleType, unsigned long long) nogil> __cuMemExportToShareableHandle)(shareableHandle, handle, handleType, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5349
 * 
 * cdef CUresult _cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemExportToShareableHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemExportToShareableHandle == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5348
 *     return err
 * 
 * cdef CUresult _cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemExportToShareableHandle
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemExportToShareableHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5357
 *     return err
 * 
 * cdef CUresult _cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemImportFromShareableHandle
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemImportFromShareableHandle(CUmemGenericAllocationHandle *__pyx_v_handle, void *__pyx_v_osHandle, CUmemAllocationHandleType __pyx_v_shHandleType) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemImportFromShareableHandle", 1);
  __Pyx_TraceCall("_cuMemImportFromShareableHandle", __pyx_f[0], 5357, 1, __PYX_ERR(0, 5357, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5358
 * 
 * cdef CUresult _cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemImportFromShareableHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemImportFromShareableHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5359
 * cdef CUresult _cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemImportFromShareableHandle
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemImportFromShareableHandle == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5359, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5360
 *     global __cuMemImportFromShareableHandle
 *     cuPythonInit()
 *     if __cuMemImportFromShareableHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemImportFromShareableHandle" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemImportFromShareableHandle == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5361
 *     cuPythonInit()
 *     if __cuMemImportFromShareableHandle == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemImportFromShareableHandle" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, void*, CUmemAllocationHandleType) nogil> __cuMemImportFromShareableHandle)(handle, osHandle, shHandleType)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5362
 *     if __cuMemImportFromShareableHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemImportFromShareableHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, void*, CUmemAllocationHandleType) nogil> __cuMemImportFromShareableHandle)(handle, osHandle, shHandleType)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__159, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5362, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5362, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5361
 *     cuPythonInit()
 *     if __cuMemImportFromShareableHandle == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemImportFromShareableHandle" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, void*, CUmemAllocationHandleType) nogil> __cuMemImportFromShareableHandle)(handle, osHandle, shHandleType)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5360
 *     global __cuMemImportFromShareableHandle
 *     cuPythonInit()
 *     if __cuMemImportFromShareableHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemImportFromShareableHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5363
 *         with gil:
 *             raise RuntimeError('Function "cuMemImportFromShareableHandle" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, void*, CUmemAllocationHandleType) nogil> __cuMemImportFromShareableHandle)(handle, osHandle, shHandleType)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmemGenericAllocationHandle *, void *, CUmemAllocationHandleType))__pyx_v_4cuda_5_cuda_5ccuda___cuMemImportFromShareableHandle)(__pyx_v_handle, __pyx_v_osHandle, __pyx_v_shHandleType);

    /* "cuda/_cuda/ccuda.pyx":5364
 *             raise RuntimeError('Function "cuMemImportFromShareableHandle" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, void*, CUmemAllocationHandleType) nogil> __cuMemImportFromShareableHandle)(handle, osHandle, shHandleType)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5358
 * 
 * cdef CUresult _cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemImportFromShareableHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemImportFromShareableHandle == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5357
 *     return err
 * 
 * cdef CUresult _cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemImportFromShareableHandle
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemImportFromShareableHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5366
 *     return err
 * 
 * cdef CUresult _cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemGetAllocationGranularity
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAllocationGranularity(size_t *__pyx_v_granularity, CUmemAllocationProp const *__pyx_v_prop, CUmemAllocationGranularity_flags __pyx_v_option) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemGetAllocationGranularity", 1);
  __Pyx_TraceCall("_cuMemGetAllocationGranularity", __pyx_f[0], 5366, 1, __PYX_ERR(0, 5366, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5367
 * 
 * cdef CUresult _cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemGetAllocationGranularity             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemGetAllocationGranularity == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5368
 * cdef CUresult _cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemGetAllocationGranularity
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemGetAllocationGranularity == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5368, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5369
 *     global __cuMemGetAllocationGranularity
 *     cuPythonInit()
 *     if __cuMemGetAllocationGranularity == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAllocationGranularity" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAllocationGranularity == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5370
 *     cuPythonInit()
 *     if __cuMemGetAllocationGranularity == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemGetAllocationGranularity" not found')
 *     err = (<CUresult (*)(size_t*, const CUmemAllocationProp*, CUmemAllocationGranularity_flags) nogil> __cuMemGetAllocationGranularity)(granularity, prop, option)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5371
 *     if __cuMemGetAllocationGranularity == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAllocationGranularity" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(size_t*, const CUmemAllocationProp*, CUmemAllocationGranularity_flags) nogil> __cuMemGetAllocationGranularity)(granularity, prop, option)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__160, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5371, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5371, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5370
 *     cuPythonInit()
 *     if __cuMemGetAllocationGranularity == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemGetAllocationGranularity" not found')
 *     err = (<CUresult (*)(size_t*, const CUmemAllocationProp*, CUmemAllocationGranularity_flags) nogil> __cuMemGetAllocationGranularity)(granularity, prop, option)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5369
 *     global __cuMemGetAllocationGranularity
 *     cuPythonInit()
 *     if __cuMemGetAllocationGranularity == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAllocationGranularity" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5372
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAllocationGranularity" not found')
 *     err = (<CUresult (*)(size_t*, const CUmemAllocationProp*, CUmemAllocationGranularity_flags) nogil> __cuMemGetAllocationGranularity)(granularity, prop, option)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(size_t *, CUmemAllocationProp const *, CUmemAllocationGranularity_flags))__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAllocationGranularity)(__pyx_v_granularity, __pyx_v_prop, __pyx_v_option);

    /* "cuda/_cuda/ccuda.pyx":5373
 *             raise RuntimeError('Function "cuMemGetAllocationGranularity" not found')
 *     err = (<CUresult (*)(size_t*, const CUmemAllocationProp*, CUmemAllocationGranularity_flags) nogil> __cuMemGetAllocationGranularity)(granularity, prop, option)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5367
 * 
 * cdef CUresult _cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemGetAllocationGranularity             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemGetAllocationGranularity == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5366
 *     return err
 * 
 * cdef CUresult _cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemGetAllocationGranularity
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemGetAllocationGranularity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5375
 *     return err
 * 
 * cdef CUresult _cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemGetAllocationPropertiesFromHandle
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp *__pyx_v_prop, CUmemGenericAllocationHandle __pyx_v_handle) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemGetAllocationPropertiesFromHandle", 1);
  __Pyx_TraceCall("_cuMemGetAllocationPropertiesFromHandle", __pyx_f[0], 5375, 1, __PYX_ERR(0, 5375, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5376
 * 
 * cdef CUresult _cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemGetAllocationPropertiesFromHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemGetAllocationPropertiesFromHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5377
 * cdef CUresult _cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemGetAllocationPropertiesFromHandle
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemGetAllocationPropertiesFromHandle == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5377, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5378
 *     global __cuMemGetAllocationPropertiesFromHandle
 *     cuPythonInit()
 *     if __cuMemGetAllocationPropertiesFromHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAllocationPropertiesFromHandle" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAllocationPropertiesFromHandle == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5379
 *     cuPythonInit()
 *     if __cuMemGetAllocationPropertiesFromHandle == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemGetAllocationPropertiesFromHandle" not found')
 *     err = (<CUresult (*)(CUmemAllocationProp*, CUmemGenericAllocationHandle) nogil> __cuMemGetAllocationPropertiesFromHandle)(prop, handle)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5380
 *     if __cuMemGetAllocationPropertiesFromHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAllocationPropertiesFromHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemAllocationProp*, CUmemGenericAllocationHandle) nogil> __cuMemGetAllocationPropertiesFromHandle)(prop, handle)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__161, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5380, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5380, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5379
 *     cuPythonInit()
 *     if __cuMemGetAllocationPropertiesFromHandle == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemGetAllocationPropertiesFromHandle" not found')
 *     err = (<CUresult (*)(CUmemAllocationProp*, CUmemGenericAllocationHandle) nogil> __cuMemGetAllocationPropertiesFromHandle)(prop, handle)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5378
 *     global __cuMemGetAllocationPropertiesFromHandle
 *     cuPythonInit()
 *     if __cuMemGetAllocationPropertiesFromHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAllocationPropertiesFromHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5381
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAllocationPropertiesFromHandle" not found')
 *     err = (<CUresult (*)(CUmemAllocationProp*, CUmemGenericAllocationHandle) nogil> __cuMemGetAllocationPropertiesFromHandle)(prop, handle)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmemAllocationProp *, CUmemGenericAllocationHandle))__pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAllocationPropertiesFromHandle)(__pyx_v_prop, __pyx_v_handle);

    /* "cuda/_cuda/ccuda.pyx":5382
 *             raise RuntimeError('Function "cuMemGetAllocationPropertiesFromHandle" not found')
 *     err = (<CUresult (*)(CUmemAllocationProp*, CUmemGenericAllocationHandle) nogil> __cuMemGetAllocationPropertiesFromHandle)(prop, handle)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5376
 * 
 * cdef CUresult _cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemGetAllocationPropertiesFromHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemGetAllocationPropertiesFromHandle == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5375
 *     return err
 * 
 * cdef CUresult _cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemGetAllocationPropertiesFromHandle
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemGetAllocationPropertiesFromHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5384
 *     return err
 * 
 * cdef CUresult _cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemRetainAllocationHandle
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemRetainAllocationHandle(CUmemGenericAllocationHandle *__pyx_v_handle, void *__pyx_v_addr) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemRetainAllocationHandle", 1);
  __Pyx_TraceCall("_cuMemRetainAllocationHandle", __pyx_f[0], 5384, 1, __PYX_ERR(0, 5384, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5385
 * 
 * cdef CUresult _cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemRetainAllocationHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemRetainAllocationHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5386
 * cdef CUresult _cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemRetainAllocationHandle
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemRetainAllocationHandle == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5386, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5387
 *     global __cuMemRetainAllocationHandle
 *     cuPythonInit()
 *     if __cuMemRetainAllocationHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemRetainAllocationHandle" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemRetainAllocationHandle == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5388
 *     cuPythonInit()
 *     if __cuMemRetainAllocationHandle == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemRetainAllocationHandle" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, void*) nogil> __cuMemRetainAllocationHandle)(handle, addr)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5389
 *     if __cuMemRetainAllocationHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemRetainAllocationHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, void*) nogil> __cuMemRetainAllocationHandle)(handle, addr)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__162, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5389, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5389, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5388
 *     cuPythonInit()
 *     if __cuMemRetainAllocationHandle == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemRetainAllocationHandle" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, void*) nogil> __cuMemRetainAllocationHandle)(handle, addr)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5387
 *     global __cuMemRetainAllocationHandle
 *     cuPythonInit()
 *     if __cuMemRetainAllocationHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemRetainAllocationHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5390
 *         with gil:
 *             raise RuntimeError('Function "cuMemRetainAllocationHandle" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, void*) nogil> __cuMemRetainAllocationHandle)(handle, addr)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmemGenericAllocationHandle *, void *))__pyx_v_4cuda_5_cuda_5ccuda___cuMemRetainAllocationHandle)(__pyx_v_handle, __pyx_v_addr);

    /* "cuda/_cuda/ccuda.pyx":5391
 *             raise RuntimeError('Function "cuMemRetainAllocationHandle" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, void*) nogil> __cuMemRetainAllocationHandle)(handle, addr)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5385
 * 
 * cdef CUresult _cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemRetainAllocationHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemRetainAllocationHandle == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5384
 *     return err
 * 
 * cdef CUresult _cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemRetainAllocationHandle
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemRetainAllocationHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5393
 *     return err
 * 
 * cdef CUresult _cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemFreeAsync
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemFreeAsync(CUdeviceptr __pyx_v_dptr, CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemFreeAsync", 1);
  __Pyx_TraceCall("_cuMemFreeAsync", __pyx_f[0], 5393, 1, __PYX_ERR(0, 5393, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5394
 * 
 * cdef CUresult _cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemFreeAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemFreeAsync == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5395
 * cdef CUresult _cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemFreeAsync
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemFreeAsync == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5395, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5396
 *     global __cuMemFreeAsync
 *     cuPythonInit()
 *     if __cuMemFreeAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemFreeAsync" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemFreeAsync == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5397
 *     cuPythonInit()
 *     if __cuMemFreeAsync == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemFreeAsync" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUstream) nogil> __cuMemFreeAsync)(dptr, hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5398
 *     if __cuMemFreeAsync == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemFreeAsync" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, CUstream) nogil> __cuMemFreeAsync)(dptr, hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__163, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5398, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5398, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5397
 *     cuPythonInit()
 *     if __cuMemFreeAsync == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemFreeAsync" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUstream) nogil> __cuMemFreeAsync)(dptr, hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5396
 *     global __cuMemFreeAsync
 *     cuPythonInit()
 *     if __cuMemFreeAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemFreeAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5399
 *         with gil:
 *             raise RuntimeError('Function "cuMemFreeAsync" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUstream) nogil> __cuMemFreeAsync)(dptr, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemFreeAsync)(__pyx_v_dptr, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":5400
 *             raise RuntimeError('Function "cuMemFreeAsync" not found')
 *     err = (<CUresult (*)(CUdeviceptr, CUstream) nogil> __cuMemFreeAsync)(dptr, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5394
 * 
 * cdef CUresult _cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemFreeAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemFreeAsync == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5393
 *     return err
 * 
 * cdef CUresult _cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemFreeAsync
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemFreeAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5402
 *     return err
 * 
 * cdef CUresult _cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemAllocAsync
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocAsync(CUdeviceptr *__pyx_v_dptr, size_t __pyx_v_bytesize, CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemAllocAsync", 1);
  __Pyx_TraceCall("_cuMemAllocAsync", __pyx_f[0], 5402, 1, __PYX_ERR(0, 5402, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5403
 * 
 * cdef CUresult _cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAllocAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemAllocAsync == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5404
 * cdef CUresult _cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAllocAsync
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemAllocAsync == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5404, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5405
 *     global __cuMemAllocAsync
 *     cuPythonInit()
 *     if __cuMemAllocAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocAsync" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocAsync == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5406
 *     cuPythonInit()
 *     if __cuMemAllocAsync == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemAllocAsync" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t, CUstream) nogil> __cuMemAllocAsync)(dptr, bytesize, hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5407
 *     if __cuMemAllocAsync == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocAsync" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, size_t, CUstream) nogil> __cuMemAllocAsync)(dptr, bytesize, hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__164, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5407, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5407, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5406
 *     cuPythonInit()
 *     if __cuMemAllocAsync == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemAllocAsync" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t, CUstream) nogil> __cuMemAllocAsync)(dptr, bytesize, hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5405
 *     global __cuMemAllocAsync
 *     cuPythonInit()
 *     if __cuMemAllocAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5408
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocAsync" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t, CUstream) nogil> __cuMemAllocAsync)(dptr, bytesize, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr *, size_t, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocAsync)(__pyx_v_dptr, __pyx_v_bytesize, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":5409
 *             raise RuntimeError('Function "cuMemAllocAsync" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t, CUstream) nogil> __cuMemAllocAsync)(dptr, bytesize, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5403
 * 
 * cdef CUresult _cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAllocAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemAllocAsync == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5402
 *     return err
 * 
 * cdef CUresult _cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemAllocAsync
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemAllocAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5411
 *     return err
 * 
 * cdef CUresult _cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolTrimTo
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolTrimTo(CUmemoryPool __pyx_v_pool, size_t __pyx_v_minBytesToKeep) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemPoolTrimTo", 1);
  __Pyx_TraceCall("_cuMemPoolTrimTo", __pyx_f[0], 5411, 1, __PYX_ERR(0, 5411, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5412
 * 
 * cdef CUresult _cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolTrimTo             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolTrimTo == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5413
 * cdef CUresult _cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolTrimTo
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemPoolTrimTo == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5413, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5414
 *     global __cuMemPoolTrimTo
 *     cuPythonInit()
 *     if __cuMemPoolTrimTo == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolTrimTo" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolTrimTo == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5415
 *     cuPythonInit()
 *     if __cuMemPoolTrimTo == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemPoolTrimTo" not found')
 *     err = (<CUresult (*)(CUmemoryPool, size_t) nogil> __cuMemPoolTrimTo)(pool, minBytesToKeep)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5416
 *     if __cuMemPoolTrimTo == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolTrimTo" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool, size_t) nogil> __cuMemPoolTrimTo)(pool, minBytesToKeep)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__165, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5416, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5416, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5415
 *     cuPythonInit()
 *     if __cuMemPoolTrimTo == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemPoolTrimTo" not found')
 *     err = (<CUresult (*)(CUmemoryPool, size_t) nogil> __cuMemPoolTrimTo)(pool, minBytesToKeep)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5414
 *     global __cuMemPoolTrimTo
 *     cuPythonInit()
 *     if __cuMemPoolTrimTo == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolTrimTo" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5417
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolTrimTo" not found')
 *     err = (<CUresult (*)(CUmemoryPool, size_t) nogil> __cuMemPoolTrimTo)(pool, minBytesToKeep)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmemoryPool, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolTrimTo)(__pyx_v_pool, __pyx_v_minBytesToKeep);

    /* "cuda/_cuda/ccuda.pyx":5418
 *             raise RuntimeError('Function "cuMemPoolTrimTo" not found')
 *     err = (<CUresult (*)(CUmemoryPool, size_t) nogil> __cuMemPoolTrimTo)(pool, minBytesToKeep)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5412
 * 
 * cdef CUresult _cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolTrimTo             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolTrimTo == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5411
 *     return err
 * 
 * cdef CUresult _cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolTrimTo
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemPoolTrimTo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5420
 *     return err
 * 
 * cdef CUresult _cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolSetAttribute
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolSetAttribute(CUmemoryPool __pyx_v_pool, CUmemPool_attribute __pyx_v_attr, void *__pyx_v_value) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemPoolSetAttribute", 1);
  __Pyx_TraceCall("_cuMemPoolSetAttribute", __pyx_f[0], 5420, 1, __PYX_ERR(0, 5420, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5421
 * 
 * cdef CUresult _cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolSetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolSetAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5422
 * cdef CUresult _cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolSetAttribute
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemPoolSetAttribute == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5422, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5423
 *     global __cuMemPoolSetAttribute
 *     cuPythonInit()
 *     if __cuMemPoolSetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolSetAttribute" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolSetAttribute == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5424
 *     cuPythonInit()
 *     if __cuMemPoolSetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemPoolSetAttribute" not found')
 *     err = (<CUresult (*)(CUmemoryPool, CUmemPool_attribute, void*) nogil> __cuMemPoolSetAttribute)(pool, attr, value)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5425
 *     if __cuMemPoolSetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolSetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool, CUmemPool_attribute, void*) nogil> __cuMemPoolSetAttribute)(pool, attr, value)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__166, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5425, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5425, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5424
 *     cuPythonInit()
 *     if __cuMemPoolSetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemPoolSetAttribute" not found')
 *     err = (<CUresult (*)(CUmemoryPool, CUmemPool_attribute, void*) nogil> __cuMemPoolSetAttribute)(pool, attr, value)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5423
 *     global __cuMemPoolSetAttribute
 *     cuPythonInit()
 *     if __cuMemPoolSetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolSetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5426
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolSetAttribute" not found')
 *     err = (<CUresult (*)(CUmemoryPool, CUmemPool_attribute, void*) nogil> __cuMemPoolSetAttribute)(pool, attr, value)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmemoryPool, CUmemPool_attribute, void *))__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolSetAttribute)(__pyx_v_pool, __pyx_v_attr, __pyx_v_value);

    /* "cuda/_cuda/ccuda.pyx":5427
 *             raise RuntimeError('Function "cuMemPoolSetAttribute" not found')
 *     err = (<CUresult (*)(CUmemoryPool, CUmemPool_attribute, void*) nogil> __cuMemPoolSetAttribute)(pool, attr, value)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5421
 * 
 * cdef CUresult _cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolSetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolSetAttribute == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5420
 *     return err
 * 
 * cdef CUresult _cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolSetAttribute
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemPoolSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5429
 *     return err
 * 
 * cdef CUresult _cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolGetAttribute
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolGetAttribute(CUmemoryPool __pyx_v_pool, CUmemPool_attribute __pyx_v_attr, void *__pyx_v_value) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemPoolGetAttribute", 1);
  __Pyx_TraceCall("_cuMemPoolGetAttribute", __pyx_f[0], 5429, 1, __PYX_ERR(0, 5429, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5430
 * 
 * cdef CUresult _cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolGetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolGetAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5431
 * cdef CUresult _cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolGetAttribute
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemPoolGetAttribute == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5431, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5432
 *     global __cuMemPoolGetAttribute
 *     cuPythonInit()
 *     if __cuMemPoolGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolGetAttribute" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolGetAttribute == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5433
 *     cuPythonInit()
 *     if __cuMemPoolGetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemPoolGetAttribute" not found')
 *     err = (<CUresult (*)(CUmemoryPool, CUmemPool_attribute, void*) nogil> __cuMemPoolGetAttribute)(pool, attr, value)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5434
 *     if __cuMemPoolGetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolGetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool, CUmemPool_attribute, void*) nogil> __cuMemPoolGetAttribute)(pool, attr, value)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__167, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5434, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5434, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5433
 *     cuPythonInit()
 *     if __cuMemPoolGetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemPoolGetAttribute" not found')
 *     err = (<CUresult (*)(CUmemoryPool, CUmemPool_attribute, void*) nogil> __cuMemPoolGetAttribute)(pool, attr, value)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5432
 *     global __cuMemPoolGetAttribute
 *     cuPythonInit()
 *     if __cuMemPoolGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolGetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5435
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolGetAttribute" not found')
 *     err = (<CUresult (*)(CUmemoryPool, CUmemPool_attribute, void*) nogil> __cuMemPoolGetAttribute)(pool, attr, value)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmemoryPool, CUmemPool_attribute, void *))__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolGetAttribute)(__pyx_v_pool, __pyx_v_attr, __pyx_v_value);

    /* "cuda/_cuda/ccuda.pyx":5436
 *             raise RuntimeError('Function "cuMemPoolGetAttribute" not found')
 *     err = (<CUresult (*)(CUmemoryPool, CUmemPool_attribute, void*) nogil> __cuMemPoolGetAttribute)(pool, attr, value)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5430
 * 
 * cdef CUresult _cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolGetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolGetAttribute == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5429
 *     return err
 * 
 * cdef CUresult _cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolGetAttribute
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemPoolGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5438
 *     return err
 * 
 * cdef CUresult _cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolSetAccess
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolSetAccess(CUmemoryPool __pyx_v_pool, CUmemAccessDesc const *__pyx_v_map, size_t __pyx_v_count) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemPoolSetAccess", 1);
  __Pyx_TraceCall("_cuMemPoolSetAccess", __pyx_f[0], 5438, 1, __PYX_ERR(0, 5438, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5439
 * 
 * cdef CUresult _cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolSetAccess             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolSetAccess == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5440
 * cdef CUresult _cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolSetAccess
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemPoolSetAccess == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5440, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5441
 *     global __cuMemPoolSetAccess
 *     cuPythonInit()
 *     if __cuMemPoolSetAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolSetAccess" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolSetAccess == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5442
 *     cuPythonInit()
 *     if __cuMemPoolSetAccess == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemPoolSetAccess" not found')
 *     err = (<CUresult (*)(CUmemoryPool, const CUmemAccessDesc*, size_t) nogil> __cuMemPoolSetAccess)(pool, map, count)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5443
 *     if __cuMemPoolSetAccess == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolSetAccess" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool, const CUmemAccessDesc*, size_t) nogil> __cuMemPoolSetAccess)(pool, map, count)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__168, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5443, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5443, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5442
 *     cuPythonInit()
 *     if __cuMemPoolSetAccess == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemPoolSetAccess" not found')
 *     err = (<CUresult (*)(CUmemoryPool, const CUmemAccessDesc*, size_t) nogil> __cuMemPoolSetAccess)(pool, map, count)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5441
 *     global __cuMemPoolSetAccess
 *     cuPythonInit()
 *     if __cuMemPoolSetAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolSetAccess" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5444
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolSetAccess" not found')
 *     err = (<CUresult (*)(CUmemoryPool, const CUmemAccessDesc*, size_t) nogil> __cuMemPoolSetAccess)(pool, map, count)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmemoryPool, CUmemAccessDesc const *, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolSetAccess)(__pyx_v_pool, __pyx_v_map, __pyx_v_count);

    /* "cuda/_cuda/ccuda.pyx":5445
 *             raise RuntimeError('Function "cuMemPoolSetAccess" not found')
 *     err = (<CUresult (*)(CUmemoryPool, const CUmemAccessDesc*, size_t) nogil> __cuMemPoolSetAccess)(pool, map, count)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5439
 * 
 * cdef CUresult _cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolSetAccess             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolSetAccess == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5438
 *     return err
 * 
 * cdef CUresult _cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolSetAccess
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemPoolSetAccess", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5447
 *     return err
 * 
 * cdef CUresult _cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolGetAccess
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolGetAccess(CUmemAccess_flags *__pyx_v_flags, CUmemoryPool __pyx_v_memPool, CUmemLocation *__pyx_v_location) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemPoolGetAccess", 1);
  __Pyx_TraceCall("_cuMemPoolGetAccess", __pyx_f[0], 5447, 1, __PYX_ERR(0, 5447, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5448
 * 
 * cdef CUresult _cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolGetAccess             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolGetAccess == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5449
 * cdef CUresult _cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolGetAccess
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemPoolGetAccess == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5449, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5450
 *     global __cuMemPoolGetAccess
 *     cuPythonInit()
 *     if __cuMemPoolGetAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolGetAccess" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolGetAccess == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5451
 *     cuPythonInit()
 *     if __cuMemPoolGetAccess == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemPoolGetAccess" not found')
 *     err = (<CUresult (*)(CUmemAccess_flags*, CUmemoryPool, CUmemLocation*) nogil> __cuMemPoolGetAccess)(flags, memPool, location)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5452
 *     if __cuMemPoolGetAccess == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolGetAccess" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemAccess_flags*, CUmemoryPool, CUmemLocation*) nogil> __cuMemPoolGetAccess)(flags, memPool, location)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__169, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5452, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5452, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5451
 *     cuPythonInit()
 *     if __cuMemPoolGetAccess == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemPoolGetAccess" not found')
 *     err = (<CUresult (*)(CUmemAccess_flags*, CUmemoryPool, CUmemLocation*) nogil> __cuMemPoolGetAccess)(flags, memPool, location)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5450
 *     global __cuMemPoolGetAccess
 *     cuPythonInit()
 *     if __cuMemPoolGetAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolGetAccess" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5453
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolGetAccess" not found')
 *     err = (<CUresult (*)(CUmemAccess_flags*, CUmemoryPool, CUmemLocation*) nogil> __cuMemPoolGetAccess)(flags, memPool, location)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmemAccess_flags *, CUmemoryPool, CUmemLocation *))__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolGetAccess)(__pyx_v_flags, __pyx_v_memPool, __pyx_v_location);

    /* "cuda/_cuda/ccuda.pyx":5454
 *             raise RuntimeError('Function "cuMemPoolGetAccess" not found')
 *     err = (<CUresult (*)(CUmemAccess_flags*, CUmemoryPool, CUmemLocation*) nogil> __cuMemPoolGetAccess)(flags, memPool, location)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5448
 * 
 * cdef CUresult _cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolGetAccess             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolGetAccess == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5447
 *     return err
 * 
 * cdef CUresult _cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolGetAccess
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemPoolGetAccess", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5456
 *     return err
 * 
 * cdef CUresult _cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolCreate
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolCreate(CUmemoryPool *__pyx_v_pool, CUmemPoolProps const *__pyx_v_poolProps) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemPoolCreate", 1);
  __Pyx_TraceCall("_cuMemPoolCreate", __pyx_f[0], 5456, 1, __PYX_ERR(0, 5456, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5457
 * 
 * cdef CUresult _cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolCreate == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5458
 * cdef CUresult _cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolCreate
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemPoolCreate == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5458, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5459
 *     global __cuMemPoolCreate
 *     cuPythonInit()
 *     if __cuMemPoolCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolCreate" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolCreate == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5460
 *     cuPythonInit()
 *     if __cuMemPoolCreate == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemPoolCreate" not found')
 *     err = (<CUresult (*)(CUmemoryPool*, const CUmemPoolProps*) nogil> __cuMemPoolCreate)(pool, poolProps)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5461
 *     if __cuMemPoolCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool*, const CUmemPoolProps*) nogil> __cuMemPoolCreate)(pool, poolProps)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__170, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5461, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5461, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5460
 *     cuPythonInit()
 *     if __cuMemPoolCreate == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemPoolCreate" not found')
 *     err = (<CUresult (*)(CUmemoryPool*, const CUmemPoolProps*) nogil> __cuMemPoolCreate)(pool, poolProps)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5459
 *     global __cuMemPoolCreate
 *     cuPythonInit()
 *     if __cuMemPoolCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5462
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolCreate" not found')
 *     err = (<CUresult (*)(CUmemoryPool*, const CUmemPoolProps*) nogil> __cuMemPoolCreate)(pool, poolProps)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmemoryPool *, CUmemPoolProps const *))__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolCreate)(__pyx_v_pool, __pyx_v_poolProps);

    /* "cuda/_cuda/ccuda.pyx":5463
 *             raise RuntimeError('Function "cuMemPoolCreate" not found')
 *     err = (<CUresult (*)(CUmemoryPool*, const CUmemPoolProps*) nogil> __cuMemPoolCreate)(pool, poolProps)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemPoolDestroy(CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5457
 * 
 * cdef CUresult _cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolCreate == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5456
 *     return err
 * 
 * cdef CUresult _cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolCreate
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemPoolCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5465
 *     return err
 * 
 * cdef CUresult _cuMemPoolDestroy(CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolDestroy
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolDestroy(CUmemoryPool __pyx_v_pool) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemPoolDestroy", 1);
  __Pyx_TraceCall("_cuMemPoolDestroy", __pyx_f[0], 5465, 1, __PYX_ERR(0, 5465, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5466
 * 
 * cdef CUresult _cuMemPoolDestroy(CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5467
 * cdef CUresult _cuMemPoolDestroy(CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolDestroy
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemPoolDestroy == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5467, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5468
 *     global __cuMemPoolDestroy
 *     cuPythonInit()
 *     if __cuMemPoolDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolDestroy" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolDestroy == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5469
 *     cuPythonInit()
 *     if __cuMemPoolDestroy == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemPoolDestroy" not found')
 *     err = (<CUresult (*)(CUmemoryPool) nogil> __cuMemPoolDestroy)(pool)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5470
 *     if __cuMemPoolDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool) nogil> __cuMemPoolDestroy)(pool)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__171, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5470, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5470, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5469
 *     cuPythonInit()
 *     if __cuMemPoolDestroy == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemPoolDestroy" not found')
 *     err = (<CUresult (*)(CUmemoryPool) nogil> __cuMemPoolDestroy)(pool)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5468
 *     global __cuMemPoolDestroy
 *     cuPythonInit()
 *     if __cuMemPoolDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5471
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolDestroy" not found')
 *     err = (<CUresult (*)(CUmemoryPool) nogil> __cuMemPoolDestroy)(pool)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmemoryPool))__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolDestroy)(__pyx_v_pool);

    /* "cuda/_cuda/ccuda.pyx":5472
 *             raise RuntimeError('Function "cuMemPoolDestroy" not found')
 *     err = (<CUresult (*)(CUmemoryPool) nogil> __cuMemPoolDestroy)(pool)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5466
 * 
 * cdef CUresult _cuMemPoolDestroy(CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolDestroy == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5465
 *     return err
 * 
 * cdef CUresult _cuMemPoolDestroy(CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolDestroy
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemPoolDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5474
 *     return err
 * 
 * cdef CUresult _cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemAllocFromPoolAsync
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocFromPoolAsync(CUdeviceptr *__pyx_v_dptr, size_t __pyx_v_bytesize, CUmemoryPool __pyx_v_pool, CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemAllocFromPoolAsync", 1);
  __Pyx_TraceCall("_cuMemAllocFromPoolAsync", __pyx_f[0], 5474, 1, __PYX_ERR(0, 5474, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5475
 * 
 * cdef CUresult _cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAllocFromPoolAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemAllocFromPoolAsync == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5476
 * cdef CUresult _cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAllocFromPoolAsync
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemAllocFromPoolAsync == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5476, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5477
 *     global __cuMemAllocFromPoolAsync
 *     cuPythonInit()
 *     if __cuMemAllocFromPoolAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocFromPoolAsync" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocFromPoolAsync == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5478
 *     cuPythonInit()
 *     if __cuMemAllocFromPoolAsync == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemAllocFromPoolAsync" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t, CUmemoryPool, CUstream) nogil> __cuMemAllocFromPoolAsync)(dptr, bytesize, pool, hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5479
 *     if __cuMemAllocFromPoolAsync == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocFromPoolAsync" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, size_t, CUmemoryPool, CUstream) nogil> __cuMemAllocFromPoolAsync)(dptr, bytesize, pool, hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__172, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5479, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5479, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5478
 *     cuPythonInit()
 *     if __cuMemAllocFromPoolAsync == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemAllocFromPoolAsync" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t, CUmemoryPool, CUstream) nogil> __cuMemAllocFromPoolAsync)(dptr, bytesize, pool, hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5477
 *     global __cuMemAllocFromPoolAsync
 *     cuPythonInit()
 *     if __cuMemAllocFromPoolAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocFromPoolAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5480
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocFromPoolAsync" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t, CUmemoryPool, CUstream) nogil> __cuMemAllocFromPoolAsync)(dptr, bytesize, pool, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr *, size_t, CUmemoryPool, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocFromPoolAsync)(__pyx_v_dptr, __pyx_v_bytesize, __pyx_v_pool, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":5481
 *             raise RuntimeError('Function "cuMemAllocFromPoolAsync" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t, CUmemoryPool, CUstream) nogil> __cuMemAllocFromPoolAsync)(dptr, bytesize, pool, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5475
 * 
 * cdef CUresult _cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAllocFromPoolAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemAllocFromPoolAsync == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5474
 *     return err
 * 
 * cdef CUresult _cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemAllocFromPoolAsync
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemAllocFromPoolAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5483
 *     return err
 * 
 * cdef CUresult _cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolExportToShareableHandle
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolExportToShareableHandle(void *__pyx_v_handle_out, CUmemoryPool __pyx_v_pool, CUmemAllocationHandleType __pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemPoolExportToShareableHandle", 1);
  __Pyx_TraceCall("_cuMemPoolExportToShareableHandle", __pyx_f[0], 5483, 1, __PYX_ERR(0, 5483, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5484
 * 
 * cdef CUresult _cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolExportToShareableHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolExportToShareableHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5485
 * cdef CUresult _cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolExportToShareableHandle
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemPoolExportToShareableHandle == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5485, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5486
 *     global __cuMemPoolExportToShareableHandle
 *     cuPythonInit()
 *     if __cuMemPoolExportToShareableHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolExportToShareableHandle" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolExportToShareableHandle == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5487
 *     cuPythonInit()
 *     if __cuMemPoolExportToShareableHandle == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemPoolExportToShareableHandle" not found')
 *     err = (<CUresult (*)(void*, CUmemoryPool, CUmemAllocationHandleType, unsigned long long) nogil> __cuMemPoolExportToShareableHandle)(handle_out, pool, handleType, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5488
 *     if __cuMemPoolExportToShareableHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolExportToShareableHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*, CUmemoryPool, CUmemAllocationHandleType, unsigned long long) nogil> __cuMemPoolExportToShareableHandle)(handle_out, pool, handleType, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__173, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5488, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5488, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5487
 *     cuPythonInit()
 *     if __cuMemPoolExportToShareableHandle == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemPoolExportToShareableHandle" not found')
 *     err = (<CUresult (*)(void*, CUmemoryPool, CUmemAllocationHandleType, unsigned long long) nogil> __cuMemPoolExportToShareableHandle)(handle_out, pool, handleType, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5486
 *     global __cuMemPoolExportToShareableHandle
 *     cuPythonInit()
 *     if __cuMemPoolExportToShareableHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolExportToShareableHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5489
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolExportToShareableHandle" not found')
 *     err = (<CUresult (*)(void*, CUmemoryPool, CUmemAllocationHandleType, unsigned long long) nogil> __cuMemPoolExportToShareableHandle)(handle_out, pool, handleType, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(void *, CUmemoryPool, CUmemAllocationHandleType, unsigned PY_LONG_LONG))__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolExportToShareableHandle)(__pyx_v_handle_out, __pyx_v_pool, __pyx_v_handleType, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":5490
 *             raise RuntimeError('Function "cuMemPoolExportToShareableHandle" not found')
 *     err = (<CUresult (*)(void*, CUmemoryPool, CUmemAllocationHandleType, unsigned long long) nogil> __cuMemPoolExportToShareableHandle)(handle_out, pool, handleType, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5484
 * 
 * cdef CUresult _cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolExportToShareableHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolExportToShareableHandle == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5483
 *     return err
 * 
 * cdef CUresult _cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolExportToShareableHandle
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemPoolExportToShareableHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5492
 *     return err
 * 
 * cdef CUresult _cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolImportFromShareableHandle
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolImportFromShareableHandle(CUmemoryPool *__pyx_v_pool_out, void *__pyx_v_handle, CUmemAllocationHandleType __pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemPoolImportFromShareableHandle", 1);
  __Pyx_TraceCall("_cuMemPoolImportFromShareableHandle", __pyx_f[0], 5492, 1, __PYX_ERR(0, 5492, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5493
 * 
 * cdef CUresult _cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolImportFromShareableHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolImportFromShareableHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5494
 * cdef CUresult _cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolImportFromShareableHandle
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemPoolImportFromShareableHandle == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5494, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5495
 *     global __cuMemPoolImportFromShareableHandle
 *     cuPythonInit()
 *     if __cuMemPoolImportFromShareableHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolImportFromShareableHandle" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolImportFromShareableHandle == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5496
 *     cuPythonInit()
 *     if __cuMemPoolImportFromShareableHandle == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemPoolImportFromShareableHandle" not found')
 *     err = (<CUresult (*)(CUmemoryPool*, void*, CUmemAllocationHandleType, unsigned long long) nogil> __cuMemPoolImportFromShareableHandle)(pool_out, handle, handleType, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5497
 *     if __cuMemPoolImportFromShareableHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolImportFromShareableHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool*, void*, CUmemAllocationHandleType, unsigned long long) nogil> __cuMemPoolImportFromShareableHandle)(pool_out, handle, handleType, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__174, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5497, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5497, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5496
 *     cuPythonInit()
 *     if __cuMemPoolImportFromShareableHandle == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemPoolImportFromShareableHandle" not found')
 *     err = (<CUresult (*)(CUmemoryPool*, void*, CUmemAllocationHandleType, unsigned long long) nogil> __cuMemPoolImportFromShareableHandle)(pool_out, handle, handleType, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5495
 *     global __cuMemPoolImportFromShareableHandle
 *     cuPythonInit()
 *     if __cuMemPoolImportFromShareableHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolImportFromShareableHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5498
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolImportFromShareableHandle" not found')
 *     err = (<CUresult (*)(CUmemoryPool*, void*, CUmemAllocationHandleType, unsigned long long) nogil> __cuMemPoolImportFromShareableHandle)(pool_out, handle, handleType, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmemoryPool *, void *, CUmemAllocationHandleType, unsigned PY_LONG_LONG))__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolImportFromShareableHandle)(__pyx_v_pool_out, __pyx_v_handle, __pyx_v_handleType, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":5499
 *             raise RuntimeError('Function "cuMemPoolImportFromShareableHandle" not found')
 *     err = (<CUresult (*)(CUmemoryPool*, void*, CUmemAllocationHandleType, unsigned long long) nogil> __cuMemPoolImportFromShareableHandle)(pool_out, handle, handleType, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5493
 * 
 * cdef CUresult _cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolImportFromShareableHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolImportFromShareableHandle == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5492
 *     return err
 * 
 * cdef CUresult _cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolImportFromShareableHandle
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemPoolImportFromShareableHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5501
 *     return err
 * 
 * cdef CUresult _cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolExportPointer
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolExportPointer(CUmemPoolPtrExportData *__pyx_v_shareData_out, CUdeviceptr __pyx_v_ptr) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemPoolExportPointer", 1);
  __Pyx_TraceCall("_cuMemPoolExportPointer", __pyx_f[0], 5501, 1, __PYX_ERR(0, 5501, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5502
 * 
 * cdef CUresult _cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolExportPointer             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolExportPointer == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5503
 * cdef CUresult _cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolExportPointer
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemPoolExportPointer == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5503, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5504
 *     global __cuMemPoolExportPointer
 *     cuPythonInit()
 *     if __cuMemPoolExportPointer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolExportPointer" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolExportPointer == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5505
 *     cuPythonInit()
 *     if __cuMemPoolExportPointer == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemPoolExportPointer" not found')
 *     err = (<CUresult (*)(CUmemPoolPtrExportData*, CUdeviceptr) nogil> __cuMemPoolExportPointer)(shareData_out, ptr)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5506
 *     if __cuMemPoolExportPointer == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolExportPointer" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemPoolPtrExportData*, CUdeviceptr) nogil> __cuMemPoolExportPointer)(shareData_out, ptr)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__175, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5506, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5506, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5505
 *     cuPythonInit()
 *     if __cuMemPoolExportPointer == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemPoolExportPointer" not found')
 *     err = (<CUresult (*)(CUmemPoolPtrExportData*, CUdeviceptr) nogil> __cuMemPoolExportPointer)(shareData_out, ptr)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5504
 *     global __cuMemPoolExportPointer
 *     cuPythonInit()
 *     if __cuMemPoolExportPointer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolExportPointer" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5507
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolExportPointer" not found')
 *     err = (<CUresult (*)(CUmemPoolPtrExportData*, CUdeviceptr) nogil> __cuMemPoolExportPointer)(shareData_out, ptr)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmemPoolPtrExportData *, CUdeviceptr))__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolExportPointer)(__pyx_v_shareData_out, __pyx_v_ptr);

    /* "cuda/_cuda/ccuda.pyx":5508
 *             raise RuntimeError('Function "cuMemPoolExportPointer" not found')
 *     err = (<CUresult (*)(CUmemPoolPtrExportData*, CUdeviceptr) nogil> __cuMemPoolExportPointer)(shareData_out, ptr)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5502
 * 
 * cdef CUresult _cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolExportPointer             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolExportPointer == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5501
 *     return err
 * 
 * cdef CUresult _cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolExportPointer
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemPoolExportPointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5510
 *     return err
 * 
 * cdef CUresult _cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolImportPointer
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolImportPointer(CUdeviceptr *__pyx_v_ptr_out, CUmemoryPool __pyx_v_pool, CUmemPoolPtrExportData *__pyx_v_shareData) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemPoolImportPointer", 1);
  __Pyx_TraceCall("_cuMemPoolImportPointer", __pyx_f[0], 5510, 1, __PYX_ERR(0, 5510, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5511
 * 
 * cdef CUresult _cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolImportPointer             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolImportPointer == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5512
 * cdef CUresult _cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolImportPointer
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemPoolImportPointer == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5512, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5513
 *     global __cuMemPoolImportPointer
 *     cuPythonInit()
 *     if __cuMemPoolImportPointer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolImportPointer" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolImportPointer == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5514
 *     cuPythonInit()
 *     if __cuMemPoolImportPointer == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemPoolImportPointer" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, CUmemoryPool, CUmemPoolPtrExportData*) nogil> __cuMemPoolImportPointer)(ptr_out, pool, shareData)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5515
 *     if __cuMemPoolImportPointer == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolImportPointer" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, CUmemoryPool, CUmemPoolPtrExportData*) nogil> __cuMemPoolImportPointer)(ptr_out, pool, shareData)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__176, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5515, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5515, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5514
 *     cuPythonInit()
 *     if __cuMemPoolImportPointer == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemPoolImportPointer" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, CUmemoryPool, CUmemPoolPtrExportData*) nogil> __cuMemPoolImportPointer)(ptr_out, pool, shareData)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5513
 *     global __cuMemPoolImportPointer
 *     cuPythonInit()
 *     if __cuMemPoolImportPointer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolImportPointer" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5516
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolImportPointer" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, CUmemoryPool, CUmemPoolPtrExportData*) nogil> __cuMemPoolImportPointer)(ptr_out, pool, shareData)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr *, CUmemoryPool, CUmemPoolPtrExportData *))__pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolImportPointer)(__pyx_v_ptr_out, __pyx_v_pool, __pyx_v_shareData);

    /* "cuda/_cuda/ccuda.pyx":5517
 *             raise RuntimeError('Function "cuMemPoolImportPointer" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, CUmemoryPool, CUmemPoolPtrExportData*) nogil> __cuMemPoolImportPointer)(ptr_out, pool, shareData)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMulticastCreate(CUmemGenericAllocationHandle* mcHandle, const CUmulticastObjectProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5511
 * 
 * cdef CUresult _cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPoolImportPointer             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolImportPointer == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5510
 *     return err
 * 
 * cdef CUresult _cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemPoolImportPointer
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemPoolImportPointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5519
 *     return err
 * 
 * cdef CUresult _cuMulticastCreate(CUmemGenericAllocationHandle* mcHandle, const CUmulticastObjectProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMulticastCreate
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMulticastCreate(CUmemGenericAllocationHandle *__pyx_v_mcHandle, CUmulticastObjectProp const *__pyx_v_prop) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMulticastCreate", 1);
  __Pyx_TraceCall("_cuMulticastCreate", __pyx_f[0], 5519, 1, __PYX_ERR(0, 5519, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5520
 * 
 * cdef CUresult _cuMulticastCreate(CUmemGenericAllocationHandle* mcHandle, const CUmulticastObjectProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMulticastCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMulticastCreate == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5521
 * cdef CUresult _cuMulticastCreate(CUmemGenericAllocationHandle* mcHandle, const CUmulticastObjectProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMulticastCreate
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMulticastCreate == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5521, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5522
 *     global __cuMulticastCreate
 *     cuPythonInit()
 *     if __cuMulticastCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastCreate" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMulticastCreate == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5523
 *     cuPythonInit()
 *     if __cuMulticastCreate == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMulticastCreate" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, const CUmulticastObjectProp*) nogil> __cuMulticastCreate)(mcHandle, prop)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5524
 *     if __cuMulticastCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, const CUmulticastObjectProp*) nogil> __cuMulticastCreate)(mcHandle, prop)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__177, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5524, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5524, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5523
 *     cuPythonInit()
 *     if __cuMulticastCreate == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMulticastCreate" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, const CUmulticastObjectProp*) nogil> __cuMulticastCreate)(mcHandle, prop)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5522
 *     global __cuMulticastCreate
 *     cuPythonInit()
 *     if __cuMulticastCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5525
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastCreate" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, const CUmulticastObjectProp*) nogil> __cuMulticastCreate)(mcHandle, prop)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmemGenericAllocationHandle *, CUmulticastObjectProp const *))__pyx_v_4cuda_5_cuda_5ccuda___cuMulticastCreate)(__pyx_v_mcHandle, __pyx_v_prop);

    /* "cuda/_cuda/ccuda.pyx":5526
 *             raise RuntimeError('Function "cuMulticastCreate" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, const CUmulticastObjectProp*) nogil> __cuMulticastCreate)(mcHandle, prop)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMulticastAddDevice(CUmemGenericAllocationHandle mcHandle, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5520
 * 
 * cdef CUresult _cuMulticastCreate(CUmemGenericAllocationHandle* mcHandle, const CUmulticastObjectProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMulticastCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMulticastCreate == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5519
 *     return err
 * 
 * cdef CUresult _cuMulticastCreate(CUmemGenericAllocationHandle* mcHandle, const CUmulticastObjectProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMulticastCreate
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMulticastCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5528
 *     return err
 * 
 * cdef CUresult _cuMulticastAddDevice(CUmemGenericAllocationHandle mcHandle, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMulticastAddDevice
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMulticastAddDevice(CUmemGenericAllocationHandle __pyx_v_mcHandle, CUdevice __pyx_v_dev) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMulticastAddDevice", 1);
  __Pyx_TraceCall("_cuMulticastAddDevice", __pyx_f[0], 5528, 1, __PYX_ERR(0, 5528, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5529
 * 
 * cdef CUresult _cuMulticastAddDevice(CUmemGenericAllocationHandle mcHandle, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMulticastAddDevice             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMulticastAddDevice == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5530
 * cdef CUresult _cuMulticastAddDevice(CUmemGenericAllocationHandle mcHandle, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMulticastAddDevice
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMulticastAddDevice == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5530, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5531
 *     global __cuMulticastAddDevice
 *     cuPythonInit()
 *     if __cuMulticastAddDevice == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastAddDevice" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMulticastAddDevice == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5532
 *     cuPythonInit()
 *     if __cuMulticastAddDevice == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMulticastAddDevice" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle, CUdevice) nogil> __cuMulticastAddDevice)(mcHandle, dev)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5533
 *     if __cuMulticastAddDevice == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastAddDevice" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle, CUdevice) nogil> __cuMulticastAddDevice)(mcHandle, dev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__178, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5533, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5533, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5532
 *     cuPythonInit()
 *     if __cuMulticastAddDevice == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMulticastAddDevice" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle, CUdevice) nogil> __cuMulticastAddDevice)(mcHandle, dev)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5531
 *     global __cuMulticastAddDevice
 *     cuPythonInit()
 *     if __cuMulticastAddDevice == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastAddDevice" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5534
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastAddDevice" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle, CUdevice) nogil> __cuMulticastAddDevice)(mcHandle, dev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmemGenericAllocationHandle, CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuMulticastAddDevice)(__pyx_v_mcHandle, __pyx_v_dev);

    /* "cuda/_cuda/ccuda.pyx":5535
 *             raise RuntimeError('Function "cuMulticastAddDevice" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle, CUdevice) nogil> __cuMulticastAddDevice)(mcHandle, dev)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * 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:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5529
 * 
 * cdef CUresult _cuMulticastAddDevice(CUmemGenericAllocationHandle mcHandle, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMulticastAddDevice             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMulticastAddDevice == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5528
 *     return err
 * 
 * cdef CUresult _cuMulticastAddDevice(CUmemGenericAllocationHandle mcHandle, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMulticastAddDevice
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMulticastAddDevice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5537
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuMulticastBindMem
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMulticastBindMem(CUmemGenericAllocationHandle __pyx_v_mcHandle, size_t __pyx_v_mcOffset, CUmemGenericAllocationHandle __pyx_v_memHandle, size_t __pyx_v_memOffset, size_t __pyx_v_size, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMulticastBindMem", 1);
  __Pyx_TraceCall("_cuMulticastBindMem", __pyx_f[0], 5537, 1, __PYX_ERR(0, 5537, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5538
 * 
 * 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:
 *     global __cuMulticastBindMem             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMulticastBindMem == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5539
 * 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:
 *     global __cuMulticastBindMem
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMulticastBindMem == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5539, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5540
 *     global __cuMulticastBindMem
 *     cuPythonInit()
 *     if __cuMulticastBindMem == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastBindMem" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMulticastBindMem == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5541
 *     cuPythonInit()
 *     if __cuMulticastBindMem == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMulticastBindMem" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle, size_t, CUmemGenericAllocationHandle, size_t, size_t, unsigned long long) nogil> __cuMulticastBindMem)(mcHandle, mcOffset, memHandle, memOffset, size, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5542
 *     if __cuMulticastBindMem == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastBindMem" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle, size_t, CUmemGenericAllocationHandle, size_t, size_t, unsigned long long) nogil> __cuMulticastBindMem)(mcHandle, mcOffset, memHandle, memOffset, size, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__179, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5542, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5542, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5541
 *     cuPythonInit()
 *     if __cuMulticastBindMem == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMulticastBindMem" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle, size_t, CUmemGenericAllocationHandle, size_t, size_t, unsigned long long) nogil> __cuMulticastBindMem)(mcHandle, mcOffset, memHandle, memOffset, size, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5540
 *     global __cuMulticastBindMem
 *     cuPythonInit()
 *     if __cuMulticastBindMem == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastBindMem" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5543
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastBindMem" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle, size_t, CUmemGenericAllocationHandle, size_t, size_t, unsigned long long) nogil> __cuMulticastBindMem)(mcHandle, mcOffset, memHandle, memOffset, size, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmemGenericAllocationHandle, size_t, CUmemGenericAllocationHandle, size_t, size_t, unsigned PY_LONG_LONG))__pyx_v_4cuda_5_cuda_5ccuda___cuMulticastBindMem)(__pyx_v_mcHandle, __pyx_v_mcOffset, __pyx_v_memHandle, __pyx_v_memOffset, __pyx_v_size, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":5544
 *             raise RuntimeError('Function "cuMulticastBindMem" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle, size_t, CUmemGenericAllocationHandle, size_t, size_t, unsigned long long) nogil> __cuMulticastBindMem)(mcHandle, mcOffset, memHandle, memOffset, size, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMulticastBindAddr(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUdeviceptr memptr, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5538
 * 
 * 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:
 *     global __cuMulticastBindMem             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMulticastBindMem == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5537
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuMulticastBindMem
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMulticastBindMem", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5546
 *     return err
 * 
 * cdef CUresult _cuMulticastBindAddr(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUdeviceptr memptr, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMulticastBindAddr
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMulticastBindAddr(CUmemGenericAllocationHandle __pyx_v_mcHandle, size_t __pyx_v_mcOffset, CUdeviceptr __pyx_v_memptr, size_t __pyx_v_size, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMulticastBindAddr", 1);
  __Pyx_TraceCall("_cuMulticastBindAddr", __pyx_f[0], 5546, 1, __PYX_ERR(0, 5546, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5547
 * 
 * cdef CUresult _cuMulticastBindAddr(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUdeviceptr memptr, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMulticastBindAddr             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMulticastBindAddr == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5548
 * cdef CUresult _cuMulticastBindAddr(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUdeviceptr memptr, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMulticastBindAddr
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMulticastBindAddr == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5548, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5549
 *     global __cuMulticastBindAddr
 *     cuPythonInit()
 *     if __cuMulticastBindAddr == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastBindAddr" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMulticastBindAddr == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5550
 *     cuPythonInit()
 *     if __cuMulticastBindAddr == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMulticastBindAddr" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle, size_t, CUdeviceptr, size_t, unsigned long long) nogil> __cuMulticastBindAddr)(mcHandle, mcOffset, memptr, size, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5551
 *     if __cuMulticastBindAddr == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastBindAddr" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle, size_t, CUdeviceptr, size_t, unsigned long long) nogil> __cuMulticastBindAddr)(mcHandle, mcOffset, memptr, size, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__180, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5551, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5551, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5550
 *     cuPythonInit()
 *     if __cuMulticastBindAddr == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMulticastBindAddr" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle, size_t, CUdeviceptr, size_t, unsigned long long) nogil> __cuMulticastBindAddr)(mcHandle, mcOffset, memptr, size, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5549
 *     global __cuMulticastBindAddr
 *     cuPythonInit()
 *     if __cuMulticastBindAddr == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastBindAddr" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5552
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastBindAddr" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle, size_t, CUdeviceptr, size_t, unsigned long long) nogil> __cuMulticastBindAddr)(mcHandle, mcOffset, memptr, size, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmemGenericAllocationHandle, size_t, CUdeviceptr, size_t, unsigned PY_LONG_LONG))__pyx_v_4cuda_5_cuda_5ccuda___cuMulticastBindAddr)(__pyx_v_mcHandle, __pyx_v_mcOffset, __pyx_v_memptr, __pyx_v_size, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":5553
 *             raise RuntimeError('Function "cuMulticastBindAddr" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle, size_t, CUdeviceptr, size_t, unsigned long long) nogil> __cuMulticastBindAddr)(mcHandle, mcOffset, memptr, size, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMulticastUnbind(CUmemGenericAllocationHandle mcHandle, CUdevice dev, size_t mcOffset, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5547
 * 
 * cdef CUresult _cuMulticastBindAddr(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUdeviceptr memptr, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMulticastBindAddr             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMulticastBindAddr == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5546
 *     return err
 * 
 * cdef CUresult _cuMulticastBindAddr(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUdeviceptr memptr, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMulticastBindAddr
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMulticastBindAddr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5555
 *     return err
 * 
 * cdef CUresult _cuMulticastUnbind(CUmemGenericAllocationHandle mcHandle, CUdevice dev, size_t mcOffset, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMulticastUnbind
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMulticastUnbind(CUmemGenericAllocationHandle __pyx_v_mcHandle, CUdevice __pyx_v_dev, size_t __pyx_v_mcOffset, size_t __pyx_v_size) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMulticastUnbind", 1);
  __Pyx_TraceCall("_cuMulticastUnbind", __pyx_f[0], 5555, 1, __PYX_ERR(0, 5555, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5556
 * 
 * cdef CUresult _cuMulticastUnbind(CUmemGenericAllocationHandle mcHandle, CUdevice dev, size_t mcOffset, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMulticastUnbind             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMulticastUnbind == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5557
 * cdef CUresult _cuMulticastUnbind(CUmemGenericAllocationHandle mcHandle, CUdevice dev, size_t mcOffset, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMulticastUnbind
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMulticastUnbind == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5557, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5558
 *     global __cuMulticastUnbind
 *     cuPythonInit()
 *     if __cuMulticastUnbind == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastUnbind" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMulticastUnbind == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5559
 *     cuPythonInit()
 *     if __cuMulticastUnbind == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMulticastUnbind" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle, CUdevice, size_t, size_t) nogil> __cuMulticastUnbind)(mcHandle, dev, mcOffset, size)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5560
 *     if __cuMulticastUnbind == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastUnbind" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle, CUdevice, size_t, size_t) nogil> __cuMulticastUnbind)(mcHandle, dev, mcOffset, size)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__181, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5560, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5560, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5559
 *     cuPythonInit()
 *     if __cuMulticastUnbind == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMulticastUnbind" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle, CUdevice, size_t, size_t) nogil> __cuMulticastUnbind)(mcHandle, dev, mcOffset, size)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5558
 *     global __cuMulticastUnbind
 *     cuPythonInit()
 *     if __cuMulticastUnbind == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastUnbind" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5561
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastUnbind" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle, CUdevice, size_t, size_t) nogil> __cuMulticastUnbind)(mcHandle, dev, mcOffset, size)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmemGenericAllocationHandle, CUdevice, size_t, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMulticastUnbind)(__pyx_v_mcHandle, __pyx_v_dev, __pyx_v_mcOffset, __pyx_v_size);

    /* "cuda/_cuda/ccuda.pyx":5562
 *             raise RuntimeError('Function "cuMulticastUnbind" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle, CUdevice, size_t, size_t) nogil> __cuMulticastUnbind)(mcHandle, dev, mcOffset, size)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMulticastGetGranularity(size_t* granularity, const CUmulticastObjectProp* prop, CUmulticastGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5556
 * 
 * cdef CUresult _cuMulticastUnbind(CUmemGenericAllocationHandle mcHandle, CUdevice dev, size_t mcOffset, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMulticastUnbind             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMulticastUnbind == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5555
 *     return err
 * 
 * cdef CUresult _cuMulticastUnbind(CUmemGenericAllocationHandle mcHandle, CUdevice dev, size_t mcOffset, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMulticastUnbind
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMulticastUnbind", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5564
 *     return err
 * 
 * cdef CUresult _cuMulticastGetGranularity(size_t* granularity, const CUmulticastObjectProp* prop, CUmulticastGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMulticastGetGranularity
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMulticastGetGranularity(size_t *__pyx_v_granularity, CUmulticastObjectProp const *__pyx_v_prop, CUmulticastGranularity_flags __pyx_v_option) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMulticastGetGranularity", 1);
  __Pyx_TraceCall("_cuMulticastGetGranularity", __pyx_f[0], 5564, 1, __PYX_ERR(0, 5564, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5565
 * 
 * cdef CUresult _cuMulticastGetGranularity(size_t* granularity, const CUmulticastObjectProp* prop, CUmulticastGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMulticastGetGranularity             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMulticastGetGranularity == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5566
 * cdef CUresult _cuMulticastGetGranularity(size_t* granularity, const CUmulticastObjectProp* prop, CUmulticastGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMulticastGetGranularity
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMulticastGetGranularity == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5566, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5567
 *     global __cuMulticastGetGranularity
 *     cuPythonInit()
 *     if __cuMulticastGetGranularity == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastGetGranularity" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMulticastGetGranularity == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5568
 *     cuPythonInit()
 *     if __cuMulticastGetGranularity == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMulticastGetGranularity" not found')
 *     err = (<CUresult (*)(size_t*, const CUmulticastObjectProp*, CUmulticastGranularity_flags) nogil> __cuMulticastGetGranularity)(granularity, prop, option)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5569
 *     if __cuMulticastGetGranularity == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastGetGranularity" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(size_t*, const CUmulticastObjectProp*, CUmulticastGranularity_flags) nogil> __cuMulticastGetGranularity)(granularity, prop, option)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__182, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5569, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5569, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5568
 *     cuPythonInit()
 *     if __cuMulticastGetGranularity == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMulticastGetGranularity" not found')
 *     err = (<CUresult (*)(size_t*, const CUmulticastObjectProp*, CUmulticastGranularity_flags) nogil> __cuMulticastGetGranularity)(granularity, prop, option)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5567
 *     global __cuMulticastGetGranularity
 *     cuPythonInit()
 *     if __cuMulticastGetGranularity == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastGetGranularity" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5570
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastGetGranularity" not found')
 *     err = (<CUresult (*)(size_t*, const CUmulticastObjectProp*, CUmulticastGranularity_flags) nogil> __cuMulticastGetGranularity)(granularity, prop, option)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(size_t *, CUmulticastObjectProp const *, CUmulticastGranularity_flags))__pyx_v_4cuda_5_cuda_5ccuda___cuMulticastGetGranularity)(__pyx_v_granularity, __pyx_v_prop, __pyx_v_option);

    /* "cuda/_cuda/ccuda.pyx":5571
 *             raise RuntimeError('Function "cuMulticastGetGranularity" not found')
 *     err = (<CUresult (*)(size_t*, const CUmulticastObjectProp*, CUmulticastGranularity_flags) nogil> __cuMulticastGetGranularity)(granularity, prop, option)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5565
 * 
 * cdef CUresult _cuMulticastGetGranularity(size_t* granularity, const CUmulticastObjectProp* prop, CUmulticastGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMulticastGetGranularity             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMulticastGetGranularity == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5564
 *     return err
 * 
 * cdef CUresult _cuMulticastGetGranularity(size_t* granularity, const CUmulticastObjectProp* prop, CUmulticastGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMulticastGetGranularity
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMulticastGetGranularity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5573
 *     return err
 * 
 * cdef CUresult _cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuPointerGetAttribute
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuPointerGetAttribute(void *__pyx_v_data, CUpointer_attribute __pyx_v_attribute, CUdeviceptr __pyx_v_ptr) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuPointerGetAttribute", 1);
  __Pyx_TraceCall("_cuPointerGetAttribute", __pyx_f[0], 5573, 1, __PYX_ERR(0, 5573, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5574
 * 
 * cdef CUresult _cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuPointerGetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuPointerGetAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5575
 * cdef CUresult _cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuPointerGetAttribute
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuPointerGetAttribute == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5575, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5576
 *     global __cuPointerGetAttribute
 *     cuPythonInit()
 *     if __cuPointerGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuPointerGetAttribute" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuPointerGetAttribute == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5577
 *     cuPythonInit()
 *     if __cuPointerGetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuPointerGetAttribute" not found')
 *     err = (<CUresult (*)(void*, CUpointer_attribute, CUdeviceptr) nogil> __cuPointerGetAttribute)(data, attribute, ptr)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5578
 *     if __cuPointerGetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuPointerGetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*, CUpointer_attribute, CUdeviceptr) nogil> __cuPointerGetAttribute)(data, attribute, ptr)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__183, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5578, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5578, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5577
 *     cuPythonInit()
 *     if __cuPointerGetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuPointerGetAttribute" not found')
 *     err = (<CUresult (*)(void*, CUpointer_attribute, CUdeviceptr) nogil> __cuPointerGetAttribute)(data, attribute, ptr)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5576
 *     global __cuPointerGetAttribute
 *     cuPythonInit()
 *     if __cuPointerGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuPointerGetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5579
 *         with gil:
 *             raise RuntimeError('Function "cuPointerGetAttribute" not found')
 *     err = (<CUresult (*)(void*, CUpointer_attribute, CUdeviceptr) nogil> __cuPointerGetAttribute)(data, attribute, ptr)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(void *, CUpointer_attribute, CUdeviceptr))__pyx_v_4cuda_5_cuda_5ccuda___cuPointerGetAttribute)(__pyx_v_data, __pyx_v_attribute, __pyx_v_ptr);

    /* "cuda/_cuda/ccuda.pyx":5580
 *             raise RuntimeError('Function "cuPointerGetAttribute" not found')
 *     err = (<CUresult (*)(void*, CUpointer_attribute, CUdeviceptr) nogil> __cuPointerGetAttribute)(data, attribute, ptr)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5574
 * 
 * cdef CUresult _cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuPointerGetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuPointerGetAttribute == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5573
 *     return err
 * 
 * cdef CUresult _cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuPointerGetAttribute
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuPointerGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5582
 *     return err
 * 
 * cdef CUresult _cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemPrefetchAsync
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemPrefetchAsync(CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count, CUdevice __pyx_v_dstDevice, CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemPrefetchAsync", 1);
  __Pyx_TraceCall("_cuMemPrefetchAsync", __pyx_f[0], 5582, 1, __PYX_ERR(0, 5582, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5583
 * 
 * cdef CUresult _cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPrefetchAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPrefetchAsync == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5584
 * cdef CUresult _cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPrefetchAsync
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemPrefetchAsync == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5584, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5585
 *     global __cuMemPrefetchAsync
 *     cuPythonInit()
 *     if __cuMemPrefetchAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPrefetchAsync" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemPrefetchAsync == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5586
 *     cuPythonInit()
 *     if __cuMemPrefetchAsync == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemPrefetchAsync" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, CUdevice, CUstream) nogil> __cuMemPrefetchAsync)(devPtr, count, dstDevice, hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5587
 *     if __cuMemPrefetchAsync == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPrefetchAsync" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t, CUdevice, CUstream) nogil> __cuMemPrefetchAsync)(devPtr, count, dstDevice, hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__184, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5587, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5587, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5586
 *     cuPythonInit()
 *     if __cuMemPrefetchAsync == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemPrefetchAsync" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, CUdevice, CUstream) nogil> __cuMemPrefetchAsync)(devPtr, count, dstDevice, hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5585
 *     global __cuMemPrefetchAsync
 *     cuPythonInit()
 *     if __cuMemPrefetchAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPrefetchAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5588
 *         with gil:
 *             raise RuntimeError('Function "cuMemPrefetchAsync" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, CUdevice, CUstream) nogil> __cuMemPrefetchAsync)(devPtr, count, dstDevice, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, size_t, CUdevice, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemPrefetchAsync)(__pyx_v_devPtr, __pyx_v_count, __pyx_v_dstDevice, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":5589
 *             raise RuntimeError('Function "cuMemPrefetchAsync" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, CUdevice, CUstream) nogil> __cuMemPrefetchAsync)(devPtr, count, dstDevice, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemPrefetchAsync_v2(CUdeviceptr devPtr, size_t count, CUmemLocation location, unsigned int flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5583
 * 
 * cdef CUresult _cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPrefetchAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPrefetchAsync == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5582
 *     return err
 * 
 * cdef CUresult _cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemPrefetchAsync
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemPrefetchAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5591
 *     return err
 * 
 * cdef CUresult _cuMemPrefetchAsync_v2(CUdeviceptr devPtr, size_t count, CUmemLocation location, unsigned int flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemPrefetchAsync_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemPrefetchAsync_v2(CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count, CUmemLocation __pyx_v_location, unsigned int __pyx_v_flags, CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemPrefetchAsync_v2", 1);
  __Pyx_TraceCall("_cuMemPrefetchAsync_v2", __pyx_f[0], 5591, 1, __PYX_ERR(0, 5591, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5592
 * 
 * cdef CUresult _cuMemPrefetchAsync_v2(CUdeviceptr devPtr, size_t count, CUmemLocation location, unsigned int flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPrefetchAsync_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPrefetchAsync_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5593
 * cdef CUresult _cuMemPrefetchAsync_v2(CUdeviceptr devPtr, size_t count, CUmemLocation location, unsigned int flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPrefetchAsync_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemPrefetchAsync_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5593, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5594
 *     global __cuMemPrefetchAsync_v2
 *     cuPythonInit()
 *     if __cuMemPrefetchAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPrefetchAsync_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemPrefetchAsync_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5595
 *     cuPythonInit()
 *     if __cuMemPrefetchAsync_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemPrefetchAsync_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, CUmemLocation, unsigned int, CUstream) nogil> __cuMemPrefetchAsync_v2)(devPtr, count, location, flags, hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5596
 *     if __cuMemPrefetchAsync_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPrefetchAsync_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t, CUmemLocation, unsigned int, CUstream) nogil> __cuMemPrefetchAsync_v2)(devPtr, count, location, flags, hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__185, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5596, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5596, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5595
 *     cuPythonInit()
 *     if __cuMemPrefetchAsync_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemPrefetchAsync_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, CUmemLocation, unsigned int, CUstream) nogil> __cuMemPrefetchAsync_v2)(devPtr, count, location, flags, hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5594
 *     global __cuMemPrefetchAsync_v2
 *     cuPythonInit()
 *     if __cuMemPrefetchAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPrefetchAsync_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5597
 *         with gil:
 *             raise RuntimeError('Function "cuMemPrefetchAsync_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, CUmemLocation, unsigned int, CUstream) nogil> __cuMemPrefetchAsync_v2)(devPtr, count, location, flags, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, size_t, CUmemLocation, unsigned int, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuMemPrefetchAsync_v2)(__pyx_v_devPtr, __pyx_v_count, __pyx_v_location, __pyx_v_flags, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":5598
 *             raise RuntimeError('Function "cuMemPrefetchAsync_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, CUmemLocation, unsigned int, CUstream) nogil> __cuMemPrefetchAsync_v2)(devPtr, count, location, flags, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5592
 * 
 * cdef CUresult _cuMemPrefetchAsync_v2(CUdeviceptr devPtr, size_t count, CUmemLocation location, unsigned int flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemPrefetchAsync_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPrefetchAsync_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5591
 *     return err
 * 
 * cdef CUresult _cuMemPrefetchAsync_v2(CUdeviceptr devPtr, size_t count, CUmemLocation location, unsigned int flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemPrefetchAsync_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemPrefetchAsync_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5600
 *     return err
 * 
 * cdef CUresult _cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemAdvise
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemAdvise(CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count, CUmem_advise __pyx_v_advice, CUdevice __pyx_v_device) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemAdvise", 1);
  __Pyx_TraceCall("_cuMemAdvise", __pyx_f[0], 5600, 1, __PYX_ERR(0, 5600, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5601
 * 
 * cdef CUresult _cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAdvise             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemAdvise == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5602
 * cdef CUresult _cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAdvise
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemAdvise == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5602, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5603
 *     global __cuMemAdvise
 *     cuPythonInit()
 *     if __cuMemAdvise == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAdvise" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemAdvise == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5604
 *     cuPythonInit()
 *     if __cuMemAdvise == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemAdvise" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, CUmem_advise, CUdevice) nogil> __cuMemAdvise)(devPtr, count, advice, device)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5605
 *     if __cuMemAdvise == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemAdvise" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t, CUmem_advise, CUdevice) nogil> __cuMemAdvise)(devPtr, count, advice, device)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__186, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5605, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5605, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5604
 *     cuPythonInit()
 *     if __cuMemAdvise == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemAdvise" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, CUmem_advise, CUdevice) nogil> __cuMemAdvise)(devPtr, count, advice, device)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5603
 *     global __cuMemAdvise
 *     cuPythonInit()
 *     if __cuMemAdvise == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAdvise" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5606
 *         with gil:
 *             raise RuntimeError('Function "cuMemAdvise" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, CUmem_advise, CUdevice) nogil> __cuMemAdvise)(devPtr, count, advice, device)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, size_t, CUmem_advise, CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuMemAdvise)(__pyx_v_devPtr, __pyx_v_count, __pyx_v_advice, __pyx_v_device);

    /* "cuda/_cuda/ccuda.pyx":5607
 *             raise RuntimeError('Function "cuMemAdvise" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, CUmem_advise, CUdevice) nogil> __cuMemAdvise)(devPtr, count, advice, device)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemAdvise_v2(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUmemLocation location) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5601
 * 
 * cdef CUresult _cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAdvise             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemAdvise == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5600
 *     return err
 * 
 * cdef CUresult _cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemAdvise
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemAdvise", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5609
 *     return err
 * 
 * cdef CUresult _cuMemAdvise_v2(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUmemLocation location) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemAdvise_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemAdvise_v2(CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count, CUmem_advise __pyx_v_advice, CUmemLocation __pyx_v_location) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemAdvise_v2", 1);
  __Pyx_TraceCall("_cuMemAdvise_v2", __pyx_f[0], 5609, 1, __PYX_ERR(0, 5609, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5610
 * 
 * cdef CUresult _cuMemAdvise_v2(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUmemLocation location) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAdvise_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemAdvise_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5611
 * cdef CUresult _cuMemAdvise_v2(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUmemLocation location) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAdvise_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemAdvise_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5611, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5612
 *     global __cuMemAdvise_v2
 *     cuPythonInit()
 *     if __cuMemAdvise_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAdvise_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemAdvise_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5613
 *     cuPythonInit()
 *     if __cuMemAdvise_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemAdvise_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, CUmem_advise, CUmemLocation) nogil> __cuMemAdvise_v2)(devPtr, count, advice, location)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5614
 *     if __cuMemAdvise_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemAdvise_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t, CUmem_advise, CUmemLocation) nogil> __cuMemAdvise_v2)(devPtr, count, advice, location)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__187, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5614, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5614, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5613
 *     cuPythonInit()
 *     if __cuMemAdvise_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemAdvise_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, CUmem_advise, CUmemLocation) nogil> __cuMemAdvise_v2)(devPtr, count, advice, location)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5612
 *     global __cuMemAdvise_v2
 *     cuPythonInit()
 *     if __cuMemAdvise_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAdvise_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5615
 *         with gil:
 *             raise RuntimeError('Function "cuMemAdvise_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, CUmem_advise, CUmemLocation) nogil> __cuMemAdvise_v2)(devPtr, count, advice, location)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr, size_t, CUmem_advise, CUmemLocation))__pyx_v_4cuda_5_cuda_5ccuda___cuMemAdvise_v2)(__pyx_v_devPtr, __pyx_v_count, __pyx_v_advice, __pyx_v_location);

    /* "cuda/_cuda/ccuda.pyx":5616
 *             raise RuntimeError('Function "cuMemAdvise_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, CUmem_advise, CUmemLocation) nogil> __cuMemAdvise_v2)(devPtr, count, advice, location)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5610
 * 
 * cdef CUresult _cuMemAdvise_v2(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUmemLocation location) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemAdvise_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemAdvise_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5609
 *     return err
 * 
 * cdef CUresult _cuMemAdvise_v2(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUmemLocation location) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemAdvise_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemAdvise_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5618
 *     return err
 * 
 * cdef CUresult _cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemRangeGetAttribute
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemRangeGetAttribute(void *__pyx_v_data, size_t __pyx_v_dataSize, CUmem_range_attribute __pyx_v_attribute, CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemRangeGetAttribute", 1);
  __Pyx_TraceCall("_cuMemRangeGetAttribute", __pyx_f[0], 5618, 1, __PYX_ERR(0, 5618, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5619
 * 
 * cdef CUresult _cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemRangeGetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemRangeGetAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5620
 * cdef CUresult _cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemRangeGetAttribute
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemRangeGetAttribute == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5620, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5621
 *     global __cuMemRangeGetAttribute
 *     cuPythonInit()
 *     if __cuMemRangeGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemRangeGetAttribute" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemRangeGetAttribute == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5622
 *     cuPythonInit()
 *     if __cuMemRangeGetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemRangeGetAttribute" not found')
 *     err = (<CUresult (*)(void*, size_t, CUmem_range_attribute, CUdeviceptr, size_t) nogil> __cuMemRangeGetAttribute)(data, dataSize, attribute, devPtr, count)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5623
 *     if __cuMemRangeGetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemRangeGetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*, size_t, CUmem_range_attribute, CUdeviceptr, size_t) nogil> __cuMemRangeGetAttribute)(data, dataSize, attribute, devPtr, count)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__188, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5623, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5623, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5622
 *     cuPythonInit()
 *     if __cuMemRangeGetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemRangeGetAttribute" not found')
 *     err = (<CUresult (*)(void*, size_t, CUmem_range_attribute, CUdeviceptr, size_t) nogil> __cuMemRangeGetAttribute)(data, dataSize, attribute, devPtr, count)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5621
 *     global __cuMemRangeGetAttribute
 *     cuPythonInit()
 *     if __cuMemRangeGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemRangeGetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5624
 *         with gil:
 *             raise RuntimeError('Function "cuMemRangeGetAttribute" not found')
 *     err = (<CUresult (*)(void*, size_t, CUmem_range_attribute, CUdeviceptr, size_t) nogil> __cuMemRangeGetAttribute)(data, dataSize, attribute, devPtr, count)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(void *, size_t, CUmem_range_attribute, CUdeviceptr, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemRangeGetAttribute)(__pyx_v_data, __pyx_v_dataSize, __pyx_v_attribute, __pyx_v_devPtr, __pyx_v_count);

    /* "cuda/_cuda/ccuda.pyx":5625
 *             raise RuntimeError('Function "cuMemRangeGetAttribute" not found')
 *     err = (<CUresult (*)(void*, size_t, CUmem_range_attribute, CUdeviceptr, size_t) nogil> __cuMemRangeGetAttribute)(data, dataSize, attribute, devPtr, count)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * 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:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5619
 * 
 * cdef CUresult _cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuMemRangeGetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemRangeGetAttribute == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5618
 *     return err
 * 
 * cdef CUresult _cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuMemRangeGetAttribute
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemRangeGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5627
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuMemRangeGetAttributes
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuMemRangeGetAttributes(void **__pyx_v_data, size_t *__pyx_v_dataSizes, CUmem_range_attribute *__pyx_v_attributes, size_t __pyx_v_numAttributes, CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuMemRangeGetAttributes", 1);
  __Pyx_TraceCall("_cuMemRangeGetAttributes", __pyx_f[0], 5627, 1, __PYX_ERR(0, 5627, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5628
 * 
 * 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:
 *     global __cuMemRangeGetAttributes             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemRangeGetAttributes == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5629
 * 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:
 *     global __cuMemRangeGetAttributes
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuMemRangeGetAttributes == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5629, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5630
 *     global __cuMemRangeGetAttributes
 *     cuPythonInit()
 *     if __cuMemRangeGetAttributes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemRangeGetAttributes" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuMemRangeGetAttributes == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5631
 *     cuPythonInit()
 *     if __cuMemRangeGetAttributes == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemRangeGetAttributes" not found')
 *     err = (<CUresult (*)(void**, size_t*, CUmem_range_attribute*, size_t, CUdeviceptr, size_t) nogil> __cuMemRangeGetAttributes)(data, dataSizes, attributes, numAttributes, devPtr, count)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5632
 *     if __cuMemRangeGetAttributes == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemRangeGetAttributes" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void**, size_t*, CUmem_range_attribute*, size_t, CUdeviceptr, size_t) nogil> __cuMemRangeGetAttributes)(data, dataSizes, attributes, numAttributes, devPtr, count)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__189, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5632, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5632, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5631
 *     cuPythonInit()
 *     if __cuMemRangeGetAttributes == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuMemRangeGetAttributes" not found')
 *     err = (<CUresult (*)(void**, size_t*, CUmem_range_attribute*, size_t, CUdeviceptr, size_t) nogil> __cuMemRangeGetAttributes)(data, dataSizes, attributes, numAttributes, devPtr, count)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5630
 *     global __cuMemRangeGetAttributes
 *     cuPythonInit()
 *     if __cuMemRangeGetAttributes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemRangeGetAttributes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5633
 *         with gil:
 *             raise RuntimeError('Function "cuMemRangeGetAttributes" not found')
 *     err = (<CUresult (*)(void**, size_t*, CUmem_range_attribute*, size_t, CUdeviceptr, size_t) nogil> __cuMemRangeGetAttributes)(data, dataSizes, attributes, numAttributes, devPtr, count)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(void **, size_t *, CUmem_range_attribute *, size_t, CUdeviceptr, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuMemRangeGetAttributes)(__pyx_v_data, __pyx_v_dataSizes, __pyx_v_attributes, __pyx_v_numAttributes, __pyx_v_devPtr, __pyx_v_count);

    /* "cuda/_cuda/ccuda.pyx":5634
 *             raise RuntimeError('Function "cuMemRangeGetAttributes" not found')
 *     err = (<CUresult (*)(void**, size_t*, CUmem_range_attribute*, size_t, CUdeviceptr, size_t) nogil> __cuMemRangeGetAttributes)(data, dataSizes, attributes, numAttributes, devPtr, count)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5628
 * 
 * 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:
 *     global __cuMemRangeGetAttributes             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemRangeGetAttributes == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5627
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuMemRangeGetAttributes
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuMemRangeGetAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5636
 *     return err
 * 
 * cdef CUresult _cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuPointerSetAttribute
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuPointerSetAttribute(void const *__pyx_v_value, CUpointer_attribute __pyx_v_attribute, CUdeviceptr __pyx_v_ptr) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuPointerSetAttribute", 1);
  __Pyx_TraceCall("_cuPointerSetAttribute", __pyx_f[0], 5636, 1, __PYX_ERR(0, 5636, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5637
 * 
 * cdef CUresult _cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuPointerSetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuPointerSetAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5638
 * cdef CUresult _cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuPointerSetAttribute
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuPointerSetAttribute == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5638, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5639
 *     global __cuPointerSetAttribute
 *     cuPythonInit()
 *     if __cuPointerSetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuPointerSetAttribute" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuPointerSetAttribute == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5640
 *     cuPythonInit()
 *     if __cuPointerSetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuPointerSetAttribute" not found')
 *     err = (<CUresult (*)(const void*, CUpointer_attribute, CUdeviceptr) nogil> __cuPointerSetAttribute)(value, attribute, ptr)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5641
 *     if __cuPointerSetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuPointerSetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const void*, CUpointer_attribute, CUdeviceptr) nogil> __cuPointerSetAttribute)(value, attribute, ptr)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__190, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5641, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5641, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5640
 *     cuPythonInit()
 *     if __cuPointerSetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuPointerSetAttribute" not found')
 *     err = (<CUresult (*)(const void*, CUpointer_attribute, CUdeviceptr) nogil> __cuPointerSetAttribute)(value, attribute, ptr)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5639
 *     global __cuPointerSetAttribute
 *     cuPythonInit()
 *     if __cuPointerSetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuPointerSetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5642
 *         with gil:
 *             raise RuntimeError('Function "cuPointerSetAttribute" not found')
 *     err = (<CUresult (*)(const void*, CUpointer_attribute, CUdeviceptr) nogil> __cuPointerSetAttribute)(value, attribute, ptr)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(void const *, CUpointer_attribute, CUdeviceptr))__pyx_v_4cuda_5_cuda_5ccuda___cuPointerSetAttribute)(__pyx_v_value, __pyx_v_attribute, __pyx_v_ptr);

    /* "cuda/_cuda/ccuda.pyx":5643
 *             raise RuntimeError('Function "cuPointerSetAttribute" not found')
 *     err = (<CUresult (*)(const void*, CUpointer_attribute, CUdeviceptr) nogil> __cuPointerSetAttribute)(value, attribute, ptr)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5637
 * 
 * cdef CUresult _cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuPointerSetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuPointerSetAttribute == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5636
 *     return err
 * 
 * cdef CUresult _cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuPointerSetAttribute
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuPointerSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5645
 *     return err
 * 
 * cdef CUresult _cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuPointerGetAttributes
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuPointerGetAttributes(unsigned int __pyx_v_numAttributes, CUpointer_attribute *__pyx_v_attributes, void **__pyx_v_data, CUdeviceptr __pyx_v_ptr) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuPointerGetAttributes", 1);
  __Pyx_TraceCall("_cuPointerGetAttributes", __pyx_f[0], 5645, 1, __PYX_ERR(0, 5645, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5646
 * 
 * cdef CUresult _cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuPointerGetAttributes             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuPointerGetAttributes == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5647
 * cdef CUresult _cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuPointerGetAttributes
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuPointerGetAttributes == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5647, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5648
 *     global __cuPointerGetAttributes
 *     cuPythonInit()
 *     if __cuPointerGetAttributes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuPointerGetAttributes" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuPointerGetAttributes == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5649
 *     cuPythonInit()
 *     if __cuPointerGetAttributes == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuPointerGetAttributes" not found')
 *     err = (<CUresult (*)(unsigned int, CUpointer_attribute*, void**, CUdeviceptr) nogil> __cuPointerGetAttributes)(numAttributes, attributes, data, ptr)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5650
 *     if __cuPointerGetAttributes == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuPointerGetAttributes" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int, CUpointer_attribute*, void**, CUdeviceptr) nogil> __cuPointerGetAttributes)(numAttributes, attributes, data, ptr)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__191, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5650, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5650, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5649
 *     cuPythonInit()
 *     if __cuPointerGetAttributes == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuPointerGetAttributes" not found')
 *     err = (<CUresult (*)(unsigned int, CUpointer_attribute*, void**, CUdeviceptr) nogil> __cuPointerGetAttributes)(numAttributes, attributes, data, ptr)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5648
 *     global __cuPointerGetAttributes
 *     cuPythonInit()
 *     if __cuPointerGetAttributes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuPointerGetAttributes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5651
 *         with gil:
 *             raise RuntimeError('Function "cuPointerGetAttributes" not found')
 *     err = (<CUresult (*)(unsigned int, CUpointer_attribute*, void**, CUdeviceptr) nogil> __cuPointerGetAttributes)(numAttributes, attributes, data, ptr)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(unsigned int, CUpointer_attribute *, void **, CUdeviceptr))__pyx_v_4cuda_5_cuda_5ccuda___cuPointerGetAttributes)(__pyx_v_numAttributes, __pyx_v_attributes, __pyx_v_data, __pyx_v_ptr);

    /* "cuda/_cuda/ccuda.pyx":5652
 *             raise RuntimeError('Function "cuPointerGetAttributes" not found')
 *     err = (<CUresult (*)(unsigned int, CUpointer_attribute*, void**, CUdeviceptr) nogil> __cuPointerGetAttributes)(numAttributes, attributes, data, ptr)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamCreate(CUstream* phStream, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5646
 * 
 * cdef CUresult _cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuPointerGetAttributes             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuPointerGetAttributes == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5645
 *     return err
 * 
 * cdef CUresult _cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuPointerGetAttributes
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuPointerGetAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5654
 *     return err
 * 
 * cdef CUresult _cuStreamCreate(CUstream* phStream, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamCreate
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamCreate(CUstream *__pyx_v_phStream, unsigned int __pyx_v_Flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuStreamCreate", 1);
  __Pyx_TraceCall("_cuStreamCreate", __pyx_f[0], 5654, 1, __PYX_ERR(0, 5654, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5655
 * 
 * cdef CUresult _cuStreamCreate(CUstream* phStream, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamCreate == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5656
 * cdef CUresult _cuStreamCreate(CUstream* phStream, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamCreate
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamCreate == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5656, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5657
 *     global __cuStreamCreate
 *     cuPythonInit()
 *     if __cuStreamCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCreate" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamCreate == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5658
 *     cuPythonInit()
 *     if __cuStreamCreate == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamCreate" not found')
 *     err = (<CUresult (*)(CUstream*, unsigned int) nogil> __cuStreamCreate)(phStream, Flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5659
 *     if __cuStreamCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream*, unsigned int) nogil> __cuStreamCreate)(phStream, Flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__192, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5659, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5659, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5658
 *     cuPythonInit()
 *     if __cuStreamCreate == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamCreate" not found')
 *     err = (<CUresult (*)(CUstream*, unsigned int) nogil> __cuStreamCreate)(phStream, Flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5657
 *     global __cuStreamCreate
 *     cuPythonInit()
 *     if __cuStreamCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5660
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCreate" not found')
 *     err = (<CUresult (*)(CUstream*, unsigned int) nogil> __cuStreamCreate)(phStream, Flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream *, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamCreate)(__pyx_v_phStream, __pyx_v_Flags);

    /* "cuda/_cuda/ccuda.pyx":5661
 *             raise RuntimeError('Function "cuStreamCreate" not found')
 *     err = (<CUresult (*)(CUstream*, unsigned int) nogil> __cuStreamCreate)(phStream, Flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5655
 * 
 * cdef CUresult _cuStreamCreate(CUstream* phStream, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamCreate == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5654
 *     return err
 * 
 * cdef CUresult _cuStreamCreate(CUstream* phStream, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamCreate
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuStreamCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5663
 *     return err
 * 
 * cdef CUresult _cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamCreateWithPriority
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamCreateWithPriority(CUstream *__pyx_v_phStream, unsigned int __pyx_v_flags, int __pyx_v_priority) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuStreamCreateWithPriority", 1);
  __Pyx_TraceCall("_cuStreamCreateWithPriority", __pyx_f[0], 5663, 1, __PYX_ERR(0, 5663, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5664
 * 
 * cdef CUresult _cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamCreateWithPriority             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamCreateWithPriority == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5665
 * cdef CUresult _cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamCreateWithPriority
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamCreateWithPriority == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5665, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5666
 *     global __cuStreamCreateWithPriority
 *     cuPythonInit()
 *     if __cuStreamCreateWithPriority == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCreateWithPriority" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamCreateWithPriority == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5667
 *     cuPythonInit()
 *     if __cuStreamCreateWithPriority == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamCreateWithPriority" not found')
 *     err = (<CUresult (*)(CUstream*, unsigned int, int) nogil> __cuStreamCreateWithPriority)(phStream, flags, priority)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5668
 *     if __cuStreamCreateWithPriority == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCreateWithPriority" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream*, unsigned int, int) nogil> __cuStreamCreateWithPriority)(phStream, flags, priority)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__193, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5668, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5668, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5667
 *     cuPythonInit()
 *     if __cuStreamCreateWithPriority == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamCreateWithPriority" not found')
 *     err = (<CUresult (*)(CUstream*, unsigned int, int) nogil> __cuStreamCreateWithPriority)(phStream, flags, priority)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5666
 *     global __cuStreamCreateWithPriority
 *     cuPythonInit()
 *     if __cuStreamCreateWithPriority == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCreateWithPriority" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5669
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCreateWithPriority" not found')
 *     err = (<CUresult (*)(CUstream*, unsigned int, int) nogil> __cuStreamCreateWithPriority)(phStream, flags, priority)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream *, unsigned int, int))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamCreateWithPriority)(__pyx_v_phStream, __pyx_v_flags, __pyx_v_priority);

    /* "cuda/_cuda/ccuda.pyx":5670
 *             raise RuntimeError('Function "cuStreamCreateWithPriority" not found')
 *     err = (<CUresult (*)(CUstream*, unsigned int, int) nogil> __cuStreamCreateWithPriority)(phStream, flags, priority)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamGetPriority(CUstream hStream, int* priority) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5664
 * 
 * cdef CUresult _cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamCreateWithPriority             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamCreateWithPriority == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5663
 *     return err
 * 
 * cdef CUresult _cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamCreateWithPriority
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuStreamCreateWithPriority", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5672
 *     return err
 * 
 * cdef CUresult _cuStreamGetPriority(CUstream hStream, int* priority) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamGetPriority
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetPriority(CUstream __pyx_v_hStream, int *__pyx_v_priority) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuStreamGetPriority", 1);
  __Pyx_TraceCall("_cuStreamGetPriority", __pyx_f[0], 5672, 1, __PYX_ERR(0, 5672, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5673
 * 
 * cdef CUresult _cuStreamGetPriority(CUstream hStream, int* priority) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamGetPriority             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamGetPriority == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5674
 * cdef CUresult _cuStreamGetPriority(CUstream hStream, int* priority) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamGetPriority
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamGetPriority == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5674, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5675
 *     global __cuStreamGetPriority
 *     cuPythonInit()
 *     if __cuStreamGetPriority == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetPriority" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetPriority == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5676
 *     cuPythonInit()
 *     if __cuStreamGetPriority == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamGetPriority" not found')
 *     err = (<CUresult (*)(CUstream, int*) nogil> __cuStreamGetPriority)(hStream, priority)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5677
 *     if __cuStreamGetPriority == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetPriority" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, int*) nogil> __cuStreamGetPriority)(hStream, priority)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__194, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5677, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5677, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5676
 *     cuPythonInit()
 *     if __cuStreamGetPriority == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamGetPriority" not found')
 *     err = (<CUresult (*)(CUstream, int*) nogil> __cuStreamGetPriority)(hStream, priority)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5675
 *     global __cuStreamGetPriority
 *     cuPythonInit()
 *     if __cuStreamGetPriority == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetPriority" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5678
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetPriority" not found')
 *     err = (<CUresult (*)(CUstream, int*) nogil> __cuStreamGetPriority)(hStream, priority)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream, int *))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetPriority)(__pyx_v_hStream, __pyx_v_priority);

    /* "cuda/_cuda/ccuda.pyx":5679
 *             raise RuntimeError('Function "cuStreamGetPriority" not found')
 *     err = (<CUresult (*)(CUstream, int*) nogil> __cuStreamGetPriority)(hStream, priority)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamGetFlags(CUstream hStream, unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5673
 * 
 * cdef CUresult _cuStreamGetPriority(CUstream hStream, int* priority) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamGetPriority             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamGetPriority == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5672
 *     return err
 * 
 * cdef CUresult _cuStreamGetPriority(CUstream hStream, int* priority) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamGetPriority
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuStreamGetPriority", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5681
 *     return err
 * 
 * cdef CUresult _cuStreamGetFlags(CUstream hStream, unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamGetFlags
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetFlags(CUstream __pyx_v_hStream, unsigned int *__pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuStreamGetFlags", 1);
  __Pyx_TraceCall("_cuStreamGetFlags", __pyx_f[0], 5681, 1, __PYX_ERR(0, 5681, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5682
 * 
 * cdef CUresult _cuStreamGetFlags(CUstream hStream, unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamGetFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamGetFlags == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5683
 * cdef CUresult _cuStreamGetFlags(CUstream hStream, unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamGetFlags
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamGetFlags == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5683, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5684
 *     global __cuStreamGetFlags
 *     cuPythonInit()
 *     if __cuStreamGetFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetFlags" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetFlags == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5685
 *     cuPythonInit()
 *     if __cuStreamGetFlags == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamGetFlags" not found')
 *     err = (<CUresult (*)(CUstream, unsigned int*) nogil> __cuStreamGetFlags)(hStream, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5686
 *     if __cuStreamGetFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, unsigned int*) nogil> __cuStreamGetFlags)(hStream, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__195, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5686, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5686, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5685
 *     cuPythonInit()
 *     if __cuStreamGetFlags == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamGetFlags" not found')
 *     err = (<CUresult (*)(CUstream, unsigned int*) nogil> __cuStreamGetFlags)(hStream, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5684
 *     global __cuStreamGetFlags
 *     cuPythonInit()
 *     if __cuStreamGetFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5687
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetFlags" not found')
 *     err = (<CUresult (*)(CUstream, unsigned int*) nogil> __cuStreamGetFlags)(hStream, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream, unsigned int *))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetFlags)(__pyx_v_hStream, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":5688
 *             raise RuntimeError('Function "cuStreamGetFlags" not found')
 *     err = (<CUresult (*)(CUstream, unsigned int*) nogil> __cuStreamGetFlags)(hStream, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamGetId(CUstream hStream, unsigned long long* streamId) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5682
 * 
 * cdef CUresult _cuStreamGetFlags(CUstream hStream, unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamGetFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamGetFlags == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5681
 *     return err
 * 
 * cdef CUresult _cuStreamGetFlags(CUstream hStream, unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamGetFlags
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuStreamGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5690
 *     return err
 * 
 * cdef CUresult _cuStreamGetId(CUstream hStream, unsigned long long* streamId) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamGetId
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetId(CUstream __pyx_v_hStream, unsigned PY_LONG_LONG *__pyx_v_streamId) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuStreamGetId", 1);
  __Pyx_TraceCall("_cuStreamGetId", __pyx_f[0], 5690, 1, __PYX_ERR(0, 5690, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5691
 * 
 * cdef CUresult _cuStreamGetId(CUstream hStream, unsigned long long* streamId) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamGetId             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamGetId == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5692
 * cdef CUresult _cuStreamGetId(CUstream hStream, unsigned long long* streamId) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamGetId
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamGetId == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5692, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5693
 *     global __cuStreamGetId
 *     cuPythonInit()
 *     if __cuStreamGetId == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetId" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetId == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5694
 *     cuPythonInit()
 *     if __cuStreamGetId == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamGetId" not found')
 *     err = (<CUresult (*)(CUstream, unsigned long long*) nogil> __cuStreamGetId)(hStream, streamId)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5695
 *     if __cuStreamGetId == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetId" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, unsigned long long*) nogil> __cuStreamGetId)(hStream, streamId)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__196, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5695, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5695, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5694
 *     cuPythonInit()
 *     if __cuStreamGetId == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamGetId" not found')
 *     err = (<CUresult (*)(CUstream, unsigned long long*) nogil> __cuStreamGetId)(hStream, streamId)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5693
 *     global __cuStreamGetId
 *     cuPythonInit()
 *     if __cuStreamGetId == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetId" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5696
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetId" not found')
 *     err = (<CUresult (*)(CUstream, unsigned long long*) nogil> __cuStreamGetId)(hStream, streamId)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream, unsigned PY_LONG_LONG *))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetId)(__pyx_v_hStream, __pyx_v_streamId);

    /* "cuda/_cuda/ccuda.pyx":5697
 *             raise RuntimeError('Function "cuStreamGetId" not found')
 *     err = (<CUresult (*)(CUstream, unsigned long long*) nogil> __cuStreamGetId)(hStream, streamId)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamGetCtx(CUstream hStream, CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5691
 * 
 * cdef CUresult _cuStreamGetId(CUstream hStream, unsigned long long* streamId) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamGetId             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamGetId == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5690
 *     return err
 * 
 * cdef CUresult _cuStreamGetId(CUstream hStream, unsigned long long* streamId) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamGetId
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuStreamGetId", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5699
 *     return err
 * 
 * cdef CUresult _cuStreamGetCtx(CUstream hStream, CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamGetCtx
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCtx(CUstream __pyx_v_hStream, CUcontext *__pyx_v_pctx) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuStreamGetCtx", 1);
  __Pyx_TraceCall("_cuStreamGetCtx", __pyx_f[0], 5699, 1, __PYX_ERR(0, 5699, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5700
 * 
 * cdef CUresult _cuStreamGetCtx(CUstream hStream, CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamGetCtx             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamGetCtx == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5701
 * cdef CUresult _cuStreamGetCtx(CUstream hStream, CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamGetCtx
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamGetCtx == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5701, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5702
 *     global __cuStreamGetCtx
 *     cuPythonInit()
 *     if __cuStreamGetCtx == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetCtx" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCtx == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5703
 *     cuPythonInit()
 *     if __cuStreamGetCtx == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamGetCtx" not found')
 *     err = (<CUresult (*)(CUstream, CUcontext*) nogil> __cuStreamGetCtx)(hStream, pctx)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5704
 *     if __cuStreamGetCtx == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetCtx" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUcontext*) nogil> __cuStreamGetCtx)(hStream, pctx)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__197, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5704, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5704, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5703
 *     cuPythonInit()
 *     if __cuStreamGetCtx == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamGetCtx" not found')
 *     err = (<CUresult (*)(CUstream, CUcontext*) nogil> __cuStreamGetCtx)(hStream, pctx)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5702
 *     global __cuStreamGetCtx
 *     cuPythonInit()
 *     if __cuStreamGetCtx == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetCtx" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5705
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetCtx" not found')
 *     err = (<CUresult (*)(CUstream, CUcontext*) nogil> __cuStreamGetCtx)(hStream, pctx)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream, CUcontext *))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCtx)(__pyx_v_hStream, __pyx_v_pctx);

    /* "cuda/_cuda/ccuda.pyx":5706
 *             raise RuntimeError('Function "cuStreamGetCtx" not found')
 *     err = (<CUresult (*)(CUstream, CUcontext*) nogil> __cuStreamGetCtx)(hStream, pctx)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5700
 * 
 * cdef CUresult _cuStreamGetCtx(CUstream hStream, CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamGetCtx             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamGetCtx == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5699
 *     return err
 * 
 * cdef CUresult _cuStreamGetCtx(CUstream hStream, CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamGetCtx
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuStreamGetCtx", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5708
 *     return err
 * 
 * cdef CUresult _cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamWaitEvent
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitEvent(CUstream __pyx_v_hStream, CUevent __pyx_v_hEvent, unsigned int __pyx_v_Flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuStreamWaitEvent", 1);
  __Pyx_TraceCall("_cuStreamWaitEvent", __pyx_f[0], 5708, 1, __PYX_ERR(0, 5708, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5709
 * 
 * cdef CUresult _cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamWaitEvent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamWaitEvent == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5710
 * cdef CUresult _cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamWaitEvent
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamWaitEvent == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5710, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5711
 *     global __cuStreamWaitEvent
 *     cuPythonInit()
 *     if __cuStreamWaitEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitEvent" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitEvent == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5712
 *     cuPythonInit()
 *     if __cuStreamWaitEvent == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamWaitEvent" not found')
 *     err = (<CUresult (*)(CUstream, CUevent, unsigned int) nogil> __cuStreamWaitEvent)(hStream, hEvent, Flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5713
 *     if __cuStreamWaitEvent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitEvent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUevent, unsigned int) nogil> __cuStreamWaitEvent)(hStream, hEvent, Flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__198, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5713, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5713, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5712
 *     cuPythonInit()
 *     if __cuStreamWaitEvent == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamWaitEvent" not found')
 *     err = (<CUresult (*)(CUstream, CUevent, unsigned int) nogil> __cuStreamWaitEvent)(hStream, hEvent, Flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5711
 *     global __cuStreamWaitEvent
 *     cuPythonInit()
 *     if __cuStreamWaitEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitEvent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5714
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitEvent" not found')
 *     err = (<CUresult (*)(CUstream, CUevent, unsigned int) nogil> __cuStreamWaitEvent)(hStream, hEvent, Flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream, CUevent, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitEvent)(__pyx_v_hStream, __pyx_v_hEvent, __pyx_v_Flags);

    /* "cuda/_cuda/ccuda.pyx":5715
 *             raise RuntimeError('Function "cuStreamWaitEvent" not found')
 *     err = (<CUresult (*)(CUstream, CUevent, unsigned int) nogil> __cuStreamWaitEvent)(hStream, hEvent, Flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5709
 * 
 * cdef CUresult _cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamWaitEvent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamWaitEvent == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5708
 *     return err
 * 
 * cdef CUresult _cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamWaitEvent
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuStreamWaitEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5717
 *     return err
 * 
 * cdef CUresult _cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamAddCallback
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamAddCallback(CUstream __pyx_v_hStream, CUstreamCallback __pyx_v_callback, void *__pyx_v_userData, unsigned int __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuStreamAddCallback", 1);
  __Pyx_TraceCall("_cuStreamAddCallback", __pyx_f[0], 5717, 1, __PYX_ERR(0, 5717, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5718
 * 
 * cdef CUresult _cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamAddCallback             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamAddCallback == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5719
 * cdef CUresult _cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamAddCallback
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamAddCallback == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5719, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5720
 *     global __cuStreamAddCallback
 *     cuPythonInit()
 *     if __cuStreamAddCallback == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamAddCallback" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamAddCallback == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5721
 *     cuPythonInit()
 *     if __cuStreamAddCallback == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamAddCallback" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamCallback, void*, unsigned int) nogil> __cuStreamAddCallback)(hStream, callback, userData, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5722
 *     if __cuStreamAddCallback == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamAddCallback" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUstreamCallback, void*, unsigned int) nogil> __cuStreamAddCallback)(hStream, callback, userData, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__199, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5722, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5722, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5721
 *     cuPythonInit()
 *     if __cuStreamAddCallback == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamAddCallback" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamCallback, void*, unsigned int) nogil> __cuStreamAddCallback)(hStream, callback, userData, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5720
 *     global __cuStreamAddCallback
 *     cuPythonInit()
 *     if __cuStreamAddCallback == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamAddCallback" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5723
 *         with gil:
 *             raise RuntimeError('Function "cuStreamAddCallback" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamCallback, void*, unsigned int) nogil> __cuStreamAddCallback)(hStream, callback, userData, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream, CUstreamCallback, void *, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamAddCallback)(__pyx_v_hStream, __pyx_v_callback, __pyx_v_userData, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":5724
 *             raise RuntimeError('Function "cuStreamAddCallback" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamCallback, void*, unsigned int) nogil> __cuStreamAddCallback)(hStream, callback, userData, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamBeginCapture_v2(CUstream hStream, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5718
 * 
 * cdef CUresult _cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamAddCallback             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamAddCallback == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5717
 *     return err
 * 
 * cdef CUresult _cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamAddCallback
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuStreamAddCallback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5726
 *     return err
 * 
 * cdef CUresult _cuStreamBeginCapture_v2(CUstream hStream, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamBeginCapture_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamBeginCapture_v2(CUstream __pyx_v_hStream, CUstreamCaptureMode __pyx_v_mode) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuStreamBeginCapture_v2", 1);
  __Pyx_TraceCall("_cuStreamBeginCapture_v2", __pyx_f[0], 5726, 1, __PYX_ERR(0, 5726, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5727
 * 
 * cdef CUresult _cuStreamBeginCapture_v2(CUstream hStream, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamBeginCapture_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamBeginCapture_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5728
 * cdef CUresult _cuStreamBeginCapture_v2(CUstream hStream, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamBeginCapture_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamBeginCapture_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5728, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5729
 *     global __cuStreamBeginCapture_v2
 *     cuPythonInit()
 *     if __cuStreamBeginCapture_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamBeginCapture_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamBeginCapture_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5730
 *     cuPythonInit()
 *     if __cuStreamBeginCapture_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamBeginCapture_v2" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureMode) nogil> __cuStreamBeginCapture_v2)(hStream, mode)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5731
 *     if __cuStreamBeginCapture_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamBeginCapture_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureMode) nogil> __cuStreamBeginCapture_v2)(hStream, mode)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__200, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5731, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5731, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5730
 *     cuPythonInit()
 *     if __cuStreamBeginCapture_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamBeginCapture_v2" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureMode) nogil> __cuStreamBeginCapture_v2)(hStream, mode)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5729
 *     global __cuStreamBeginCapture_v2
 *     cuPythonInit()
 *     if __cuStreamBeginCapture_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamBeginCapture_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5732
 *         with gil:
 *             raise RuntimeError('Function "cuStreamBeginCapture_v2" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureMode) nogil> __cuStreamBeginCapture_v2)(hStream, mode)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream, CUstreamCaptureMode))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamBeginCapture_v2)(__pyx_v_hStream, __pyx_v_mode);

    /* "cuda/_cuda/ccuda.pyx":5733
 *             raise RuntimeError('Function "cuStreamBeginCapture_v2" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureMode) nogil> __cuStreamBeginCapture_v2)(hStream, mode)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5727
 * 
 * cdef CUresult _cuStreamBeginCapture_v2(CUstream hStream, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamBeginCapture_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamBeginCapture_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5726
 *     return err
 * 
 * cdef CUresult _cuStreamBeginCapture_v2(CUstream hStream, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamBeginCapture_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuStreamBeginCapture_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5735
 *     return err
 * 
 * cdef CUresult _cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuThreadExchangeStreamCaptureMode
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode *__pyx_v_mode) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuThreadExchangeStreamCaptureMode", 1);
  __Pyx_TraceCall("_cuThreadExchangeStreamCaptureMode", __pyx_f[0], 5735, 1, __PYX_ERR(0, 5735, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5736
 * 
 * cdef CUresult _cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuThreadExchangeStreamCaptureMode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuThreadExchangeStreamCaptureMode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5737
 * cdef CUresult _cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuThreadExchangeStreamCaptureMode
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuThreadExchangeStreamCaptureMode == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5737, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5738
 *     global __cuThreadExchangeStreamCaptureMode
 *     cuPythonInit()
 *     if __cuThreadExchangeStreamCaptureMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuThreadExchangeStreamCaptureMode" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuThreadExchangeStreamCaptureMode == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5739
 *     cuPythonInit()
 *     if __cuThreadExchangeStreamCaptureMode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuThreadExchangeStreamCaptureMode" not found')
 *     err = (<CUresult (*)(CUstreamCaptureMode*) nogil> __cuThreadExchangeStreamCaptureMode)(mode)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5740
 *     if __cuThreadExchangeStreamCaptureMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuThreadExchangeStreamCaptureMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstreamCaptureMode*) nogil> __cuThreadExchangeStreamCaptureMode)(mode)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__201, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5740, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5740, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5739
 *     cuPythonInit()
 *     if __cuThreadExchangeStreamCaptureMode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuThreadExchangeStreamCaptureMode" not found')
 *     err = (<CUresult (*)(CUstreamCaptureMode*) nogil> __cuThreadExchangeStreamCaptureMode)(mode)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5738
 *     global __cuThreadExchangeStreamCaptureMode
 *     cuPythonInit()
 *     if __cuThreadExchangeStreamCaptureMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuThreadExchangeStreamCaptureMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5741
 *         with gil:
 *             raise RuntimeError('Function "cuThreadExchangeStreamCaptureMode" not found')
 *     err = (<CUresult (*)(CUstreamCaptureMode*) nogil> __cuThreadExchangeStreamCaptureMode)(mode)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstreamCaptureMode *))__pyx_v_4cuda_5_cuda_5ccuda___cuThreadExchangeStreamCaptureMode)(__pyx_v_mode);

    /* "cuda/_cuda/ccuda.pyx":5742
 *             raise RuntimeError('Function "cuThreadExchangeStreamCaptureMode" not found')
 *     err = (<CUresult (*)(CUstreamCaptureMode*) nogil> __cuThreadExchangeStreamCaptureMode)(mode)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5736
 * 
 * cdef CUresult _cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuThreadExchangeStreamCaptureMode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuThreadExchangeStreamCaptureMode == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5735
 *     return err
 * 
 * cdef CUresult _cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuThreadExchangeStreamCaptureMode
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuThreadExchangeStreamCaptureMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5744
 *     return err
 * 
 * cdef CUresult _cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamEndCapture
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamEndCapture(CUstream __pyx_v_hStream, CUgraph *__pyx_v_phGraph) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuStreamEndCapture", 1);
  __Pyx_TraceCall("_cuStreamEndCapture", __pyx_f[0], 5744, 1, __PYX_ERR(0, 5744, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5745
 * 
 * cdef CUresult _cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamEndCapture             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamEndCapture == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5746
 * cdef CUresult _cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamEndCapture
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamEndCapture == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5746, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5747
 *     global __cuStreamEndCapture
 *     cuPythonInit()
 *     if __cuStreamEndCapture == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamEndCapture" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamEndCapture == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5748
 *     cuPythonInit()
 *     if __cuStreamEndCapture == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamEndCapture" not found')
 *     err = (<CUresult (*)(CUstream, CUgraph*) nogil> __cuStreamEndCapture)(hStream, phGraph)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5749
 *     if __cuStreamEndCapture == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamEndCapture" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUgraph*) nogil> __cuStreamEndCapture)(hStream, phGraph)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__202, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5749, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5749, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5748
 *     cuPythonInit()
 *     if __cuStreamEndCapture == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamEndCapture" not found')
 *     err = (<CUresult (*)(CUstream, CUgraph*) nogil> __cuStreamEndCapture)(hStream, phGraph)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5747
 *     global __cuStreamEndCapture
 *     cuPythonInit()
 *     if __cuStreamEndCapture == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamEndCapture" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5750
 *         with gil:
 *             raise RuntimeError('Function "cuStreamEndCapture" not found')
 *     err = (<CUresult (*)(CUstream, CUgraph*) nogil> __cuStreamEndCapture)(hStream, phGraph)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream, CUgraph *))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamEndCapture)(__pyx_v_hStream, __pyx_v_phGraph);

    /* "cuda/_cuda/ccuda.pyx":5751
 *             raise RuntimeError('Function "cuStreamEndCapture" not found')
 *     err = (<CUresult (*)(CUstream, CUgraph*) nogil> __cuStreamEndCapture)(hStream, phGraph)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5745
 * 
 * cdef CUresult _cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamEndCapture             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamEndCapture == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5744
 *     return err
 * 
 * cdef CUresult _cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamEndCapture
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuStreamEndCapture", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5753
 *     return err
 * 
 * cdef CUresult _cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamIsCapturing
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamIsCapturing(CUstream __pyx_v_hStream, CUstreamCaptureStatus *__pyx_v_captureStatus) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuStreamIsCapturing", 1);
  __Pyx_TraceCall("_cuStreamIsCapturing", __pyx_f[0], 5753, 1, __PYX_ERR(0, 5753, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5754
 * 
 * cdef CUresult _cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamIsCapturing             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamIsCapturing == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5755
 * cdef CUresult _cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamIsCapturing
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamIsCapturing == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5755, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5756
 *     global __cuStreamIsCapturing
 *     cuPythonInit()
 *     if __cuStreamIsCapturing == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamIsCapturing" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamIsCapturing == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5757
 *     cuPythonInit()
 *     if __cuStreamIsCapturing == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamIsCapturing" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureStatus*) nogil> __cuStreamIsCapturing)(hStream, captureStatus)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5758
 *     if __cuStreamIsCapturing == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamIsCapturing" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureStatus*) nogil> __cuStreamIsCapturing)(hStream, captureStatus)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__203, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5758, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5758, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5757
 *     cuPythonInit()
 *     if __cuStreamIsCapturing == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamIsCapturing" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureStatus*) nogil> __cuStreamIsCapturing)(hStream, captureStatus)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5756
 *     global __cuStreamIsCapturing
 *     cuPythonInit()
 *     if __cuStreamIsCapturing == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamIsCapturing" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5759
 *         with gil:
 *             raise RuntimeError('Function "cuStreamIsCapturing" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureStatus*) nogil> __cuStreamIsCapturing)(hStream, captureStatus)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream, CUstreamCaptureStatus *))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamIsCapturing)(__pyx_v_hStream, __pyx_v_captureStatus);

    /* "cuda/_cuda/ccuda.pyx":5760
 *             raise RuntimeError('Function "cuStreamIsCapturing" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureStatus*) nogil> __cuStreamIsCapturing)(hStream, captureStatus)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * 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:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5754
 * 
 * cdef CUresult _cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamIsCapturing             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamIsCapturing == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5753
 *     return err
 * 
 * cdef CUresult _cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamIsCapturing
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuStreamIsCapturing", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5762
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuStreamGetCaptureInfo_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCaptureInfo_v2(CUstream __pyx_v_hStream, CUstreamCaptureStatus *__pyx_v_captureStatus_out, cuuint64_t *__pyx_v_id_out, CUgraph *__pyx_v_graph_out, CUgraphNode const **__pyx_v_dependencies_out, size_t *__pyx_v_numDependencies_out) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuStreamGetCaptureInfo_v2", 1);
  __Pyx_TraceCall("_cuStreamGetCaptureInfo_v2", __pyx_f[0], 5762, 1, __PYX_ERR(0, 5762, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5763
 * 
 * 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:
 *     global __cuStreamGetCaptureInfo_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamGetCaptureInfo_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5764
 * 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:
 *     global __cuStreamGetCaptureInfo_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamGetCaptureInfo_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5764, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5765
 *     global __cuStreamGetCaptureInfo_v2
 *     cuPythonInit()
 *     if __cuStreamGetCaptureInfo_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetCaptureInfo_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCaptureInfo_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5766
 *     cuPythonInit()
 *     if __cuStreamGetCaptureInfo_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamGetCaptureInfo_v2" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureStatus*, cuuint64_t*, CUgraph*, const CUgraphNode**, size_t*) nogil> __cuStreamGetCaptureInfo_v2)(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5767
 *     if __cuStreamGetCaptureInfo_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetCaptureInfo_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureStatus*, cuuint64_t*, CUgraph*, const CUgraphNode**, size_t*) nogil> __cuStreamGetCaptureInfo_v2)(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__204, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5767, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5767, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5766
 *     cuPythonInit()
 *     if __cuStreamGetCaptureInfo_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamGetCaptureInfo_v2" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureStatus*, cuuint64_t*, CUgraph*, const CUgraphNode**, size_t*) nogil> __cuStreamGetCaptureInfo_v2)(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5765
 *     global __cuStreamGetCaptureInfo_v2
 *     cuPythonInit()
 *     if __cuStreamGetCaptureInfo_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetCaptureInfo_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5768
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetCaptureInfo_v2" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureStatus*, cuuint64_t*, CUgraph*, const CUgraphNode**, size_t*) nogil> __cuStreamGetCaptureInfo_v2)(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream, CUstreamCaptureStatus *, cuuint64_t *, CUgraph *, CUgraphNode const **, size_t *))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCaptureInfo_v2)(__pyx_v_hStream, __pyx_v_captureStatus_out, __pyx_v_id_out, __pyx_v_graph_out, __pyx_v_dependencies_out, __pyx_v_numDependencies_out);

    /* "cuda/_cuda/ccuda.pyx":5769
 *             raise RuntimeError('Function "cuStreamGetCaptureInfo_v2" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureStatus*, cuuint64_t*, CUgraph*, const CUgraphNode**, size_t*) nogil> __cuStreamGetCaptureInfo_v2)(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5763
 * 
 * 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:
 *     global __cuStreamGetCaptureInfo_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamGetCaptureInfo_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5762
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuStreamGetCaptureInfo_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuStreamGetCaptureInfo_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5771
 *     return err
 * 
 * cdef CUresult _cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamUpdateCaptureDependencies
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamUpdateCaptureDependencies(CUstream __pyx_v_hStream, CUgraphNode *__pyx_v_dependencies, size_t __pyx_v_numDependencies, unsigned int __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuStreamUpdateCaptureDependencies", 1);
  __Pyx_TraceCall("_cuStreamUpdateCaptureDependencies", __pyx_f[0], 5771, 1, __PYX_ERR(0, 5771, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5772
 * 
 * cdef CUresult _cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamUpdateCaptureDependencies             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamUpdateCaptureDependencies == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5773
 * cdef CUresult _cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamUpdateCaptureDependencies
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamUpdateCaptureDependencies == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5773, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5774
 *     global __cuStreamUpdateCaptureDependencies
 *     cuPythonInit()
 *     if __cuStreamUpdateCaptureDependencies == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamUpdateCaptureDependencies" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamUpdateCaptureDependencies == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5775
 *     cuPythonInit()
 *     if __cuStreamUpdateCaptureDependencies == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamUpdateCaptureDependencies" not found')
 *     err = (<CUresult (*)(CUstream, CUgraphNode*, size_t, unsigned int) nogil> __cuStreamUpdateCaptureDependencies)(hStream, dependencies, numDependencies, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5776
 *     if __cuStreamUpdateCaptureDependencies == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamUpdateCaptureDependencies" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUgraphNode*, size_t, unsigned int) nogil> __cuStreamUpdateCaptureDependencies)(hStream, dependencies, numDependencies, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__205, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5776, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5776, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5775
 *     cuPythonInit()
 *     if __cuStreamUpdateCaptureDependencies == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamUpdateCaptureDependencies" not found')
 *     err = (<CUresult (*)(CUstream, CUgraphNode*, size_t, unsigned int) nogil> __cuStreamUpdateCaptureDependencies)(hStream, dependencies, numDependencies, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5774
 *     global __cuStreamUpdateCaptureDependencies
 *     cuPythonInit()
 *     if __cuStreamUpdateCaptureDependencies == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamUpdateCaptureDependencies" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5777
 *         with gil:
 *             raise RuntimeError('Function "cuStreamUpdateCaptureDependencies" not found')
 *     err = (<CUresult (*)(CUstream, CUgraphNode*, size_t, unsigned int) nogil> __cuStreamUpdateCaptureDependencies)(hStream, dependencies, numDependencies, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream, CUgraphNode *, size_t, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamUpdateCaptureDependencies)(__pyx_v_hStream, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":5778
 *             raise RuntimeError('Function "cuStreamUpdateCaptureDependencies" not found')
 *     err = (<CUresult (*)(CUstream, CUgraphNode*, size_t, unsigned int) nogil> __cuStreamUpdateCaptureDependencies)(hStream, dependencies, numDependencies, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5772
 * 
 * cdef CUresult _cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamUpdateCaptureDependencies             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamUpdateCaptureDependencies == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5771
 *     return err
 * 
 * cdef CUresult _cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamUpdateCaptureDependencies
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuStreamUpdateCaptureDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5780
 *     return err
 * 
 * cdef CUresult _cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamAttachMemAsync
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamAttachMemAsync(CUstream __pyx_v_hStream, CUdeviceptr __pyx_v_dptr, size_t __pyx_v_length, unsigned int __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuStreamAttachMemAsync", 1);
  __Pyx_TraceCall("_cuStreamAttachMemAsync", __pyx_f[0], 5780, 1, __PYX_ERR(0, 5780, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5781
 * 
 * cdef CUresult _cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamAttachMemAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamAttachMemAsync == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5782
 * cdef CUresult _cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamAttachMemAsync
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamAttachMemAsync == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5782, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5783
 *     global __cuStreamAttachMemAsync
 *     cuPythonInit()
 *     if __cuStreamAttachMemAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamAttachMemAsync" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamAttachMemAsync == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5784
 *     cuPythonInit()
 *     if __cuStreamAttachMemAsync == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamAttachMemAsync" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, size_t, unsigned int) nogil> __cuStreamAttachMemAsync)(hStream, dptr, length, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5785
 *     if __cuStreamAttachMemAsync == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamAttachMemAsync" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, size_t, unsigned int) nogil> __cuStreamAttachMemAsync)(hStream, dptr, length, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__206, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5785, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5785, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5784
 *     cuPythonInit()
 *     if __cuStreamAttachMemAsync == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamAttachMemAsync" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, size_t, unsigned int) nogil> __cuStreamAttachMemAsync)(hStream, dptr, length, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5783
 *     global __cuStreamAttachMemAsync
 *     cuPythonInit()
 *     if __cuStreamAttachMemAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamAttachMemAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5786
 *         with gil:
 *             raise RuntimeError('Function "cuStreamAttachMemAsync" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, size_t, unsigned int) nogil> __cuStreamAttachMemAsync)(hStream, dptr, length, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream, CUdeviceptr, size_t, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamAttachMemAsync)(__pyx_v_hStream, __pyx_v_dptr, __pyx_v_length, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":5787
 *             raise RuntimeError('Function "cuStreamAttachMemAsync" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, size_t, unsigned int) nogil> __cuStreamAttachMemAsync)(hStream, dptr, length, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamQuery(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5781
 * 
 * cdef CUresult _cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamAttachMemAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamAttachMemAsync == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5780
 *     return err
 * 
 * cdef CUresult _cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamAttachMemAsync
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuStreamAttachMemAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5789
 *     return err
 * 
 * cdef CUresult _cuStreamQuery(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamQuery
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamQuery(CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuStreamQuery", 1);
  __Pyx_TraceCall("_cuStreamQuery", __pyx_f[0], 5789, 1, __PYX_ERR(0, 5789, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5790
 * 
 * cdef CUresult _cuStreamQuery(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamQuery             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamQuery == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5791
 * cdef CUresult _cuStreamQuery(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamQuery
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamQuery == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5791, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5792
 *     global __cuStreamQuery
 *     cuPythonInit()
 *     if __cuStreamQuery == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamQuery" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamQuery == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5793
 *     cuPythonInit()
 *     if __cuStreamQuery == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamQuery" not found')
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamQuery)(hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5794
 *     if __cuStreamQuery == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamQuery" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamQuery)(hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__207, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5794, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5794, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5793
 *     cuPythonInit()
 *     if __cuStreamQuery == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamQuery" not found')
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamQuery)(hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5792
 *     global __cuStreamQuery
 *     cuPythonInit()
 *     if __cuStreamQuery == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamQuery" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5795
 *         with gil:
 *             raise RuntimeError('Function "cuStreamQuery" not found')
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamQuery)(hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamQuery)(__pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":5796
 *             raise RuntimeError('Function "cuStreamQuery" not found')
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamQuery)(hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamSynchronize(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5790
 * 
 * cdef CUresult _cuStreamQuery(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamQuery             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamQuery == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5789
 *     return err
 * 
 * cdef CUresult _cuStreamQuery(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamQuery
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuStreamQuery", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5798
 *     return err
 * 
 * cdef CUresult _cuStreamSynchronize(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamSynchronize
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamSynchronize(CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuStreamSynchronize", 1);
  __Pyx_TraceCall("_cuStreamSynchronize", __pyx_f[0], 5798, 1, __PYX_ERR(0, 5798, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5799
 * 
 * cdef CUresult _cuStreamSynchronize(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamSynchronize             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamSynchronize == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5800
 * cdef CUresult _cuStreamSynchronize(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamSynchronize
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamSynchronize == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5800, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5801
 *     global __cuStreamSynchronize
 *     cuPythonInit()
 *     if __cuStreamSynchronize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamSynchronize" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamSynchronize == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5802
 *     cuPythonInit()
 *     if __cuStreamSynchronize == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamSynchronize" not found')
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamSynchronize)(hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5803
 *     if __cuStreamSynchronize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamSynchronize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamSynchronize)(hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__208, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5803, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5803, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5802
 *     cuPythonInit()
 *     if __cuStreamSynchronize == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamSynchronize" not found')
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamSynchronize)(hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5801
 *     global __cuStreamSynchronize
 *     cuPythonInit()
 *     if __cuStreamSynchronize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamSynchronize" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5804
 *         with gil:
 *             raise RuntimeError('Function "cuStreamSynchronize" not found')
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamSynchronize)(hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamSynchronize)(__pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":5805
 *             raise RuntimeError('Function "cuStreamSynchronize" not found')
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamSynchronize)(hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamDestroy_v2(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5799
 * 
 * cdef CUresult _cuStreamSynchronize(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamSynchronize             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamSynchronize == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5798
 *     return err
 * 
 * cdef CUresult _cuStreamSynchronize(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamSynchronize
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuStreamSynchronize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5807
 *     return err
 * 
 * cdef CUresult _cuStreamDestroy_v2(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamDestroy_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamDestroy_v2(CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuStreamDestroy_v2", 1);
  __Pyx_TraceCall("_cuStreamDestroy_v2", __pyx_f[0], 5807, 1, __PYX_ERR(0, 5807, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5808
 * 
 * cdef CUresult _cuStreamDestroy_v2(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamDestroy_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamDestroy_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5809
 * cdef CUresult _cuStreamDestroy_v2(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamDestroy_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamDestroy_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5809, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5810
 *     global __cuStreamDestroy_v2
 *     cuPythonInit()
 *     if __cuStreamDestroy_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamDestroy_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamDestroy_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5811
 *     cuPythonInit()
 *     if __cuStreamDestroy_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamDestroy_v2" not found')
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamDestroy_v2)(hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5812
 *     if __cuStreamDestroy_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamDestroy_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamDestroy_v2)(hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__209, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5812, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5812, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5811
 *     cuPythonInit()
 *     if __cuStreamDestroy_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamDestroy_v2" not found')
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamDestroy_v2)(hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5810
 *     global __cuStreamDestroy_v2
 *     cuPythonInit()
 *     if __cuStreamDestroy_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamDestroy_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5813
 *         with gil:
 *             raise RuntimeError('Function "cuStreamDestroy_v2" not found')
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamDestroy_v2)(hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamDestroy_v2)(__pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":5814
 *             raise RuntimeError('Function "cuStreamDestroy_v2" not found')
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamDestroy_v2)(hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamCopyAttributes(CUstream dst, CUstream src) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5808
 * 
 * cdef CUresult _cuStreamDestroy_v2(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamDestroy_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamDestroy_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5807
 *     return err
 * 
 * cdef CUresult _cuStreamDestroy_v2(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamDestroy_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuStreamDestroy_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5816
 *     return err
 * 
 * cdef CUresult _cuStreamCopyAttributes(CUstream dst, CUstream src) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamCopyAttributes
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamCopyAttributes(CUstream __pyx_v_dst, CUstream __pyx_v_src) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuStreamCopyAttributes", 1);
  __Pyx_TraceCall("_cuStreamCopyAttributes", __pyx_f[0], 5816, 1, __PYX_ERR(0, 5816, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5817
 * 
 * cdef CUresult _cuStreamCopyAttributes(CUstream dst, CUstream src) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamCopyAttributes             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamCopyAttributes == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5818
 * cdef CUresult _cuStreamCopyAttributes(CUstream dst, CUstream src) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamCopyAttributes
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamCopyAttributes == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5818, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5819
 *     global __cuStreamCopyAttributes
 *     cuPythonInit()
 *     if __cuStreamCopyAttributes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCopyAttributes" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamCopyAttributes == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5820
 *     cuPythonInit()
 *     if __cuStreamCopyAttributes == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamCopyAttributes" not found')
 *     err = (<CUresult (*)(CUstream, CUstream) nogil> __cuStreamCopyAttributes)(dst, src)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5821
 *     if __cuStreamCopyAttributes == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCopyAttributes" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUstream) nogil> __cuStreamCopyAttributes)(dst, src)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__210, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5821, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5821, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5820
 *     cuPythonInit()
 *     if __cuStreamCopyAttributes == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamCopyAttributes" not found')
 *     err = (<CUresult (*)(CUstream, CUstream) nogil> __cuStreamCopyAttributes)(dst, src)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5819
 *     global __cuStreamCopyAttributes
 *     cuPythonInit()
 *     if __cuStreamCopyAttributes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCopyAttributes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5822
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCopyAttributes" not found')
 *     err = (<CUresult (*)(CUstream, CUstream) nogil> __cuStreamCopyAttributes)(dst, src)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamCopyAttributes)(__pyx_v_dst, __pyx_v_src);

    /* "cuda/_cuda/ccuda.pyx":5823
 *             raise RuntimeError('Function "cuStreamCopyAttributes" not found')
 *     err = (<CUresult (*)(CUstream, CUstream) nogil> __cuStreamCopyAttributes)(dst, src)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5817
 * 
 * cdef CUresult _cuStreamCopyAttributes(CUstream dst, CUstream src) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamCopyAttributes             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamCopyAttributes == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5816
 *     return err
 * 
 * cdef CUresult _cuStreamCopyAttributes(CUstream dst, CUstream src) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamCopyAttributes
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuStreamCopyAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5825
 *     return err
 * 
 * cdef CUresult _cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamGetAttribute
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetAttribute(CUstream __pyx_v_hStream, CUstreamAttrID __pyx_v_attr, CUstreamAttrValue *__pyx_v_value_out) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuStreamGetAttribute", 1);
  __Pyx_TraceCall("_cuStreamGetAttribute", __pyx_f[0], 5825, 1, __PYX_ERR(0, 5825, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5826
 * 
 * cdef CUresult _cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamGetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamGetAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5827
 * cdef CUresult _cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamGetAttribute
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamGetAttribute == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5827, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5828
 *     global __cuStreamGetAttribute
 *     cuPythonInit()
 *     if __cuStreamGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetAttribute" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetAttribute == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5829
 *     cuPythonInit()
 *     if __cuStreamGetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamGetAttribute" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamAttrID, CUstreamAttrValue*) nogil> __cuStreamGetAttribute)(hStream, attr, value_out)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5830
 *     if __cuStreamGetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUstreamAttrID, CUstreamAttrValue*) nogil> __cuStreamGetAttribute)(hStream, attr, value_out)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__211, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5830, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5830, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5829
 *     cuPythonInit()
 *     if __cuStreamGetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamGetAttribute" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamAttrID, CUstreamAttrValue*) nogil> __cuStreamGetAttribute)(hStream, attr, value_out)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5828
 *     global __cuStreamGetAttribute
 *     cuPythonInit()
 *     if __cuStreamGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5831
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetAttribute" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamAttrID, CUstreamAttrValue*) nogil> __cuStreamGetAttribute)(hStream, attr, value_out)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream, CUstreamAttrID, CUstreamAttrValue *))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetAttribute)(__pyx_v_hStream, __pyx_v_attr, __pyx_v_value_out);

    /* "cuda/_cuda/ccuda.pyx":5832
 *             raise RuntimeError('Function "cuStreamGetAttribute" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamAttrID, CUstreamAttrValue*) nogil> __cuStreamGetAttribute)(hStream, attr, value_out)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5826
 * 
 * cdef CUresult _cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamGetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamGetAttribute == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5825
 *     return err
 * 
 * cdef CUresult _cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamGetAttribute
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuStreamGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5834
 *     return err
 * 
 * cdef CUresult _cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamSetAttribute
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamSetAttribute(CUstream __pyx_v_hStream, CUstreamAttrID __pyx_v_attr, CUstreamAttrValue const *__pyx_v_value) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuStreamSetAttribute", 1);
  __Pyx_TraceCall("_cuStreamSetAttribute", __pyx_f[0], 5834, 1, __PYX_ERR(0, 5834, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5835
 * 
 * cdef CUresult _cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamSetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamSetAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5836
 * cdef CUresult _cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamSetAttribute
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamSetAttribute == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5836, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5837
 *     global __cuStreamSetAttribute
 *     cuPythonInit()
 *     if __cuStreamSetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamSetAttribute" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamSetAttribute == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5838
 *     cuPythonInit()
 *     if __cuStreamSetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamSetAttribute" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamAttrID, const CUstreamAttrValue*) nogil> __cuStreamSetAttribute)(hStream, attr, value)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5839
 *     if __cuStreamSetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamSetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUstreamAttrID, const CUstreamAttrValue*) nogil> __cuStreamSetAttribute)(hStream, attr, value)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__212, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5839, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5839, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5838
 *     cuPythonInit()
 *     if __cuStreamSetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamSetAttribute" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamAttrID, const CUstreamAttrValue*) nogil> __cuStreamSetAttribute)(hStream, attr, value)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5837
 *     global __cuStreamSetAttribute
 *     cuPythonInit()
 *     if __cuStreamSetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamSetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5840
 *         with gil:
 *             raise RuntimeError('Function "cuStreamSetAttribute" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamAttrID, const CUstreamAttrValue*) nogil> __cuStreamSetAttribute)(hStream, attr, value)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream, CUstreamAttrID, CUstreamAttrValue const *))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamSetAttribute)(__pyx_v_hStream, __pyx_v_attr, __pyx_v_value);

    /* "cuda/_cuda/ccuda.pyx":5841
 *             raise RuntimeError('Function "cuStreamSetAttribute" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamAttrID, const CUstreamAttrValue*) nogil> __cuStreamSetAttribute)(hStream, attr, value)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuEventCreate(CUevent* phEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5835
 * 
 * cdef CUresult _cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamSetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamSetAttribute == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5834
 *     return err
 * 
 * cdef CUresult _cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamSetAttribute
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuStreamSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5843
 *     return err
 * 
 * cdef CUresult _cuEventCreate(CUevent* phEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEventCreate
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEventCreate(CUevent *__pyx_v_phEvent, unsigned int __pyx_v_Flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuEventCreate", 1);
  __Pyx_TraceCall("_cuEventCreate", __pyx_f[0], 5843, 1, __PYX_ERR(0, 5843, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5844
 * 
 * cdef CUresult _cuEventCreate(CUevent* phEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEventCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventCreate == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5845
 * cdef CUresult _cuEventCreate(CUevent* phEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEventCreate
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuEventCreate == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5845, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5846
 *     global __cuEventCreate
 *     cuPythonInit()
 *     if __cuEventCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventCreate" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuEventCreate == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5847
 *     cuPythonInit()
 *     if __cuEventCreate == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEventCreate" not found')
 *     err = (<CUresult (*)(CUevent*, unsigned int) nogil> __cuEventCreate)(phEvent, Flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5848
 *     if __cuEventCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent*, unsigned int) nogil> __cuEventCreate)(phEvent, Flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__213, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5848, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5848, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5847
 *     cuPythonInit()
 *     if __cuEventCreate == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEventCreate" not found')
 *     err = (<CUresult (*)(CUevent*, unsigned int) nogil> __cuEventCreate)(phEvent, Flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5846
 *     global __cuEventCreate
 *     cuPythonInit()
 *     if __cuEventCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5849
 *         with gil:
 *             raise RuntimeError('Function "cuEventCreate" not found')
 *     err = (<CUresult (*)(CUevent*, unsigned int) nogil> __cuEventCreate)(phEvent, Flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUevent *, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuEventCreate)(__pyx_v_phEvent, __pyx_v_Flags);

    /* "cuda/_cuda/ccuda.pyx":5850
 *             raise RuntimeError('Function "cuEventCreate" not found')
 *     err = (<CUresult (*)(CUevent*, unsigned int) nogil> __cuEventCreate)(phEvent, Flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuEventRecord(CUevent hEvent, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5844
 * 
 * cdef CUresult _cuEventCreate(CUevent* phEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEventCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventCreate == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5843
 *     return err
 * 
 * cdef CUresult _cuEventCreate(CUevent* phEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEventCreate
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuEventCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5852
 *     return err
 * 
 * cdef CUresult _cuEventRecord(CUevent hEvent, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEventRecord
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEventRecord(CUevent __pyx_v_hEvent, CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuEventRecord", 1);
  __Pyx_TraceCall("_cuEventRecord", __pyx_f[0], 5852, 1, __PYX_ERR(0, 5852, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5853
 * 
 * cdef CUresult _cuEventRecord(CUevent hEvent, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEventRecord             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventRecord == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5854
 * cdef CUresult _cuEventRecord(CUevent hEvent, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEventRecord
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuEventRecord == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5854, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5855
 *     global __cuEventRecord
 *     cuPythonInit()
 *     if __cuEventRecord == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventRecord" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuEventRecord == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5856
 *     cuPythonInit()
 *     if __cuEventRecord == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEventRecord" not found')
 *     err = (<CUresult (*)(CUevent, CUstream) nogil> __cuEventRecord)(hEvent, hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5857
 *     if __cuEventRecord == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventRecord" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent, CUstream) nogil> __cuEventRecord)(hEvent, hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__214, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5857, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5857, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5856
 *     cuPythonInit()
 *     if __cuEventRecord == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEventRecord" not found')
 *     err = (<CUresult (*)(CUevent, CUstream) nogil> __cuEventRecord)(hEvent, hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5855
 *     global __cuEventRecord
 *     cuPythonInit()
 *     if __cuEventRecord == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventRecord" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5858
 *         with gil:
 *             raise RuntimeError('Function "cuEventRecord" not found')
 *     err = (<CUresult (*)(CUevent, CUstream) nogil> __cuEventRecord)(hEvent, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUevent, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuEventRecord)(__pyx_v_hEvent, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":5859
 *             raise RuntimeError('Function "cuEventRecord" not found')
 *     err = (<CUresult (*)(CUevent, CUstream) nogil> __cuEventRecord)(hEvent, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5853
 * 
 * cdef CUresult _cuEventRecord(CUevent hEvent, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEventRecord             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventRecord == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5852
 *     return err
 * 
 * cdef CUresult _cuEventRecord(CUevent hEvent, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEventRecord
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuEventRecord", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5861
 *     return err
 * 
 * cdef CUresult _cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEventRecordWithFlags
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEventRecordWithFlags(CUevent __pyx_v_hEvent, CUstream __pyx_v_hStream, unsigned int __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuEventRecordWithFlags", 1);
  __Pyx_TraceCall("_cuEventRecordWithFlags", __pyx_f[0], 5861, 1, __PYX_ERR(0, 5861, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5862
 * 
 * cdef CUresult _cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEventRecordWithFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventRecordWithFlags == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5863
 * cdef CUresult _cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEventRecordWithFlags
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuEventRecordWithFlags == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5863, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5864
 *     global __cuEventRecordWithFlags
 *     cuPythonInit()
 *     if __cuEventRecordWithFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventRecordWithFlags" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuEventRecordWithFlags == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5865
 *     cuPythonInit()
 *     if __cuEventRecordWithFlags == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEventRecordWithFlags" not found')
 *     err = (<CUresult (*)(CUevent, CUstream, unsigned int) nogil> __cuEventRecordWithFlags)(hEvent, hStream, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5866
 *     if __cuEventRecordWithFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventRecordWithFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent, CUstream, unsigned int) nogil> __cuEventRecordWithFlags)(hEvent, hStream, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__215, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5866, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5866, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5865
 *     cuPythonInit()
 *     if __cuEventRecordWithFlags == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEventRecordWithFlags" not found')
 *     err = (<CUresult (*)(CUevent, CUstream, unsigned int) nogil> __cuEventRecordWithFlags)(hEvent, hStream, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5864
 *     global __cuEventRecordWithFlags
 *     cuPythonInit()
 *     if __cuEventRecordWithFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventRecordWithFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5867
 *         with gil:
 *             raise RuntimeError('Function "cuEventRecordWithFlags" not found')
 *     err = (<CUresult (*)(CUevent, CUstream, unsigned int) nogil> __cuEventRecordWithFlags)(hEvent, hStream, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUevent, CUstream, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuEventRecordWithFlags)(__pyx_v_hEvent, __pyx_v_hStream, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":5868
 *             raise RuntimeError('Function "cuEventRecordWithFlags" not found')
 *     err = (<CUresult (*)(CUevent, CUstream, unsigned int) nogil> __cuEventRecordWithFlags)(hEvent, hStream, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuEventQuery(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5862
 * 
 * cdef CUresult _cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEventRecordWithFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventRecordWithFlags == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5861
 *     return err
 * 
 * cdef CUresult _cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEventRecordWithFlags
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuEventRecordWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5870
 *     return err
 * 
 * cdef CUresult _cuEventQuery(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEventQuery
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEventQuery(CUevent __pyx_v_hEvent) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuEventQuery", 1);
  __Pyx_TraceCall("_cuEventQuery", __pyx_f[0], 5870, 1, __PYX_ERR(0, 5870, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5871
 * 
 * cdef CUresult _cuEventQuery(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEventQuery             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventQuery == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5872
 * cdef CUresult _cuEventQuery(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEventQuery
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuEventQuery == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5872, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5873
 *     global __cuEventQuery
 *     cuPythonInit()
 *     if __cuEventQuery == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventQuery" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuEventQuery == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5874
 *     cuPythonInit()
 *     if __cuEventQuery == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEventQuery" not found')
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventQuery)(hEvent)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5875
 *     if __cuEventQuery == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventQuery" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventQuery)(hEvent)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__216, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5875, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5875, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5874
 *     cuPythonInit()
 *     if __cuEventQuery == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEventQuery" not found')
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventQuery)(hEvent)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5873
 *     global __cuEventQuery
 *     cuPythonInit()
 *     if __cuEventQuery == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventQuery" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5876
 *         with gil:
 *             raise RuntimeError('Function "cuEventQuery" not found')
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventQuery)(hEvent)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUevent))__pyx_v_4cuda_5_cuda_5ccuda___cuEventQuery)(__pyx_v_hEvent);

    /* "cuda/_cuda/ccuda.pyx":5877
 *             raise RuntimeError('Function "cuEventQuery" not found')
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventQuery)(hEvent)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuEventSynchronize(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5871
 * 
 * cdef CUresult _cuEventQuery(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEventQuery             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventQuery == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5870
 *     return err
 * 
 * cdef CUresult _cuEventQuery(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEventQuery
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuEventQuery", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5879
 *     return err
 * 
 * cdef CUresult _cuEventSynchronize(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEventSynchronize
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEventSynchronize(CUevent __pyx_v_hEvent) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuEventSynchronize", 1);
  __Pyx_TraceCall("_cuEventSynchronize", __pyx_f[0], 5879, 1, __PYX_ERR(0, 5879, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5880
 * 
 * cdef CUresult _cuEventSynchronize(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEventSynchronize             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventSynchronize == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5881
 * cdef CUresult _cuEventSynchronize(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEventSynchronize
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuEventSynchronize == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5881, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5882
 *     global __cuEventSynchronize
 *     cuPythonInit()
 *     if __cuEventSynchronize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventSynchronize" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuEventSynchronize == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5883
 *     cuPythonInit()
 *     if __cuEventSynchronize == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEventSynchronize" not found')
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventSynchronize)(hEvent)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5884
 *     if __cuEventSynchronize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventSynchronize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventSynchronize)(hEvent)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__217, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5884, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5884, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5883
 *     cuPythonInit()
 *     if __cuEventSynchronize == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEventSynchronize" not found')
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventSynchronize)(hEvent)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5882
 *     global __cuEventSynchronize
 *     cuPythonInit()
 *     if __cuEventSynchronize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventSynchronize" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5885
 *         with gil:
 *             raise RuntimeError('Function "cuEventSynchronize" not found')
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventSynchronize)(hEvent)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUevent))__pyx_v_4cuda_5_cuda_5ccuda___cuEventSynchronize)(__pyx_v_hEvent);

    /* "cuda/_cuda/ccuda.pyx":5886
 *             raise RuntimeError('Function "cuEventSynchronize" not found')
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventSynchronize)(hEvent)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuEventDestroy_v2(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5880
 * 
 * cdef CUresult _cuEventSynchronize(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEventSynchronize             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventSynchronize == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5879
 *     return err
 * 
 * cdef CUresult _cuEventSynchronize(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEventSynchronize
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuEventSynchronize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5888
 *     return err
 * 
 * cdef CUresult _cuEventDestroy_v2(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEventDestroy_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEventDestroy_v2(CUevent __pyx_v_hEvent) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuEventDestroy_v2", 1);
  __Pyx_TraceCall("_cuEventDestroy_v2", __pyx_f[0], 5888, 1, __PYX_ERR(0, 5888, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5889
 * 
 * cdef CUresult _cuEventDestroy_v2(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEventDestroy_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventDestroy_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5890
 * cdef CUresult _cuEventDestroy_v2(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEventDestroy_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuEventDestroy_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5890, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5891
 *     global __cuEventDestroy_v2
 *     cuPythonInit()
 *     if __cuEventDestroy_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventDestroy_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuEventDestroy_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5892
 *     cuPythonInit()
 *     if __cuEventDestroy_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEventDestroy_v2" not found')
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventDestroy_v2)(hEvent)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5893
 *     if __cuEventDestroy_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventDestroy_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventDestroy_v2)(hEvent)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__218, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5893, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5893, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5892
 *     cuPythonInit()
 *     if __cuEventDestroy_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEventDestroy_v2" not found')
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventDestroy_v2)(hEvent)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5891
 *     global __cuEventDestroy_v2
 *     cuPythonInit()
 *     if __cuEventDestroy_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventDestroy_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5894
 *         with gil:
 *             raise RuntimeError('Function "cuEventDestroy_v2" not found')
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventDestroy_v2)(hEvent)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUevent))__pyx_v_4cuda_5_cuda_5ccuda___cuEventDestroy_v2)(__pyx_v_hEvent);

    /* "cuda/_cuda/ccuda.pyx":5895
 *             raise RuntimeError('Function "cuEventDestroy_v2" not found')
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventDestroy_v2)(hEvent)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5889
 * 
 * cdef CUresult _cuEventDestroy_v2(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEventDestroy_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventDestroy_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5888
 *     return err
 * 
 * cdef CUresult _cuEventDestroy_v2(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEventDestroy_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuEventDestroy_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5897
 *     return err
 * 
 * cdef CUresult _cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEventElapsedTime
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEventElapsedTime(float *__pyx_v_pMilliseconds, CUevent __pyx_v_hStart, CUevent __pyx_v_hEnd) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuEventElapsedTime", 1);
  __Pyx_TraceCall("_cuEventElapsedTime", __pyx_f[0], 5897, 1, __PYX_ERR(0, 5897, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5898
 * 
 * cdef CUresult _cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEventElapsedTime             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventElapsedTime == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5899
 * cdef CUresult _cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEventElapsedTime
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuEventElapsedTime == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5899, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5900
 *     global __cuEventElapsedTime
 *     cuPythonInit()
 *     if __cuEventElapsedTime == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventElapsedTime" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuEventElapsedTime == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5901
 *     cuPythonInit()
 *     if __cuEventElapsedTime == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEventElapsedTime" not found')
 *     err = (<CUresult (*)(float*, CUevent, CUevent) nogil> __cuEventElapsedTime)(pMilliseconds, hStart, hEnd)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5902
 *     if __cuEventElapsedTime == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventElapsedTime" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(float*, CUevent, CUevent) nogil> __cuEventElapsedTime)(pMilliseconds, hStart, hEnd)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__219, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5902, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5902, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5901
 *     cuPythonInit()
 *     if __cuEventElapsedTime == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEventElapsedTime" not found')
 *     err = (<CUresult (*)(float*, CUevent, CUevent) nogil> __cuEventElapsedTime)(pMilliseconds, hStart, hEnd)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5900
 *     global __cuEventElapsedTime
 *     cuPythonInit()
 *     if __cuEventElapsedTime == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventElapsedTime" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5903
 *         with gil:
 *             raise RuntimeError('Function "cuEventElapsedTime" not found')
 *     err = (<CUresult (*)(float*, CUevent, CUevent) nogil> __cuEventElapsedTime)(pMilliseconds, hStart, hEnd)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(float *, CUevent, CUevent))__pyx_v_4cuda_5_cuda_5ccuda___cuEventElapsedTime)(__pyx_v_pMilliseconds, __pyx_v_hStart, __pyx_v_hEnd);

    /* "cuda/_cuda/ccuda.pyx":5904
 *             raise RuntimeError('Function "cuEventElapsedTime" not found')
 *     err = (<CUresult (*)(float*, CUevent, CUevent) nogil> __cuEventElapsedTime)(pMilliseconds, hStart, hEnd)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5898
 * 
 * cdef CUresult _cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEventElapsedTime             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventElapsedTime == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5897
 *     return err
 * 
 * cdef CUresult _cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEventElapsedTime
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuEventElapsedTime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5906
 *     return err
 * 
 * cdef CUresult _cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuImportExternalMemory
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuImportExternalMemory(CUexternalMemory *__pyx_v_extMem_out, CUDA_EXTERNAL_MEMORY_HANDLE_DESC const *__pyx_v_memHandleDesc) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuImportExternalMemory", 1);
  __Pyx_TraceCall("_cuImportExternalMemory", __pyx_f[0], 5906, 1, __PYX_ERR(0, 5906, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5907
 * 
 * cdef CUresult _cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuImportExternalMemory             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuImportExternalMemory == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5908
 * cdef CUresult _cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuImportExternalMemory
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuImportExternalMemory == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5908, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5909
 *     global __cuImportExternalMemory
 *     cuPythonInit()
 *     if __cuImportExternalMemory == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuImportExternalMemory" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuImportExternalMemory == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5910
 *     cuPythonInit()
 *     if __cuImportExternalMemory == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuImportExternalMemory" not found')
 *     err = (<CUresult (*)(CUexternalMemory*, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC*) nogil> __cuImportExternalMemory)(extMem_out, memHandleDesc)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5911
 *     if __cuImportExternalMemory == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuImportExternalMemory" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUexternalMemory*, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC*) nogil> __cuImportExternalMemory)(extMem_out, memHandleDesc)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__220, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5911, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5911, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5910
 *     cuPythonInit()
 *     if __cuImportExternalMemory == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuImportExternalMemory" not found')
 *     err = (<CUresult (*)(CUexternalMemory*, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC*) nogil> __cuImportExternalMemory)(extMem_out, memHandleDesc)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5909
 *     global __cuImportExternalMemory
 *     cuPythonInit()
 *     if __cuImportExternalMemory == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuImportExternalMemory" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5912
 *         with gil:
 *             raise RuntimeError('Function "cuImportExternalMemory" not found')
 *     err = (<CUresult (*)(CUexternalMemory*, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC*) nogil> __cuImportExternalMemory)(extMem_out, memHandleDesc)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUexternalMemory *, CUDA_EXTERNAL_MEMORY_HANDLE_DESC const *))__pyx_v_4cuda_5_cuda_5ccuda___cuImportExternalMemory)(__pyx_v_extMem_out, __pyx_v_memHandleDesc);

    /* "cuda/_cuda/ccuda.pyx":5913
 *             raise RuntimeError('Function "cuImportExternalMemory" not found')
 *     err = (<CUresult (*)(CUexternalMemory*, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC*) nogil> __cuImportExternalMemory)(extMem_out, memHandleDesc)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5907
 * 
 * cdef CUresult _cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuImportExternalMemory             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuImportExternalMemory == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5906
 *     return err
 * 
 * cdef CUresult _cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuImportExternalMemory
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuImportExternalMemory", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5915
 *     return err
 * 
 * cdef CUresult _cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuExternalMemoryGetMappedBuffer
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuExternalMemoryGetMappedBuffer(CUdeviceptr *__pyx_v_devPtr, CUexternalMemory __pyx_v_extMem, CUDA_EXTERNAL_MEMORY_BUFFER_DESC const *__pyx_v_bufferDesc) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuExternalMemoryGetMappedBuffer", 1);
  __Pyx_TraceCall("_cuExternalMemoryGetMappedBuffer", __pyx_f[0], 5915, 1, __PYX_ERR(0, 5915, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5916
 * 
 * cdef CUresult _cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuExternalMemoryGetMappedBuffer             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuExternalMemoryGetMappedBuffer == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5917
 * cdef CUresult _cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuExternalMemoryGetMappedBuffer
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuExternalMemoryGetMappedBuffer == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5917, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5918
 *     global __cuExternalMemoryGetMappedBuffer
 *     cuPythonInit()
 *     if __cuExternalMemoryGetMappedBuffer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuExternalMemoryGetMappedBuffer" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuExternalMemoryGetMappedBuffer == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5919
 *     cuPythonInit()
 *     if __cuExternalMemoryGetMappedBuffer == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuExternalMemoryGetMappedBuffer" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, CUexternalMemory, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC*) nogil> __cuExternalMemoryGetMappedBuffer)(devPtr, extMem, bufferDesc)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5920
 *     if __cuExternalMemoryGetMappedBuffer == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuExternalMemoryGetMappedBuffer" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, CUexternalMemory, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC*) nogil> __cuExternalMemoryGetMappedBuffer)(devPtr, extMem, bufferDesc)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__221, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5920, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5920, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5919
 *     cuPythonInit()
 *     if __cuExternalMemoryGetMappedBuffer == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuExternalMemoryGetMappedBuffer" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, CUexternalMemory, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC*) nogil> __cuExternalMemoryGetMappedBuffer)(devPtr, extMem, bufferDesc)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5918
 *     global __cuExternalMemoryGetMappedBuffer
 *     cuPythonInit()
 *     if __cuExternalMemoryGetMappedBuffer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuExternalMemoryGetMappedBuffer" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5921
 *         with gil:
 *             raise RuntimeError('Function "cuExternalMemoryGetMappedBuffer" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, CUexternalMemory, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC*) nogil> __cuExternalMemoryGetMappedBuffer)(devPtr, extMem, bufferDesc)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr *, CUexternalMemory, CUDA_EXTERNAL_MEMORY_BUFFER_DESC const *))__pyx_v_4cuda_5_cuda_5ccuda___cuExternalMemoryGetMappedBuffer)(__pyx_v_devPtr, __pyx_v_extMem, __pyx_v_bufferDesc);

    /* "cuda/_cuda/ccuda.pyx":5922
 *             raise RuntimeError('Function "cuExternalMemoryGetMappedBuffer" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, CUexternalMemory, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC*) nogil> __cuExternalMemoryGetMappedBuffer)(devPtr, extMem, bufferDesc)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5916
 * 
 * cdef CUresult _cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuExternalMemoryGetMappedBuffer             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuExternalMemoryGetMappedBuffer == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5915
 *     return err
 * 
 * cdef CUresult _cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuExternalMemoryGetMappedBuffer
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuExternalMemoryGetMappedBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5924
 *     return err
 * 
 * cdef CUresult _cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuExternalMemoryGetMappedMipmappedArray
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray *__pyx_v_mipmap, CUexternalMemory __pyx_v_extMem, CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC const *__pyx_v_mipmapDesc) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuExternalMemoryGetMappedMipmappedArray", 1);
  __Pyx_TraceCall("_cuExternalMemoryGetMappedMipmappedArray", __pyx_f[0], 5924, 1, __PYX_ERR(0, 5924, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5925
 * 
 * cdef CUresult _cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuExternalMemoryGetMappedMipmappedArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuExternalMemoryGetMappedMipmappedArray == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5926
 * cdef CUresult _cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuExternalMemoryGetMappedMipmappedArray
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuExternalMemoryGetMappedMipmappedArray == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5926, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5927
 *     global __cuExternalMemoryGetMappedMipmappedArray
 *     cuPythonInit()
 *     if __cuExternalMemoryGetMappedMipmappedArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuExternalMemoryGetMappedMipmappedArray" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuExternalMemoryGetMappedMipmappedArray == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5928
 *     cuPythonInit()
 *     if __cuExternalMemoryGetMappedMipmappedArray == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuExternalMemoryGetMappedMipmappedArray" not found')
 *     err = (<CUresult (*)(CUmipmappedArray*, CUexternalMemory, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC*) nogil> __cuExternalMemoryGetMappedMipmappedArray)(mipmap, extMem, mipmapDesc)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5929
 *     if __cuExternalMemoryGetMappedMipmappedArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuExternalMemoryGetMappedMipmappedArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmipmappedArray*, CUexternalMemory, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC*) nogil> __cuExternalMemoryGetMappedMipmappedArray)(mipmap, extMem, mipmapDesc)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__222, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5929, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5929, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5928
 *     cuPythonInit()
 *     if __cuExternalMemoryGetMappedMipmappedArray == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuExternalMemoryGetMappedMipmappedArray" not found')
 *     err = (<CUresult (*)(CUmipmappedArray*, CUexternalMemory, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC*) nogil> __cuExternalMemoryGetMappedMipmappedArray)(mipmap, extMem, mipmapDesc)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5927
 *     global __cuExternalMemoryGetMappedMipmappedArray
 *     cuPythonInit()
 *     if __cuExternalMemoryGetMappedMipmappedArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuExternalMemoryGetMappedMipmappedArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5930
 *         with gil:
 *             raise RuntimeError('Function "cuExternalMemoryGetMappedMipmappedArray" not found')
 *     err = (<CUresult (*)(CUmipmappedArray*, CUexternalMemory, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC*) nogil> __cuExternalMemoryGetMappedMipmappedArray)(mipmap, extMem, mipmapDesc)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmipmappedArray *, CUexternalMemory, CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC const *))__pyx_v_4cuda_5_cuda_5ccuda___cuExternalMemoryGetMappedMipmappedArray)(__pyx_v_mipmap, __pyx_v_extMem, __pyx_v_mipmapDesc);

    /* "cuda/_cuda/ccuda.pyx":5931
 *             raise RuntimeError('Function "cuExternalMemoryGetMappedMipmappedArray" not found')
 *     err = (<CUresult (*)(CUmipmappedArray*, CUexternalMemory, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC*) nogil> __cuExternalMemoryGetMappedMipmappedArray)(mipmap, extMem, mipmapDesc)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDestroyExternalMemory(CUexternalMemory extMem) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5925
 * 
 * cdef CUresult _cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuExternalMemoryGetMappedMipmappedArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuExternalMemoryGetMappedMipmappedArray == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5924
 *     return err
 * 
 * cdef CUresult _cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuExternalMemoryGetMappedMipmappedArray
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuExternalMemoryGetMappedMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5933
 *     return err
 * 
 * cdef CUresult _cuDestroyExternalMemory(CUexternalMemory extMem) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDestroyExternalMemory
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDestroyExternalMemory(CUexternalMemory __pyx_v_extMem) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDestroyExternalMemory", 1);
  __Pyx_TraceCall("_cuDestroyExternalMemory", __pyx_f[0], 5933, 1, __PYX_ERR(0, 5933, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5934
 * 
 * cdef CUresult _cuDestroyExternalMemory(CUexternalMemory extMem) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDestroyExternalMemory             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDestroyExternalMemory == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5935
 * cdef CUresult _cuDestroyExternalMemory(CUexternalMemory extMem) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDestroyExternalMemory
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDestroyExternalMemory == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5935, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5936
 *     global __cuDestroyExternalMemory
 *     cuPythonInit()
 *     if __cuDestroyExternalMemory == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDestroyExternalMemory" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDestroyExternalMemory == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5937
 *     cuPythonInit()
 *     if __cuDestroyExternalMemory == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDestroyExternalMemory" not found')
 *     err = (<CUresult (*)(CUexternalMemory) nogil> __cuDestroyExternalMemory)(extMem)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5938
 *     if __cuDestroyExternalMemory == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDestroyExternalMemory" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUexternalMemory) nogil> __cuDestroyExternalMemory)(extMem)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__223, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5938, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5938, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5937
 *     cuPythonInit()
 *     if __cuDestroyExternalMemory == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDestroyExternalMemory" not found')
 *     err = (<CUresult (*)(CUexternalMemory) nogil> __cuDestroyExternalMemory)(extMem)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5936
 *     global __cuDestroyExternalMemory
 *     cuPythonInit()
 *     if __cuDestroyExternalMemory == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDestroyExternalMemory" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5939
 *         with gil:
 *             raise RuntimeError('Function "cuDestroyExternalMemory" not found')
 *     err = (<CUresult (*)(CUexternalMemory) nogil> __cuDestroyExternalMemory)(extMem)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUexternalMemory))__pyx_v_4cuda_5_cuda_5ccuda___cuDestroyExternalMemory)(__pyx_v_extMem);

    /* "cuda/_cuda/ccuda.pyx":5940
 *             raise RuntimeError('Function "cuDestroyExternalMemory" not found')
 *     err = (<CUresult (*)(CUexternalMemory) nogil> __cuDestroyExternalMemory)(extMem)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5934
 * 
 * cdef CUresult _cuDestroyExternalMemory(CUexternalMemory extMem) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDestroyExternalMemory             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDestroyExternalMemory == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5933
 *     return err
 * 
 * cdef CUresult _cuDestroyExternalMemory(CUexternalMemory extMem) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDestroyExternalMemory
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDestroyExternalMemory", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5942
 *     return err
 * 
 * cdef CUresult _cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuImportExternalSemaphore
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuImportExternalSemaphore(CUexternalSemaphore *__pyx_v_extSem_out, CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC const *__pyx_v_semHandleDesc) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuImportExternalSemaphore", 1);
  __Pyx_TraceCall("_cuImportExternalSemaphore", __pyx_f[0], 5942, 1, __PYX_ERR(0, 5942, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5943
 * 
 * cdef CUresult _cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuImportExternalSemaphore             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuImportExternalSemaphore == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5944
 * cdef CUresult _cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuImportExternalSemaphore
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuImportExternalSemaphore == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5944, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5945
 *     global __cuImportExternalSemaphore
 *     cuPythonInit()
 *     if __cuImportExternalSemaphore == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuImportExternalSemaphore" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuImportExternalSemaphore == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5946
 *     cuPythonInit()
 *     if __cuImportExternalSemaphore == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuImportExternalSemaphore" not found')
 *     err = (<CUresult (*)(CUexternalSemaphore*, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC*) nogil> __cuImportExternalSemaphore)(extSem_out, semHandleDesc)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5947
 *     if __cuImportExternalSemaphore == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuImportExternalSemaphore" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUexternalSemaphore*, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC*) nogil> __cuImportExternalSemaphore)(extSem_out, semHandleDesc)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__224, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5947, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5947, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5946
 *     cuPythonInit()
 *     if __cuImportExternalSemaphore == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuImportExternalSemaphore" not found')
 *     err = (<CUresult (*)(CUexternalSemaphore*, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC*) nogil> __cuImportExternalSemaphore)(extSem_out, semHandleDesc)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5945
 *     global __cuImportExternalSemaphore
 *     cuPythonInit()
 *     if __cuImportExternalSemaphore == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuImportExternalSemaphore" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5948
 *         with gil:
 *             raise RuntimeError('Function "cuImportExternalSemaphore" not found')
 *     err = (<CUresult (*)(CUexternalSemaphore*, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC*) nogil> __cuImportExternalSemaphore)(extSem_out, semHandleDesc)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUexternalSemaphore *, CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC const *))__pyx_v_4cuda_5_cuda_5ccuda___cuImportExternalSemaphore)(__pyx_v_extSem_out, __pyx_v_semHandleDesc);

    /* "cuda/_cuda/ccuda.pyx":5949
 *             raise RuntimeError('Function "cuImportExternalSemaphore" not found')
 *     err = (<CUresult (*)(CUexternalSemaphore*, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC*) nogil> __cuImportExternalSemaphore)(extSem_out, semHandleDesc)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5943
 * 
 * cdef CUresult _cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuImportExternalSemaphore             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuImportExternalSemaphore == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5942
 *     return err
 * 
 * cdef CUresult _cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuImportExternalSemaphore
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuImportExternalSemaphore", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5951
 *     return err
 * 
 * cdef CUresult _cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuSignalExternalSemaphoresAsync
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuSignalExternalSemaphoresAsync(CUexternalSemaphore const *__pyx_v_extSemArray, CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS const *__pyx_v_paramsArray, unsigned int __pyx_v_numExtSems, CUstream __pyx_v_stream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuSignalExternalSemaphoresAsync", 1);
  __Pyx_TraceCall("_cuSignalExternalSemaphoresAsync", __pyx_f[0], 5951, 1, __PYX_ERR(0, 5951, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5952
 * 
 * cdef CUresult _cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuSignalExternalSemaphoresAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuSignalExternalSemaphoresAsync == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5953
 * cdef CUresult _cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuSignalExternalSemaphoresAsync
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuSignalExternalSemaphoresAsync == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5953, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5954
 *     global __cuSignalExternalSemaphoresAsync
 *     cuPythonInit()
 *     if __cuSignalExternalSemaphoresAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSignalExternalSemaphoresAsync" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuSignalExternalSemaphoresAsync == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5955
 *     cuPythonInit()
 *     if __cuSignalExternalSemaphoresAsync == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuSignalExternalSemaphoresAsync" not found')
 *     err = (<CUresult (*)(const CUexternalSemaphore*, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS*, unsigned int, CUstream) nogil> __cuSignalExternalSemaphoresAsync)(extSemArray, paramsArray, numExtSems, stream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5956
 *     if __cuSignalExternalSemaphoresAsync == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuSignalExternalSemaphoresAsync" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const CUexternalSemaphore*, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS*, unsigned int, CUstream) nogil> __cuSignalExternalSemaphoresAsync)(extSemArray, paramsArray, numExtSems, stream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__225, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5956, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5956, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5955
 *     cuPythonInit()
 *     if __cuSignalExternalSemaphoresAsync == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuSignalExternalSemaphoresAsync" not found')
 *     err = (<CUresult (*)(const CUexternalSemaphore*, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS*, unsigned int, CUstream) nogil> __cuSignalExternalSemaphoresAsync)(extSemArray, paramsArray, numExtSems, stream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5954
 *     global __cuSignalExternalSemaphoresAsync
 *     cuPythonInit()
 *     if __cuSignalExternalSemaphoresAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSignalExternalSemaphoresAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5957
 *         with gil:
 *             raise RuntimeError('Function "cuSignalExternalSemaphoresAsync" not found')
 *     err = (<CUresult (*)(const CUexternalSemaphore*, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS*, unsigned int, CUstream) nogil> __cuSignalExternalSemaphoresAsync)(extSemArray, paramsArray, numExtSems, stream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUexternalSemaphore const *, CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS const *, unsigned int, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuSignalExternalSemaphoresAsync)(__pyx_v_extSemArray, __pyx_v_paramsArray, __pyx_v_numExtSems, __pyx_v_stream);

    /* "cuda/_cuda/ccuda.pyx":5958
 *             raise RuntimeError('Function "cuSignalExternalSemaphoresAsync" not found')
 *     err = (<CUresult (*)(const CUexternalSemaphore*, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS*, unsigned int, CUstream) nogil> __cuSignalExternalSemaphoresAsync)(extSemArray, paramsArray, numExtSems, stream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5952
 * 
 * cdef CUresult _cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuSignalExternalSemaphoresAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuSignalExternalSemaphoresAsync == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5951
 *     return err
 * 
 * cdef CUresult _cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuSignalExternalSemaphoresAsync
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuSignalExternalSemaphoresAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5960
 *     return err
 * 
 * cdef CUresult _cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuWaitExternalSemaphoresAsync
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuWaitExternalSemaphoresAsync(CUexternalSemaphore const *__pyx_v_extSemArray, CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS const *__pyx_v_paramsArray, unsigned int __pyx_v_numExtSems, CUstream __pyx_v_stream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuWaitExternalSemaphoresAsync", 1);
  __Pyx_TraceCall("_cuWaitExternalSemaphoresAsync", __pyx_f[0], 5960, 1, __PYX_ERR(0, 5960, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5961
 * 
 * cdef CUresult _cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuWaitExternalSemaphoresAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuWaitExternalSemaphoresAsync == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5962
 * cdef CUresult _cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuWaitExternalSemaphoresAsync
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuWaitExternalSemaphoresAsync == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5962, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5963
 *     global __cuWaitExternalSemaphoresAsync
 *     cuPythonInit()
 *     if __cuWaitExternalSemaphoresAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuWaitExternalSemaphoresAsync" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuWaitExternalSemaphoresAsync == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5964
 *     cuPythonInit()
 *     if __cuWaitExternalSemaphoresAsync == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuWaitExternalSemaphoresAsync" not found')
 *     err = (<CUresult (*)(const CUexternalSemaphore*, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS*, unsigned int, CUstream) nogil> __cuWaitExternalSemaphoresAsync)(extSemArray, paramsArray, numExtSems, stream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5965
 *     if __cuWaitExternalSemaphoresAsync == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuWaitExternalSemaphoresAsync" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const CUexternalSemaphore*, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS*, unsigned int, CUstream) nogil> __cuWaitExternalSemaphoresAsync)(extSemArray, paramsArray, numExtSems, stream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__226, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5965, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5965, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5964
 *     cuPythonInit()
 *     if __cuWaitExternalSemaphoresAsync == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuWaitExternalSemaphoresAsync" not found')
 *     err = (<CUresult (*)(const CUexternalSemaphore*, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS*, unsigned int, CUstream) nogil> __cuWaitExternalSemaphoresAsync)(extSemArray, paramsArray, numExtSems, stream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5963
 *     global __cuWaitExternalSemaphoresAsync
 *     cuPythonInit()
 *     if __cuWaitExternalSemaphoresAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuWaitExternalSemaphoresAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5966
 *         with gil:
 *             raise RuntimeError('Function "cuWaitExternalSemaphoresAsync" not found')
 *     err = (<CUresult (*)(const CUexternalSemaphore*, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS*, unsigned int, CUstream) nogil> __cuWaitExternalSemaphoresAsync)(extSemArray, paramsArray, numExtSems, stream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUexternalSemaphore const *, CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS const *, unsigned int, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuWaitExternalSemaphoresAsync)(__pyx_v_extSemArray, __pyx_v_paramsArray, __pyx_v_numExtSems, __pyx_v_stream);

    /* "cuda/_cuda/ccuda.pyx":5967
 *             raise RuntimeError('Function "cuWaitExternalSemaphoresAsync" not found')
 *     err = (<CUresult (*)(const CUexternalSemaphore*, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS*, unsigned int, CUstream) nogil> __cuWaitExternalSemaphoresAsync)(extSemArray, paramsArray, numExtSems, stream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDestroyExternalSemaphore(CUexternalSemaphore extSem) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5961
 * 
 * cdef CUresult _cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuWaitExternalSemaphoresAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuWaitExternalSemaphoresAsync == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5960
 *     return err
 * 
 * cdef CUresult _cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuWaitExternalSemaphoresAsync
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuWaitExternalSemaphoresAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5969
 *     return err
 * 
 * cdef CUresult _cuDestroyExternalSemaphore(CUexternalSemaphore extSem) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDestroyExternalSemaphore
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDestroyExternalSemaphore(CUexternalSemaphore __pyx_v_extSem) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDestroyExternalSemaphore", 1);
  __Pyx_TraceCall("_cuDestroyExternalSemaphore", __pyx_f[0], 5969, 1, __PYX_ERR(0, 5969, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5970
 * 
 * cdef CUresult _cuDestroyExternalSemaphore(CUexternalSemaphore extSem) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDestroyExternalSemaphore             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDestroyExternalSemaphore == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5971
 * cdef CUresult _cuDestroyExternalSemaphore(CUexternalSemaphore extSem) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDestroyExternalSemaphore
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDestroyExternalSemaphore == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5971, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5972
 *     global __cuDestroyExternalSemaphore
 *     cuPythonInit()
 *     if __cuDestroyExternalSemaphore == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDestroyExternalSemaphore" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDestroyExternalSemaphore == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5973
 *     cuPythonInit()
 *     if __cuDestroyExternalSemaphore == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDestroyExternalSemaphore" not found')
 *     err = (<CUresult (*)(CUexternalSemaphore) nogil> __cuDestroyExternalSemaphore)(extSem)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5974
 *     if __cuDestroyExternalSemaphore == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDestroyExternalSemaphore" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUexternalSemaphore) nogil> __cuDestroyExternalSemaphore)(extSem)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__227, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5974, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5974, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5973
 *     cuPythonInit()
 *     if __cuDestroyExternalSemaphore == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDestroyExternalSemaphore" not found')
 *     err = (<CUresult (*)(CUexternalSemaphore) nogil> __cuDestroyExternalSemaphore)(extSem)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5972
 *     global __cuDestroyExternalSemaphore
 *     cuPythonInit()
 *     if __cuDestroyExternalSemaphore == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDestroyExternalSemaphore" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5975
 *         with gil:
 *             raise RuntimeError('Function "cuDestroyExternalSemaphore" not found')
 *     err = (<CUresult (*)(CUexternalSemaphore) nogil> __cuDestroyExternalSemaphore)(extSem)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUexternalSemaphore))__pyx_v_4cuda_5_cuda_5ccuda___cuDestroyExternalSemaphore)(__pyx_v_extSem);

    /* "cuda/_cuda/ccuda.pyx":5976
 *             raise RuntimeError('Function "cuDestroyExternalSemaphore" not found')
 *     err = (<CUresult (*)(CUexternalSemaphore) nogil> __cuDestroyExternalSemaphore)(extSem)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamWaitValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5970
 * 
 * cdef CUresult _cuDestroyExternalSemaphore(CUexternalSemaphore extSem) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDestroyExternalSemaphore             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDestroyExternalSemaphore == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5969
 *     return err
 * 
 * cdef CUresult _cuDestroyExternalSemaphore(CUexternalSemaphore extSem) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDestroyExternalSemaphore
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDestroyExternalSemaphore", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5978
 *     return err
 * 
 * cdef CUresult _cuStreamWaitValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamWaitValue32_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitValue32_v2(CUstream __pyx_v_stream, CUdeviceptr __pyx_v_addr, cuuint32_t __pyx_v_value, unsigned int __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuStreamWaitValue32_v2", 1);
  __Pyx_TraceCall("_cuStreamWaitValue32_v2", __pyx_f[0], 5978, 1, __PYX_ERR(0, 5978, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5979
 * 
 * cdef CUresult _cuStreamWaitValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamWaitValue32_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamWaitValue32_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5980
 * cdef CUresult _cuStreamWaitValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamWaitValue32_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamWaitValue32_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5980, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5981
 *     global __cuStreamWaitValue32_v2
 *     cuPythonInit()
 *     if __cuStreamWaitValue32_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitValue32_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue32_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5982
 *     cuPythonInit()
 *     if __cuStreamWaitValue32_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamWaitValue32_v2" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int) nogil> __cuStreamWaitValue32_v2)(stream, addr, value, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5983
 *     if __cuStreamWaitValue32_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitValue32_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int) nogil> __cuStreamWaitValue32_v2)(stream, addr, value, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__228, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5983, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5983, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5982
 *     cuPythonInit()
 *     if __cuStreamWaitValue32_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamWaitValue32_v2" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int) nogil> __cuStreamWaitValue32_v2)(stream, addr, value, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5981
 *     global __cuStreamWaitValue32_v2
 *     cuPythonInit()
 *     if __cuStreamWaitValue32_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitValue32_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5984
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitValue32_v2" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int) nogil> __cuStreamWaitValue32_v2)(stream, addr, value, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue32_v2)(__pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":5985
 *             raise RuntimeError('Function "cuStreamWaitValue32_v2" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int) nogil> __cuStreamWaitValue32_v2)(stream, addr, value, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamWaitValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5979
 * 
 * cdef CUresult _cuStreamWaitValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamWaitValue32_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamWaitValue32_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5978
 *     return err
 * 
 * cdef CUresult _cuStreamWaitValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamWaitValue32_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuStreamWaitValue32_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5987
 *     return err
 * 
 * cdef CUresult _cuStreamWaitValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamWaitValue64_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitValue64_v2(CUstream __pyx_v_stream, CUdeviceptr __pyx_v_addr, cuuint64_t __pyx_v_value, unsigned int __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuStreamWaitValue64_v2", 1);
  __Pyx_TraceCall("_cuStreamWaitValue64_v2", __pyx_f[0], 5987, 1, __PYX_ERR(0, 5987, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5988
 * 
 * cdef CUresult _cuStreamWaitValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamWaitValue64_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamWaitValue64_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5989
 * cdef CUresult _cuStreamWaitValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamWaitValue64_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamWaitValue64_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5989, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5990
 *     global __cuStreamWaitValue64_v2
 *     cuPythonInit()
 *     if __cuStreamWaitValue64_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitValue64_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue64_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5991
 *     cuPythonInit()
 *     if __cuStreamWaitValue64_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamWaitValue64_v2" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int) nogil> __cuStreamWaitValue64_v2)(stream, addr, value, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5992
 *     if __cuStreamWaitValue64_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitValue64_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int) nogil> __cuStreamWaitValue64_v2)(stream, addr, value, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__229, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5992, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5992, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5991
 *     cuPythonInit()
 *     if __cuStreamWaitValue64_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamWaitValue64_v2" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int) nogil> __cuStreamWaitValue64_v2)(stream, addr, value, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5990
 *     global __cuStreamWaitValue64_v2
 *     cuPythonInit()
 *     if __cuStreamWaitValue64_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitValue64_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5993
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitValue64_v2" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int) nogil> __cuStreamWaitValue64_v2)(stream, addr, value, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue64_v2)(__pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":5994
 *             raise RuntimeError('Function "cuStreamWaitValue64_v2" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int) nogil> __cuStreamWaitValue64_v2)(stream, addr, value, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamWriteValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5988
 * 
 * cdef CUresult _cuStreamWaitValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamWaitValue64_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamWaitValue64_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5987
 *     return err
 * 
 * cdef CUresult _cuStreamWaitValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamWaitValue64_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuStreamWaitValue64_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5996
 *     return err
 * 
 * cdef CUresult _cuStreamWriteValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamWriteValue32_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamWriteValue32_v2(CUstream __pyx_v_stream, CUdeviceptr __pyx_v_addr, cuuint32_t __pyx_v_value, unsigned int __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuStreamWriteValue32_v2", 1);
  __Pyx_TraceCall("_cuStreamWriteValue32_v2", __pyx_f[0], 5996, 1, __PYX_ERR(0, 5996, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5997
 * 
 * cdef CUresult _cuStreamWriteValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamWriteValue32_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamWriteValue32_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5998
 * cdef CUresult _cuStreamWriteValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamWriteValue32_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamWriteValue32_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5998, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5999
 *     global __cuStreamWriteValue32_v2
 *     cuPythonInit()
 *     if __cuStreamWriteValue32_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWriteValue32_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue32_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6000
 *     cuPythonInit()
 *     if __cuStreamWriteValue32_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamWriteValue32_v2" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int) nogil> __cuStreamWriteValue32_v2)(stream, addr, value, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6001
 *     if __cuStreamWriteValue32_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWriteValue32_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int) nogil> __cuStreamWriteValue32_v2)(stream, addr, value, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__230, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6001, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6001, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6000
 *     cuPythonInit()
 *     if __cuStreamWriteValue32_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamWriteValue32_v2" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int) nogil> __cuStreamWriteValue32_v2)(stream, addr, value, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5999
 *     global __cuStreamWriteValue32_v2
 *     cuPythonInit()
 *     if __cuStreamWriteValue32_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWriteValue32_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6002
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWriteValue32_v2" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int) nogil> __cuStreamWriteValue32_v2)(stream, addr, value, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue32_v2)(__pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":6003
 *             raise RuntimeError('Function "cuStreamWriteValue32_v2" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int) nogil> __cuStreamWriteValue32_v2)(stream, addr, value, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamWriteValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5997
 * 
 * cdef CUresult _cuStreamWriteValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamWriteValue32_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamWriteValue32_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5996
 *     return err
 * 
 * cdef CUresult _cuStreamWriteValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamWriteValue32_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuStreamWriteValue32_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6005
 *     return err
 * 
 * cdef CUresult _cuStreamWriteValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamWriteValue64_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamWriteValue64_v2(CUstream __pyx_v_stream, CUdeviceptr __pyx_v_addr, cuuint64_t __pyx_v_value, unsigned int __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuStreamWriteValue64_v2", 1);
  __Pyx_TraceCall("_cuStreamWriteValue64_v2", __pyx_f[0], 6005, 1, __PYX_ERR(0, 6005, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6006
 * 
 * cdef CUresult _cuStreamWriteValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamWriteValue64_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamWriteValue64_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6007
 * cdef CUresult _cuStreamWriteValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamWriteValue64_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamWriteValue64_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6007, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6008
 *     global __cuStreamWriteValue64_v2
 *     cuPythonInit()
 *     if __cuStreamWriteValue64_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWriteValue64_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue64_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6009
 *     cuPythonInit()
 *     if __cuStreamWriteValue64_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamWriteValue64_v2" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int) nogil> __cuStreamWriteValue64_v2)(stream, addr, value, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6010
 *     if __cuStreamWriteValue64_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWriteValue64_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int) nogil> __cuStreamWriteValue64_v2)(stream, addr, value, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__231, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6010, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6010, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6009
 *     cuPythonInit()
 *     if __cuStreamWriteValue64_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamWriteValue64_v2" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int) nogil> __cuStreamWriteValue64_v2)(stream, addr, value, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6008
 *     global __cuStreamWriteValue64_v2
 *     cuPythonInit()
 *     if __cuStreamWriteValue64_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWriteValue64_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6011
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWriteValue64_v2" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int) nogil> __cuStreamWriteValue64_v2)(stream, addr, value, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue64_v2)(__pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":6012
 *             raise RuntimeError('Function "cuStreamWriteValue64_v2" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int) nogil> __cuStreamWriteValue64_v2)(stream, addr, value, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamBatchMemOp_v2(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6006
 * 
 * cdef CUresult _cuStreamWriteValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamWriteValue64_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamWriteValue64_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6005
 *     return err
 * 
 * cdef CUresult _cuStreamWriteValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamWriteValue64_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuStreamWriteValue64_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6014
 *     return err
 * 
 * cdef CUresult _cuStreamBatchMemOp_v2(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamBatchMemOp_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamBatchMemOp_v2(CUstream __pyx_v_stream, unsigned int __pyx_v_count, CUstreamBatchMemOpParams *__pyx_v_paramArray, unsigned int __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuStreamBatchMemOp_v2", 1);
  __Pyx_TraceCall("_cuStreamBatchMemOp_v2", __pyx_f[0], 6014, 1, __PYX_ERR(0, 6014, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6015
 * 
 * cdef CUresult _cuStreamBatchMemOp_v2(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamBatchMemOp_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamBatchMemOp_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6016
 * cdef CUresult _cuStreamBatchMemOp_v2(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamBatchMemOp_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamBatchMemOp_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6016, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6017
 *     global __cuStreamBatchMemOp_v2
 *     cuPythonInit()
 *     if __cuStreamBatchMemOp_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamBatchMemOp_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamBatchMemOp_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6018
 *     cuPythonInit()
 *     if __cuStreamBatchMemOp_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamBatchMemOp_v2" not found')
 *     err = (<CUresult (*)(CUstream, unsigned int, CUstreamBatchMemOpParams*, unsigned int) nogil> __cuStreamBatchMemOp_v2)(stream, count, paramArray, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6019
 *     if __cuStreamBatchMemOp_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamBatchMemOp_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, unsigned int, CUstreamBatchMemOpParams*, unsigned int) nogil> __cuStreamBatchMemOp_v2)(stream, count, paramArray, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__232, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6019, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6019, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6018
 *     cuPythonInit()
 *     if __cuStreamBatchMemOp_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamBatchMemOp_v2" not found')
 *     err = (<CUresult (*)(CUstream, unsigned int, CUstreamBatchMemOpParams*, unsigned int) nogil> __cuStreamBatchMemOp_v2)(stream, count, paramArray, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6017
 *     global __cuStreamBatchMemOp_v2
 *     cuPythonInit()
 *     if __cuStreamBatchMemOp_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamBatchMemOp_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6020
 *         with gil:
 *             raise RuntimeError('Function "cuStreamBatchMemOp_v2" not found')
 *     err = (<CUresult (*)(CUstream, unsigned int, CUstreamBatchMemOpParams*, unsigned int) nogil> __cuStreamBatchMemOp_v2)(stream, count, paramArray, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream, unsigned int, CUstreamBatchMemOpParams *, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamBatchMemOp_v2)(__pyx_v_stream, __pyx_v_count, __pyx_v_paramArray, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":6021
 *             raise RuntimeError('Function "cuStreamBatchMemOp_v2" not found')
 *     err = (<CUresult (*)(CUstream, unsigned int, CUstreamBatchMemOpParams*, unsigned int) nogil> __cuStreamBatchMemOp_v2)(stream, count, paramArray, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6015
 * 
 * cdef CUresult _cuStreamBatchMemOp_v2(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuStreamBatchMemOp_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamBatchMemOp_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6014
 *     return err
 * 
 * cdef CUresult _cuStreamBatchMemOp_v2(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuStreamBatchMemOp_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuStreamBatchMemOp_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6023
 *     return err
 * 
 * cdef CUresult _cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuFuncGetAttribute
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuFuncGetAttribute(int *__pyx_v_pi, CUfunction_attribute __pyx_v_attrib, CUfunction __pyx_v_hfunc) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuFuncGetAttribute", 1);
  __Pyx_TraceCall("_cuFuncGetAttribute", __pyx_f[0], 6023, 1, __PYX_ERR(0, 6023, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6024
 * 
 * cdef CUresult _cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuFuncGetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuFuncGetAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6025
 * cdef CUresult _cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuFuncGetAttribute
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuFuncGetAttribute == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6025, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6026
 *     global __cuFuncGetAttribute
 *     cuPythonInit()
 *     if __cuFuncGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncGetAttribute" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuFuncGetAttribute == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6027
 *     cuPythonInit()
 *     if __cuFuncGetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuFuncGetAttribute" not found')
 *     err = (<CUresult (*)(int*, CUfunction_attribute, CUfunction) nogil> __cuFuncGetAttribute)(pi, attrib, hfunc)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6028
 *     if __cuFuncGetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFuncGetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, CUfunction_attribute, CUfunction) nogil> __cuFuncGetAttribute)(pi, attrib, hfunc)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__233, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6028, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6028, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6027
 *     cuPythonInit()
 *     if __cuFuncGetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuFuncGetAttribute" not found')
 *     err = (<CUresult (*)(int*, CUfunction_attribute, CUfunction) nogil> __cuFuncGetAttribute)(pi, attrib, hfunc)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6026
 *     global __cuFuncGetAttribute
 *     cuPythonInit()
 *     if __cuFuncGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncGetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6029
 *         with gil:
 *             raise RuntimeError('Function "cuFuncGetAttribute" not found')
 *     err = (<CUresult (*)(int*, CUfunction_attribute, CUfunction) nogil> __cuFuncGetAttribute)(pi, attrib, hfunc)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(int *, CUfunction_attribute, CUfunction))__pyx_v_4cuda_5_cuda_5ccuda___cuFuncGetAttribute)(__pyx_v_pi, __pyx_v_attrib, __pyx_v_hfunc);

    /* "cuda/_cuda/ccuda.pyx":6030
 *             raise RuntimeError('Function "cuFuncGetAttribute" not found')
 *     err = (<CUresult (*)(int*, CUfunction_attribute, CUfunction) nogil> __cuFuncGetAttribute)(pi, attrib, hfunc)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6024
 * 
 * cdef CUresult _cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuFuncGetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuFuncGetAttribute == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6023
 *     return err
 * 
 * cdef CUresult _cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuFuncGetAttribute
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuFuncGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6032
 *     return err
 * 
 * cdef CUresult _cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuFuncSetAttribute
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetAttribute(CUfunction __pyx_v_hfunc, CUfunction_attribute __pyx_v_attrib, int __pyx_v_value) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuFuncSetAttribute", 1);
  __Pyx_TraceCall("_cuFuncSetAttribute", __pyx_f[0], 6032, 1, __PYX_ERR(0, 6032, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6033
 * 
 * cdef CUresult _cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuFuncSetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuFuncSetAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6034
 * cdef CUresult _cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuFuncSetAttribute
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuFuncSetAttribute == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6034, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6035
 *     global __cuFuncSetAttribute
 *     cuPythonInit()
 *     if __cuFuncSetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetAttribute" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetAttribute == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6036
 *     cuPythonInit()
 *     if __cuFuncSetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuFuncSetAttribute" not found')
 *     err = (<CUresult (*)(CUfunction, CUfunction_attribute, int) nogil> __cuFuncSetAttribute)(hfunc, attrib, value)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6037
 *     if __cuFuncSetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, CUfunction_attribute, int) nogil> __cuFuncSetAttribute)(hfunc, attrib, value)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__234, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6037, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6037, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6036
 *     cuPythonInit()
 *     if __cuFuncSetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuFuncSetAttribute" not found')
 *     err = (<CUresult (*)(CUfunction, CUfunction_attribute, int) nogil> __cuFuncSetAttribute)(hfunc, attrib, value)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6035
 *     global __cuFuncSetAttribute
 *     cuPythonInit()
 *     if __cuFuncSetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6038
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetAttribute" not found')
 *     err = (<CUresult (*)(CUfunction, CUfunction_attribute, int) nogil> __cuFuncSetAttribute)(hfunc, attrib, value)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUfunction, CUfunction_attribute, int))__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetAttribute)(__pyx_v_hfunc, __pyx_v_attrib, __pyx_v_value);

    /* "cuda/_cuda/ccuda.pyx":6039
 *             raise RuntimeError('Function "cuFuncSetAttribute" not found')
 *     err = (<CUresult (*)(CUfunction, CUfunction_attribute, int) nogil> __cuFuncSetAttribute)(hfunc, attrib, value)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6033
 * 
 * cdef CUresult _cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuFuncSetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuFuncSetAttribute == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6032
 *     return err
 * 
 * cdef CUresult _cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuFuncSetAttribute
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuFuncSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6041
 *     return err
 * 
 * cdef CUresult _cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuFuncSetCacheConfig
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetCacheConfig(CUfunction __pyx_v_hfunc, CUfunc_cache __pyx_v_config) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuFuncSetCacheConfig", 1);
  __Pyx_TraceCall("_cuFuncSetCacheConfig", __pyx_f[0], 6041, 1, __PYX_ERR(0, 6041, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6042
 * 
 * cdef CUresult _cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuFuncSetCacheConfig             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuFuncSetCacheConfig == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6043
 * cdef CUresult _cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuFuncSetCacheConfig
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuFuncSetCacheConfig == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6043, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6044
 *     global __cuFuncSetCacheConfig
 *     cuPythonInit()
 *     if __cuFuncSetCacheConfig == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetCacheConfig" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetCacheConfig == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6045
 *     cuPythonInit()
 *     if __cuFuncSetCacheConfig == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuFuncSetCacheConfig" not found')
 *     err = (<CUresult (*)(CUfunction, CUfunc_cache) nogil> __cuFuncSetCacheConfig)(hfunc, config)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6046
 *     if __cuFuncSetCacheConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetCacheConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, CUfunc_cache) nogil> __cuFuncSetCacheConfig)(hfunc, config)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__235, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6046, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6046, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6045
 *     cuPythonInit()
 *     if __cuFuncSetCacheConfig == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuFuncSetCacheConfig" not found')
 *     err = (<CUresult (*)(CUfunction, CUfunc_cache) nogil> __cuFuncSetCacheConfig)(hfunc, config)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6044
 *     global __cuFuncSetCacheConfig
 *     cuPythonInit()
 *     if __cuFuncSetCacheConfig == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetCacheConfig" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6047
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetCacheConfig" not found')
 *     err = (<CUresult (*)(CUfunction, CUfunc_cache) nogil> __cuFuncSetCacheConfig)(hfunc, config)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUfunction, CUfunc_cache))__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetCacheConfig)(__pyx_v_hfunc, __pyx_v_config);

    /* "cuda/_cuda/ccuda.pyx":6048
 *             raise RuntimeError('Function "cuFuncSetCacheConfig" not found')
 *     err = (<CUresult (*)(CUfunction, CUfunc_cache) nogil> __cuFuncSetCacheConfig)(hfunc, config)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6042
 * 
 * cdef CUresult _cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuFuncSetCacheConfig             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuFuncSetCacheConfig == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6041
 *     return err
 * 
 * cdef CUresult _cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuFuncSetCacheConfig
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuFuncSetCacheConfig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6050
 *     return err
 * 
 * cdef CUresult _cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuFuncSetSharedMemConfig
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetSharedMemConfig(CUfunction __pyx_v_hfunc, CUsharedconfig __pyx_v_config) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuFuncSetSharedMemConfig", 1);
  __Pyx_TraceCall("_cuFuncSetSharedMemConfig", __pyx_f[0], 6050, 1, __PYX_ERR(0, 6050, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6051
 * 
 * cdef CUresult _cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuFuncSetSharedMemConfig             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuFuncSetSharedMemConfig == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6052
 * cdef CUresult _cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuFuncSetSharedMemConfig
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuFuncSetSharedMemConfig == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6052, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6053
 *     global __cuFuncSetSharedMemConfig
 *     cuPythonInit()
 *     if __cuFuncSetSharedMemConfig == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetSharedMemConfig" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetSharedMemConfig == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6054
 *     cuPythonInit()
 *     if __cuFuncSetSharedMemConfig == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuFuncSetSharedMemConfig" not found')
 *     err = (<CUresult (*)(CUfunction, CUsharedconfig) nogil> __cuFuncSetSharedMemConfig)(hfunc, config)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6055
 *     if __cuFuncSetSharedMemConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetSharedMemConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, CUsharedconfig) nogil> __cuFuncSetSharedMemConfig)(hfunc, config)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__236, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6055, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6055, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6054
 *     cuPythonInit()
 *     if __cuFuncSetSharedMemConfig == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuFuncSetSharedMemConfig" not found')
 *     err = (<CUresult (*)(CUfunction, CUsharedconfig) nogil> __cuFuncSetSharedMemConfig)(hfunc, config)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6053
 *     global __cuFuncSetSharedMemConfig
 *     cuPythonInit()
 *     if __cuFuncSetSharedMemConfig == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetSharedMemConfig" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6056
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetSharedMemConfig" not found')
 *     err = (<CUresult (*)(CUfunction, CUsharedconfig) nogil> __cuFuncSetSharedMemConfig)(hfunc, config)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUfunction, CUsharedconfig))__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetSharedMemConfig)(__pyx_v_hfunc, __pyx_v_config);

    /* "cuda/_cuda/ccuda.pyx":6057
 *             raise RuntimeError('Function "cuFuncSetSharedMemConfig" not found')
 *     err = (<CUresult (*)(CUfunction, CUsharedconfig) nogil> __cuFuncSetSharedMemConfig)(hfunc, config)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6051
 * 
 * cdef CUresult _cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuFuncSetSharedMemConfig             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuFuncSetSharedMemConfig == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6050
 *     return err
 * 
 * cdef CUresult _cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuFuncSetSharedMemConfig
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuFuncSetSharedMemConfig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6059
 *     return err
 * 
 * cdef CUresult _cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuFuncGetModule
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuFuncGetModule(CUmodule *__pyx_v_hmod, CUfunction __pyx_v_hfunc) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuFuncGetModule", 1);
  __Pyx_TraceCall("_cuFuncGetModule", __pyx_f[0], 6059, 1, __PYX_ERR(0, 6059, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6060
 * 
 * cdef CUresult _cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuFuncGetModule             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuFuncGetModule == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6061
 * cdef CUresult _cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuFuncGetModule
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuFuncGetModule == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6061, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6062
 *     global __cuFuncGetModule
 *     cuPythonInit()
 *     if __cuFuncGetModule == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncGetModule" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuFuncGetModule == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6063
 *     cuPythonInit()
 *     if __cuFuncGetModule == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuFuncGetModule" not found')
 *     err = (<CUresult (*)(CUmodule*, CUfunction) nogil> __cuFuncGetModule)(hmod, hfunc)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6064
 *     if __cuFuncGetModule == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFuncGetModule" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule*, CUfunction) nogil> __cuFuncGetModule)(hmod, hfunc)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__237, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6064, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6064, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6063
 *     cuPythonInit()
 *     if __cuFuncGetModule == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuFuncGetModule" not found')
 *     err = (<CUresult (*)(CUmodule*, CUfunction) nogil> __cuFuncGetModule)(hmod, hfunc)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6062
 *     global __cuFuncGetModule
 *     cuPythonInit()
 *     if __cuFuncGetModule == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncGetModule" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6065
 *         with gil:
 *             raise RuntimeError('Function "cuFuncGetModule" not found')
 *     err = (<CUresult (*)(CUmodule*, CUfunction) nogil> __cuFuncGetModule)(hmod, hfunc)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmodule *, CUfunction))__pyx_v_4cuda_5_cuda_5ccuda___cuFuncGetModule)(__pyx_v_hmod, __pyx_v_hfunc);

    /* "cuda/_cuda/ccuda.pyx":6066
 *             raise RuntimeError('Function "cuFuncGetModule" not found')
 *     err = (<CUresult (*)(CUmodule*, CUfunction) nogil> __cuFuncGetModule)(hmod, hfunc)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * 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:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6060
 * 
 * cdef CUresult _cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuFuncGetModule             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuFuncGetModule == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6059
 *     return err
 * 
 * cdef CUresult _cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuFuncGetModule
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuFuncGetModule", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6068
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuLaunchKernel
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLaunchKernel(CUfunction __pyx_v_f, unsigned int __pyx_v_gridDimX, unsigned int __pyx_v_gridDimY, unsigned int __pyx_v_gridDimZ, unsigned int __pyx_v_blockDimX, unsigned int __pyx_v_blockDimY, unsigned int __pyx_v_blockDimZ, unsigned int __pyx_v_sharedMemBytes, CUstream __pyx_v_hStream, void **__pyx_v_kernelParams, void **__pyx_v_extra) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuLaunchKernel", 1);
  __Pyx_TraceCall("_cuLaunchKernel", __pyx_f[0], 6068, 1, __PYX_ERR(0, 6068, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6069
 * 
 * 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:
 *     global __cuLaunchKernel             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLaunchKernel == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6070
 * 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:
 *     global __cuLaunchKernel
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuLaunchKernel == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6070, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6071
 *     global __cuLaunchKernel
 *     cuPythonInit()
 *     if __cuLaunchKernel == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchKernel" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchKernel == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6072
 *     cuPythonInit()
 *     if __cuLaunchKernel == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLaunchKernel" not found')
 *     err = (<CUresult (*)(CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void**, void**) nogil> __cuLaunchKernel)(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6073
 *     if __cuLaunchKernel == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchKernel" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void**, void**) nogil> __cuLaunchKernel)(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__238, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6073, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6073, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6072
 *     cuPythonInit()
 *     if __cuLaunchKernel == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLaunchKernel" not found')
 *     err = (<CUresult (*)(CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void**, void**) nogil> __cuLaunchKernel)(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6071
 *     global __cuLaunchKernel
 *     cuPythonInit()
 *     if __cuLaunchKernel == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchKernel" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6074
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchKernel" not found')
 *     err = (<CUresult (*)(CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void**, void**) nogil> __cuLaunchKernel)(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void **, void **))__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchKernel)(__pyx_v_f, __pyx_v_gridDimX, __pyx_v_gridDimY, __pyx_v_gridDimZ, __pyx_v_blockDimX, __pyx_v_blockDimY, __pyx_v_blockDimZ, __pyx_v_sharedMemBytes, __pyx_v_hStream, __pyx_v_kernelParams, __pyx_v_extra);

    /* "cuda/_cuda/ccuda.pyx":6075
 *             raise RuntimeError('Function "cuLaunchKernel" not found')
 *     err = (<CUresult (*)(CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void**, void**) nogil> __cuLaunchKernel)(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6069
 * 
 * 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:
 *     global __cuLaunchKernel             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLaunchKernel == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6068
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuLaunchKernel
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuLaunchKernel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6077
 *     return err
 * 
 * cdef CUresult _cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLaunchKernelEx
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLaunchKernelEx(CUlaunchConfig const *__pyx_v_config, CUfunction __pyx_v_f, void **__pyx_v_kernelParams, void **__pyx_v_extra) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuLaunchKernelEx", 1);
  __Pyx_TraceCall("_cuLaunchKernelEx", __pyx_f[0], 6077, 1, __PYX_ERR(0, 6077, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6078
 * 
 * cdef CUresult _cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLaunchKernelEx             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLaunchKernelEx == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6079
 * cdef CUresult _cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLaunchKernelEx
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuLaunchKernelEx == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6079, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6080
 *     global __cuLaunchKernelEx
 *     cuPythonInit()
 *     if __cuLaunchKernelEx == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchKernelEx" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchKernelEx == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6081
 *     cuPythonInit()
 *     if __cuLaunchKernelEx == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLaunchKernelEx" not found')
 *     err = (<CUresult (*)(const CUlaunchConfig*, CUfunction, void**, void**) nogil> __cuLaunchKernelEx)(config, f, kernelParams, extra)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6082
 *     if __cuLaunchKernelEx == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchKernelEx" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const CUlaunchConfig*, CUfunction, void**, void**) nogil> __cuLaunchKernelEx)(config, f, kernelParams, extra)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__239, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6082, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6082, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6081
 *     cuPythonInit()
 *     if __cuLaunchKernelEx == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLaunchKernelEx" not found')
 *     err = (<CUresult (*)(const CUlaunchConfig*, CUfunction, void**, void**) nogil> __cuLaunchKernelEx)(config, f, kernelParams, extra)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6080
 *     global __cuLaunchKernelEx
 *     cuPythonInit()
 *     if __cuLaunchKernelEx == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchKernelEx" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6083
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchKernelEx" not found')
 *     err = (<CUresult (*)(const CUlaunchConfig*, CUfunction, void**, void**) nogil> __cuLaunchKernelEx)(config, f, kernelParams, extra)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUlaunchConfig const *, CUfunction, void **, void **))__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchKernelEx)(__pyx_v_config, __pyx_v_f, __pyx_v_kernelParams, __pyx_v_extra);

    /* "cuda/_cuda/ccuda.pyx":6084
 *             raise RuntimeError('Function "cuLaunchKernelEx" not found')
 *     err = (<CUresult (*)(const CUlaunchConfig*, CUfunction, void**, void**) nogil> __cuLaunchKernelEx)(config, f, kernelParams, extra)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * 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:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6078
 * 
 * cdef CUresult _cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLaunchKernelEx             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLaunchKernelEx == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6077
 *     return err
 * 
 * cdef CUresult _cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLaunchKernelEx
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuLaunchKernelEx", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6086
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuLaunchCooperativeKernel
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLaunchCooperativeKernel(CUfunction __pyx_v_f, unsigned int __pyx_v_gridDimX, unsigned int __pyx_v_gridDimY, unsigned int __pyx_v_gridDimZ, unsigned int __pyx_v_blockDimX, unsigned int __pyx_v_blockDimY, unsigned int __pyx_v_blockDimZ, unsigned int __pyx_v_sharedMemBytes, CUstream __pyx_v_hStream, void **__pyx_v_kernelParams) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuLaunchCooperativeKernel", 1);
  __Pyx_TraceCall("_cuLaunchCooperativeKernel", __pyx_f[0], 6086, 1, __PYX_ERR(0, 6086, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6087
 * 
 * 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:
 *     global __cuLaunchCooperativeKernel             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLaunchCooperativeKernel == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6088
 * 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:
 *     global __cuLaunchCooperativeKernel
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuLaunchCooperativeKernel == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6088, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6089
 *     global __cuLaunchCooperativeKernel
 *     cuPythonInit()
 *     if __cuLaunchCooperativeKernel == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchCooperativeKernel" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchCooperativeKernel == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6090
 *     cuPythonInit()
 *     if __cuLaunchCooperativeKernel == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLaunchCooperativeKernel" not found')
 *     err = (<CUresult (*)(CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void**) nogil> __cuLaunchCooperativeKernel)(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6091
 *     if __cuLaunchCooperativeKernel == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchCooperativeKernel" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void**) nogil> __cuLaunchCooperativeKernel)(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__240, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6091, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6091, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6090
 *     cuPythonInit()
 *     if __cuLaunchCooperativeKernel == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLaunchCooperativeKernel" not found')
 *     err = (<CUresult (*)(CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void**) nogil> __cuLaunchCooperativeKernel)(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6089
 *     global __cuLaunchCooperativeKernel
 *     cuPythonInit()
 *     if __cuLaunchCooperativeKernel == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchCooperativeKernel" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6092
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchCooperativeKernel" not found')
 *     err = (<CUresult (*)(CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void**) nogil> __cuLaunchCooperativeKernel)(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void **))__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchCooperativeKernel)(__pyx_v_f, __pyx_v_gridDimX, __pyx_v_gridDimY, __pyx_v_gridDimZ, __pyx_v_blockDimX, __pyx_v_blockDimY, __pyx_v_blockDimZ, __pyx_v_sharedMemBytes, __pyx_v_hStream, __pyx_v_kernelParams);

    /* "cuda/_cuda/ccuda.pyx":6093
 *             raise RuntimeError('Function "cuLaunchCooperativeKernel" not found')
 *     err = (<CUresult (*)(CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void**) nogil> __cuLaunchCooperativeKernel)(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6087
 * 
 * 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:
 *     global __cuLaunchCooperativeKernel             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLaunchCooperativeKernel == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6086
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuLaunchCooperativeKernel
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuLaunchCooperativeKernel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6095
 *     return err
 * 
 * cdef CUresult _cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLaunchCooperativeKernelMultiDevice
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS *__pyx_v_launchParamsList, unsigned int __pyx_v_numDevices, unsigned int __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuLaunchCooperativeKernelMultiDevice", 1);
  __Pyx_TraceCall("_cuLaunchCooperativeKernelMultiDevice", __pyx_f[0], 6095, 1, __PYX_ERR(0, 6095, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6096
 * 
 * cdef CUresult _cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLaunchCooperativeKernelMultiDevice             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLaunchCooperativeKernelMultiDevice == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6097
 * cdef CUresult _cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLaunchCooperativeKernelMultiDevice
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuLaunchCooperativeKernelMultiDevice == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6097, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6098
 *     global __cuLaunchCooperativeKernelMultiDevice
 *     cuPythonInit()
 *     if __cuLaunchCooperativeKernelMultiDevice == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchCooperativeKernelMultiDevice" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchCooperativeKernelMultiDevice == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6099
 *     cuPythonInit()
 *     if __cuLaunchCooperativeKernelMultiDevice == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLaunchCooperativeKernelMultiDevice" not found')
 *     err = (<CUresult (*)(CUDA_LAUNCH_PARAMS*, unsigned int, unsigned int) nogil> __cuLaunchCooperativeKernelMultiDevice)(launchParamsList, numDevices, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6100
 *     if __cuLaunchCooperativeKernelMultiDevice == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchCooperativeKernelMultiDevice" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUDA_LAUNCH_PARAMS*, unsigned int, unsigned int) nogil> __cuLaunchCooperativeKernelMultiDevice)(launchParamsList, numDevices, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__241, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6100, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6100, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6099
 *     cuPythonInit()
 *     if __cuLaunchCooperativeKernelMultiDevice == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLaunchCooperativeKernelMultiDevice" not found')
 *     err = (<CUresult (*)(CUDA_LAUNCH_PARAMS*, unsigned int, unsigned int) nogil> __cuLaunchCooperativeKernelMultiDevice)(launchParamsList, numDevices, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6098
 *     global __cuLaunchCooperativeKernelMultiDevice
 *     cuPythonInit()
 *     if __cuLaunchCooperativeKernelMultiDevice == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchCooperativeKernelMultiDevice" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6101
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchCooperativeKernelMultiDevice" not found')
 *     err = (<CUresult (*)(CUDA_LAUNCH_PARAMS*, unsigned int, unsigned int) nogil> __cuLaunchCooperativeKernelMultiDevice)(launchParamsList, numDevices, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUDA_LAUNCH_PARAMS *, unsigned int, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchCooperativeKernelMultiDevice)(__pyx_v_launchParamsList, __pyx_v_numDevices, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":6102
 *             raise RuntimeError('Function "cuLaunchCooperativeKernelMultiDevice" not found')
 *     err = (<CUresult (*)(CUDA_LAUNCH_PARAMS*, unsigned int, unsigned int) nogil> __cuLaunchCooperativeKernelMultiDevice)(launchParamsList, numDevices, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6096
 * 
 * cdef CUresult _cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLaunchCooperativeKernelMultiDevice             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLaunchCooperativeKernelMultiDevice == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6095
 *     return err
 * 
 * cdef CUresult _cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLaunchCooperativeKernelMultiDevice
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuLaunchCooperativeKernelMultiDevice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6104
 *     return err
 * 
 * cdef CUresult _cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLaunchHostFunc
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLaunchHostFunc(CUstream __pyx_v_hStream, CUhostFn __pyx_v_fn, void *__pyx_v_userData) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuLaunchHostFunc", 1);
  __Pyx_TraceCall("_cuLaunchHostFunc", __pyx_f[0], 6104, 1, __PYX_ERR(0, 6104, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6105
 * 
 * cdef CUresult _cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLaunchHostFunc             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLaunchHostFunc == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6106
 * cdef CUresult _cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLaunchHostFunc
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuLaunchHostFunc == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6106, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6107
 *     global __cuLaunchHostFunc
 *     cuPythonInit()
 *     if __cuLaunchHostFunc == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchHostFunc" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchHostFunc == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6108
 *     cuPythonInit()
 *     if __cuLaunchHostFunc == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLaunchHostFunc" not found')
 *     err = (<CUresult (*)(CUstream, CUhostFn, void*) nogil> __cuLaunchHostFunc)(hStream, fn, userData)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6109
 *     if __cuLaunchHostFunc == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchHostFunc" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUhostFn, void*) nogil> __cuLaunchHostFunc)(hStream, fn, userData)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__242, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6109, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6109, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6108
 *     cuPythonInit()
 *     if __cuLaunchHostFunc == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLaunchHostFunc" not found')
 *     err = (<CUresult (*)(CUstream, CUhostFn, void*) nogil> __cuLaunchHostFunc)(hStream, fn, userData)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6107
 *     global __cuLaunchHostFunc
 *     cuPythonInit()
 *     if __cuLaunchHostFunc == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchHostFunc" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6110
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchHostFunc" not found')
 *     err = (<CUresult (*)(CUstream, CUhostFn, void*) nogil> __cuLaunchHostFunc)(hStream, fn, userData)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream, CUhostFn, void *))__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchHostFunc)(__pyx_v_hStream, __pyx_v_fn, __pyx_v_userData);

    /* "cuda/_cuda/ccuda.pyx":6111
 *             raise RuntimeError('Function "cuLaunchHostFunc" not found')
 *     err = (<CUresult (*)(CUstream, CUhostFn, void*) nogil> __cuLaunchHostFunc)(hStream, fn, userData)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6105
 * 
 * cdef CUresult _cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLaunchHostFunc             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLaunchHostFunc == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6104
 *     return err
 * 
 * cdef CUresult _cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLaunchHostFunc
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuLaunchHostFunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6113
 *     return err
 * 
 * cdef CUresult _cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuFuncSetBlockShape
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetBlockShape(CUfunction __pyx_v_hfunc, int __pyx_v_x, int __pyx_v_y, int __pyx_v_z) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuFuncSetBlockShape", 1);
  __Pyx_TraceCall("_cuFuncSetBlockShape", __pyx_f[0], 6113, 1, __PYX_ERR(0, 6113, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6114
 * 
 * cdef CUresult _cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuFuncSetBlockShape             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuFuncSetBlockShape == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6115
 * cdef CUresult _cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuFuncSetBlockShape
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuFuncSetBlockShape == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6115, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6116
 *     global __cuFuncSetBlockShape
 *     cuPythonInit()
 *     if __cuFuncSetBlockShape == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetBlockShape" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetBlockShape == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6117
 *     cuPythonInit()
 *     if __cuFuncSetBlockShape == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuFuncSetBlockShape" not found')
 *     err = (<CUresult (*)(CUfunction, int, int, int) nogil> __cuFuncSetBlockShape)(hfunc, x, y, z)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6118
 *     if __cuFuncSetBlockShape == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetBlockShape" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, int, int, int) nogil> __cuFuncSetBlockShape)(hfunc, x, y, z)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__243, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6118, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6118, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6117
 *     cuPythonInit()
 *     if __cuFuncSetBlockShape == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuFuncSetBlockShape" not found')
 *     err = (<CUresult (*)(CUfunction, int, int, int) nogil> __cuFuncSetBlockShape)(hfunc, x, y, z)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6116
 *     global __cuFuncSetBlockShape
 *     cuPythonInit()
 *     if __cuFuncSetBlockShape == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetBlockShape" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6119
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetBlockShape" not found')
 *     err = (<CUresult (*)(CUfunction, int, int, int) nogil> __cuFuncSetBlockShape)(hfunc, x, y, z)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUfunction, int, int, int))__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetBlockShape)(__pyx_v_hfunc, __pyx_v_x, __pyx_v_y, __pyx_v_z);

    /* "cuda/_cuda/ccuda.pyx":6120
 *             raise RuntimeError('Function "cuFuncSetBlockShape" not found')
 *     err = (<CUresult (*)(CUfunction, int, int, int) nogil> __cuFuncSetBlockShape)(hfunc, x, y, z)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6114
 * 
 * cdef CUresult _cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuFuncSetBlockShape             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuFuncSetBlockShape == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6113
 *     return err
 * 
 * cdef CUresult _cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuFuncSetBlockShape
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuFuncSetBlockShape", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6122
 *     return err
 * 
 * cdef CUresult _cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuFuncSetSharedSize
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetSharedSize(CUfunction __pyx_v_hfunc, unsigned int __pyx_v_numbytes) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuFuncSetSharedSize", 1);
  __Pyx_TraceCall("_cuFuncSetSharedSize", __pyx_f[0], 6122, 1, __PYX_ERR(0, 6122, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6123
 * 
 * cdef CUresult _cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuFuncSetSharedSize             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuFuncSetSharedSize == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6124
 * cdef CUresult _cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuFuncSetSharedSize
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuFuncSetSharedSize == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6124, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6125
 *     global __cuFuncSetSharedSize
 *     cuPythonInit()
 *     if __cuFuncSetSharedSize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetSharedSize" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetSharedSize == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6126
 *     cuPythonInit()
 *     if __cuFuncSetSharedSize == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuFuncSetSharedSize" not found')
 *     err = (<CUresult (*)(CUfunction, unsigned int) nogil> __cuFuncSetSharedSize)(hfunc, numbytes)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6127
 *     if __cuFuncSetSharedSize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetSharedSize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, unsigned int) nogil> __cuFuncSetSharedSize)(hfunc, numbytes)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__244, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6127, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6127, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6126
 *     cuPythonInit()
 *     if __cuFuncSetSharedSize == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuFuncSetSharedSize" not found')
 *     err = (<CUresult (*)(CUfunction, unsigned int) nogil> __cuFuncSetSharedSize)(hfunc, numbytes)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6125
 *     global __cuFuncSetSharedSize
 *     cuPythonInit()
 *     if __cuFuncSetSharedSize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetSharedSize" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6128
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetSharedSize" not found')
 *     err = (<CUresult (*)(CUfunction, unsigned int) nogil> __cuFuncSetSharedSize)(hfunc, numbytes)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUfunction, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetSharedSize)(__pyx_v_hfunc, __pyx_v_numbytes);

    /* "cuda/_cuda/ccuda.pyx":6129
 *             raise RuntimeError('Function "cuFuncSetSharedSize" not found')
 *     err = (<CUresult (*)(CUfunction, unsigned int) nogil> __cuFuncSetSharedSize)(hfunc, numbytes)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuParamSetSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6123
 * 
 * cdef CUresult _cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuFuncSetSharedSize             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuFuncSetSharedSize == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6122
 *     return err
 * 
 * cdef CUresult _cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuFuncSetSharedSize
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuFuncSetSharedSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6131
 *     return err
 * 
 * cdef CUresult _cuParamSetSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuParamSetSize
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuParamSetSize(CUfunction __pyx_v_hfunc, unsigned int __pyx_v_numbytes) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuParamSetSize", 1);
  __Pyx_TraceCall("_cuParamSetSize", __pyx_f[0], 6131, 1, __PYX_ERR(0, 6131, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6132
 * 
 * cdef CUresult _cuParamSetSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuParamSetSize             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuParamSetSize == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6133
 * cdef CUresult _cuParamSetSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuParamSetSize
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuParamSetSize == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6133, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6134
 *     global __cuParamSetSize
 *     cuPythonInit()
 *     if __cuParamSetSize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetSize" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuParamSetSize == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6135
 *     cuPythonInit()
 *     if __cuParamSetSize == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuParamSetSize" not found')
 *     err = (<CUresult (*)(CUfunction, unsigned int) nogil> __cuParamSetSize)(hfunc, numbytes)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6136
 *     if __cuParamSetSize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetSize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, unsigned int) nogil> __cuParamSetSize)(hfunc, numbytes)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__245, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6136, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6136, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6135
 *     cuPythonInit()
 *     if __cuParamSetSize == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuParamSetSize" not found')
 *     err = (<CUresult (*)(CUfunction, unsigned int) nogil> __cuParamSetSize)(hfunc, numbytes)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6134
 *     global __cuParamSetSize
 *     cuPythonInit()
 *     if __cuParamSetSize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetSize" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6137
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetSize" not found')
 *     err = (<CUresult (*)(CUfunction, unsigned int) nogil> __cuParamSetSize)(hfunc, numbytes)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUfunction, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuParamSetSize)(__pyx_v_hfunc, __pyx_v_numbytes);

    /* "cuda/_cuda/ccuda.pyx":6138
 *             raise RuntimeError('Function "cuParamSetSize" not found')
 *     err = (<CUresult (*)(CUfunction, unsigned int) nogil> __cuParamSetSize)(hfunc, numbytes)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuParamSeti(CUfunction hfunc, int offset, unsigned int value) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6132
 * 
 * cdef CUresult _cuParamSetSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuParamSetSize             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuParamSetSize == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6131
 *     return err
 * 
 * cdef CUresult _cuParamSetSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuParamSetSize
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuParamSetSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6140
 *     return err
 * 
 * cdef CUresult _cuParamSeti(CUfunction hfunc, int offset, unsigned int value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuParamSeti
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuParamSeti(CUfunction __pyx_v_hfunc, int __pyx_v_offset, unsigned int __pyx_v_value) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuParamSeti", 1);
  __Pyx_TraceCall("_cuParamSeti", __pyx_f[0], 6140, 1, __PYX_ERR(0, 6140, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6141
 * 
 * cdef CUresult _cuParamSeti(CUfunction hfunc, int offset, unsigned int value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuParamSeti             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuParamSeti == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6142
 * cdef CUresult _cuParamSeti(CUfunction hfunc, int offset, unsigned int value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuParamSeti
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuParamSeti == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6142, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6143
 *     global __cuParamSeti
 *     cuPythonInit()
 *     if __cuParamSeti == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuParamSeti" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuParamSeti == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6144
 *     cuPythonInit()
 *     if __cuParamSeti == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuParamSeti" not found')
 *     err = (<CUresult (*)(CUfunction, int, unsigned int) nogil> __cuParamSeti)(hfunc, offset, value)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6145
 *     if __cuParamSeti == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuParamSeti" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, int, unsigned int) nogil> __cuParamSeti)(hfunc, offset, value)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__246, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6145, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6145, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6144
 *     cuPythonInit()
 *     if __cuParamSeti == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuParamSeti" not found')
 *     err = (<CUresult (*)(CUfunction, int, unsigned int) nogil> __cuParamSeti)(hfunc, offset, value)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6143
 *     global __cuParamSeti
 *     cuPythonInit()
 *     if __cuParamSeti == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuParamSeti" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6146
 *         with gil:
 *             raise RuntimeError('Function "cuParamSeti" not found')
 *     err = (<CUresult (*)(CUfunction, int, unsigned int) nogil> __cuParamSeti)(hfunc, offset, value)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUfunction, int, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuParamSeti)(__pyx_v_hfunc, __pyx_v_offset, __pyx_v_value);

    /* "cuda/_cuda/ccuda.pyx":6147
 *             raise RuntimeError('Function "cuParamSeti" not found')
 *     err = (<CUresult (*)(CUfunction, int, unsigned int) nogil> __cuParamSeti)(hfunc, offset, value)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuParamSetf(CUfunction hfunc, int offset, float value) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6141
 * 
 * cdef CUresult _cuParamSeti(CUfunction hfunc, int offset, unsigned int value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuParamSeti             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuParamSeti == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6140
 *     return err
 * 
 * cdef CUresult _cuParamSeti(CUfunction hfunc, int offset, unsigned int value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuParamSeti
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuParamSeti", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6149
 *     return err
 * 
 * cdef CUresult _cuParamSetf(CUfunction hfunc, int offset, float value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuParamSetf
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuParamSetf(CUfunction __pyx_v_hfunc, int __pyx_v_offset, float __pyx_v_value) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuParamSetf", 1);
  __Pyx_TraceCall("_cuParamSetf", __pyx_f[0], 6149, 1, __PYX_ERR(0, 6149, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6150
 * 
 * cdef CUresult _cuParamSetf(CUfunction hfunc, int offset, float value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuParamSetf             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuParamSetf == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6151
 * cdef CUresult _cuParamSetf(CUfunction hfunc, int offset, float value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuParamSetf
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuParamSetf == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6151, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6152
 *     global __cuParamSetf
 *     cuPythonInit()
 *     if __cuParamSetf == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetf" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuParamSetf == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6153
 *     cuPythonInit()
 *     if __cuParamSetf == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuParamSetf" not found')
 *     err = (<CUresult (*)(CUfunction, int, float) nogil> __cuParamSetf)(hfunc, offset, value)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6154
 *     if __cuParamSetf == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetf" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, int, float) nogil> __cuParamSetf)(hfunc, offset, value)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__247, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6154, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6154, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6153
 *     cuPythonInit()
 *     if __cuParamSetf == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuParamSetf" not found')
 *     err = (<CUresult (*)(CUfunction, int, float) nogil> __cuParamSetf)(hfunc, offset, value)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6152
 *     global __cuParamSetf
 *     cuPythonInit()
 *     if __cuParamSetf == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetf" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6155
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetf" not found')
 *     err = (<CUresult (*)(CUfunction, int, float) nogil> __cuParamSetf)(hfunc, offset, value)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUfunction, int, float))__pyx_v_4cuda_5_cuda_5ccuda___cuParamSetf)(__pyx_v_hfunc, __pyx_v_offset, __pyx_v_value);

    /* "cuda/_cuda/ccuda.pyx":6156
 *             raise RuntimeError('Function "cuParamSetf" not found')
 *     err = (<CUresult (*)(CUfunction, int, float) nogil> __cuParamSetf)(hfunc, offset, value)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6150
 * 
 * cdef CUresult _cuParamSetf(CUfunction hfunc, int offset, float value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuParamSetf             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuParamSetf == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6149
 *     return err
 * 
 * cdef CUresult _cuParamSetf(CUfunction hfunc, int offset, float value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuParamSetf
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuParamSetf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6158
 *     return err
 * 
 * cdef CUresult _cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuParamSetv
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuParamSetv(CUfunction __pyx_v_hfunc, int __pyx_v_offset, void *__pyx_v_ptr, unsigned int __pyx_v_numbytes) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuParamSetv", 1);
  __Pyx_TraceCall("_cuParamSetv", __pyx_f[0], 6158, 1, __PYX_ERR(0, 6158, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6159
 * 
 * cdef CUresult _cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuParamSetv             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuParamSetv == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6160
 * cdef CUresult _cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuParamSetv
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuParamSetv == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6160, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6161
 *     global __cuParamSetv
 *     cuPythonInit()
 *     if __cuParamSetv == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetv" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuParamSetv == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6162
 *     cuPythonInit()
 *     if __cuParamSetv == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuParamSetv" not found')
 *     err = (<CUresult (*)(CUfunction, int, void*, unsigned int) nogil> __cuParamSetv)(hfunc, offset, ptr, numbytes)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6163
 *     if __cuParamSetv == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetv" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, int, void*, unsigned int) nogil> __cuParamSetv)(hfunc, offset, ptr, numbytes)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__248, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6163, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6163, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6162
 *     cuPythonInit()
 *     if __cuParamSetv == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuParamSetv" not found')
 *     err = (<CUresult (*)(CUfunction, int, void*, unsigned int) nogil> __cuParamSetv)(hfunc, offset, ptr, numbytes)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6161
 *     global __cuParamSetv
 *     cuPythonInit()
 *     if __cuParamSetv == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetv" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6164
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetv" not found')
 *     err = (<CUresult (*)(CUfunction, int, void*, unsigned int) nogil> __cuParamSetv)(hfunc, offset, ptr, numbytes)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUfunction, int, void *, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuParamSetv)(__pyx_v_hfunc, __pyx_v_offset, __pyx_v_ptr, __pyx_v_numbytes);

    /* "cuda/_cuda/ccuda.pyx":6165
 *             raise RuntimeError('Function "cuParamSetv" not found')
 *     err = (<CUresult (*)(CUfunction, int, void*, unsigned int) nogil> __cuParamSetv)(hfunc, offset, ptr, numbytes)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuLaunch(CUfunction f) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6159
 * 
 * cdef CUresult _cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuParamSetv             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuParamSetv == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6158
 *     return err
 * 
 * cdef CUresult _cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuParamSetv
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuParamSetv", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6167
 *     return err
 * 
 * cdef CUresult _cuLaunch(CUfunction f) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLaunch
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLaunch(CUfunction __pyx_v_f) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuLaunch", 1);
  __Pyx_TraceCall("_cuLaunch", __pyx_f[0], 6167, 1, __PYX_ERR(0, 6167, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6168
 * 
 * cdef CUresult _cuLaunch(CUfunction f) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLaunch             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLaunch == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6169
 * cdef CUresult _cuLaunch(CUfunction f) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLaunch
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuLaunch == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6169, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6170
 *     global __cuLaunch
 *     cuPythonInit()
 *     if __cuLaunch == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunch" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuLaunch == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6171
 *     cuPythonInit()
 *     if __cuLaunch == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLaunch" not found')
 *     err = (<CUresult (*)(CUfunction) nogil> __cuLaunch)(f)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6172
 *     if __cuLaunch == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLaunch" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction) nogil> __cuLaunch)(f)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__249, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6172, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6172, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6171
 *     cuPythonInit()
 *     if __cuLaunch == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLaunch" not found')
 *     err = (<CUresult (*)(CUfunction) nogil> __cuLaunch)(f)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6170
 *     global __cuLaunch
 *     cuPythonInit()
 *     if __cuLaunch == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunch" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6173
 *         with gil:
 *             raise RuntimeError('Function "cuLaunch" not found')
 *     err = (<CUresult (*)(CUfunction) nogil> __cuLaunch)(f)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUfunction))__pyx_v_4cuda_5_cuda_5ccuda___cuLaunch)(__pyx_v_f);

    /* "cuda/_cuda/ccuda.pyx":6174
 *             raise RuntimeError('Function "cuLaunch" not found')
 *     err = (<CUresult (*)(CUfunction) nogil> __cuLaunch)(f)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuLaunchGrid(CUfunction f, int grid_width, int grid_height) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6168
 * 
 * cdef CUresult _cuLaunch(CUfunction f) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLaunch             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLaunch == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6167
 *     return err
 * 
 * cdef CUresult _cuLaunch(CUfunction f) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLaunch
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuLaunch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6176
 *     return err
 * 
 * cdef CUresult _cuLaunchGrid(CUfunction f, int grid_width, int grid_height) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLaunchGrid
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLaunchGrid(CUfunction __pyx_v_f, int __pyx_v_grid_width, int __pyx_v_grid_height) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuLaunchGrid", 1);
  __Pyx_TraceCall("_cuLaunchGrid", __pyx_f[0], 6176, 1, __PYX_ERR(0, 6176, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6177
 * 
 * cdef CUresult _cuLaunchGrid(CUfunction f, int grid_width, int grid_height) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLaunchGrid             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLaunchGrid == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6178
 * cdef CUresult _cuLaunchGrid(CUfunction f, int grid_width, int grid_height) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLaunchGrid
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuLaunchGrid == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6178, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6179
 *     global __cuLaunchGrid
 *     cuPythonInit()
 *     if __cuLaunchGrid == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchGrid" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchGrid == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6180
 *     cuPythonInit()
 *     if __cuLaunchGrid == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLaunchGrid" not found')
 *     err = (<CUresult (*)(CUfunction, int, int) nogil> __cuLaunchGrid)(f, grid_width, grid_height)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6181
 *     if __cuLaunchGrid == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchGrid" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, int, int) nogil> __cuLaunchGrid)(f, grid_width, grid_height)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__250, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6181, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6181, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6180
 *     cuPythonInit()
 *     if __cuLaunchGrid == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLaunchGrid" not found')
 *     err = (<CUresult (*)(CUfunction, int, int) nogil> __cuLaunchGrid)(f, grid_width, grid_height)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6179
 *     global __cuLaunchGrid
 *     cuPythonInit()
 *     if __cuLaunchGrid == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchGrid" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6182
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchGrid" not found')
 *     err = (<CUresult (*)(CUfunction, int, int) nogil> __cuLaunchGrid)(f, grid_width, grid_height)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUfunction, int, int))__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchGrid)(__pyx_v_f, __pyx_v_grid_width, __pyx_v_grid_height);

    /* "cuda/_cuda/ccuda.pyx":6183
 *             raise RuntimeError('Function "cuLaunchGrid" not found')
 *     err = (<CUresult (*)(CUfunction, int, int) nogil> __cuLaunchGrid)(f, grid_width, grid_height)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6177
 * 
 * cdef CUresult _cuLaunchGrid(CUfunction f, int grid_width, int grid_height) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLaunchGrid             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLaunchGrid == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6176
 *     return err
 * 
 * cdef CUresult _cuLaunchGrid(CUfunction f, int grid_width, int grid_height) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLaunchGrid
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuLaunchGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6185
 *     return err
 * 
 * cdef CUresult _cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLaunchGridAsync
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuLaunchGridAsync(CUfunction __pyx_v_f, int __pyx_v_grid_width, int __pyx_v_grid_height, CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuLaunchGridAsync", 1);
  __Pyx_TraceCall("_cuLaunchGridAsync", __pyx_f[0], 6185, 1, __PYX_ERR(0, 6185, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6186
 * 
 * cdef CUresult _cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLaunchGridAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLaunchGridAsync == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6187
 * cdef CUresult _cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLaunchGridAsync
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuLaunchGridAsync == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6187, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6188
 *     global __cuLaunchGridAsync
 *     cuPythonInit()
 *     if __cuLaunchGridAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchGridAsync" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchGridAsync == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6189
 *     cuPythonInit()
 *     if __cuLaunchGridAsync == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLaunchGridAsync" not found')
 *     err = (<CUresult (*)(CUfunction, int, int, CUstream) nogil> __cuLaunchGridAsync)(f, grid_width, grid_height, hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6190
 *     if __cuLaunchGridAsync == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchGridAsync" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, int, int, CUstream) nogil> __cuLaunchGridAsync)(f, grid_width, grid_height, hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__251, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6190, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6190, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6189
 *     cuPythonInit()
 *     if __cuLaunchGridAsync == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuLaunchGridAsync" not found')
 *     err = (<CUresult (*)(CUfunction, int, int, CUstream) nogil> __cuLaunchGridAsync)(f, grid_width, grid_height, hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6188
 *     global __cuLaunchGridAsync
 *     cuPythonInit()
 *     if __cuLaunchGridAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchGridAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6191
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchGridAsync" not found')
 *     err = (<CUresult (*)(CUfunction, int, int, CUstream) nogil> __cuLaunchGridAsync)(f, grid_width, grid_height, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUfunction, int, int, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuLaunchGridAsync)(__pyx_v_f, __pyx_v_grid_width, __pyx_v_grid_height, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":6192
 *             raise RuntimeError('Function "cuLaunchGridAsync" not found')
 *     err = (<CUresult (*)(CUfunction, int, int, CUstream) nogil> __cuLaunchGridAsync)(f, grid_width, grid_height, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6186
 * 
 * cdef CUresult _cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuLaunchGridAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLaunchGridAsync == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6185
 *     return err
 * 
 * cdef CUresult _cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuLaunchGridAsync
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuLaunchGridAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6194
 *     return err
 * 
 * cdef CUresult _cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuParamSetTexRef
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuParamSetTexRef(CUfunction __pyx_v_hfunc, int __pyx_v_texunit, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuParamSetTexRef", 1);
  __Pyx_TraceCall("_cuParamSetTexRef", __pyx_f[0], 6194, 1, __PYX_ERR(0, 6194, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6195
 * 
 * cdef CUresult _cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuParamSetTexRef             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuParamSetTexRef == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6196
 * cdef CUresult _cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuParamSetTexRef
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuParamSetTexRef == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6196, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6197
 *     global __cuParamSetTexRef
 *     cuPythonInit()
 *     if __cuParamSetTexRef == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetTexRef" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuParamSetTexRef == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6198
 *     cuPythonInit()
 *     if __cuParamSetTexRef == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuParamSetTexRef" not found')
 *     err = (<CUresult (*)(CUfunction, int, CUtexref) nogil> __cuParamSetTexRef)(hfunc, texunit, hTexRef)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6199
 *     if __cuParamSetTexRef == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetTexRef" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, int, CUtexref) nogil> __cuParamSetTexRef)(hfunc, texunit, hTexRef)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__252, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6199, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6199, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6198
 *     cuPythonInit()
 *     if __cuParamSetTexRef == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuParamSetTexRef" not found')
 *     err = (<CUresult (*)(CUfunction, int, CUtexref) nogil> __cuParamSetTexRef)(hfunc, texunit, hTexRef)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6197
 *     global __cuParamSetTexRef
 *     cuPythonInit()
 *     if __cuParamSetTexRef == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetTexRef" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6200
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetTexRef" not found')
 *     err = (<CUresult (*)(CUfunction, int, CUtexref) nogil> __cuParamSetTexRef)(hfunc, texunit, hTexRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUfunction, int, CUtexref))__pyx_v_4cuda_5_cuda_5ccuda___cuParamSetTexRef)(__pyx_v_hfunc, __pyx_v_texunit, __pyx_v_hTexRef);

    /* "cuda/_cuda/ccuda.pyx":6201
 *             raise RuntimeError('Function "cuParamSetTexRef" not found')
 *     err = (<CUresult (*)(CUfunction, int, CUtexref) nogil> __cuParamSetTexRef)(hfunc, texunit, hTexRef)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphCreate(CUgraph* phGraph, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6195
 * 
 * cdef CUresult _cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuParamSetTexRef             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuParamSetTexRef == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6194
 *     return err
 * 
 * cdef CUresult _cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuParamSetTexRef
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuParamSetTexRef", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6203
 *     return err
 * 
 * cdef CUresult _cuGraphCreate(CUgraph* phGraph, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphCreate
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphCreate(CUgraph *__pyx_v_phGraph, unsigned int __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphCreate", 1);
  __Pyx_TraceCall("_cuGraphCreate", __pyx_f[0], 6203, 1, __PYX_ERR(0, 6203, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6204
 * 
 * cdef CUresult _cuGraphCreate(CUgraph* phGraph, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphCreate == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6205
 * cdef CUresult _cuGraphCreate(CUgraph* phGraph, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphCreate
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphCreate == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6205, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6206
 *     global __cuGraphCreate
 *     cuPythonInit()
 *     if __cuGraphCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphCreate" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphCreate == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6207
 *     cuPythonInit()
 *     if __cuGraphCreate == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphCreate" not found')
 *     err = (<CUresult (*)(CUgraph*, unsigned int) nogil> __cuGraphCreate)(phGraph, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6208
 *     if __cuGraphCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph*, unsigned int) nogil> __cuGraphCreate)(phGraph, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__253, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6208, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6208, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6207
 *     cuPythonInit()
 *     if __cuGraphCreate == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphCreate" not found')
 *     err = (<CUresult (*)(CUgraph*, unsigned int) nogil> __cuGraphCreate)(phGraph, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6206
 *     global __cuGraphCreate
 *     cuPythonInit()
 *     if __cuGraphCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6209
 *         with gil:
 *             raise RuntimeError('Function "cuGraphCreate" not found')
 *     err = (<CUresult (*)(CUgraph*, unsigned int) nogil> __cuGraphCreate)(phGraph, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraph *, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphCreate)(__pyx_v_phGraph, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":6210
 *             raise RuntimeError('Function "cuGraphCreate" not found')
 *     err = (<CUresult (*)(CUgraph*, unsigned int) nogil> __cuGraphCreate)(phGraph, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * 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:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6204
 * 
 * cdef CUresult _cuGraphCreate(CUgraph* phGraph, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphCreate == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6203
 *     return err
 * 
 * cdef CUresult _cuGraphCreate(CUgraph* phGraph, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphCreate
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6212
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddKernelNode_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddKernelNode_v2(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_KERNEL_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphAddKernelNode_v2", 1);
  __Pyx_TraceCall("_cuGraphAddKernelNode_v2", __pyx_f[0], 6212, 1, __PYX_ERR(0, 6212, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6213
 * 
 * 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:
 *     global __cuGraphAddKernelNode_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddKernelNode_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6214
 * 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:
 *     global __cuGraphAddKernelNode_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphAddKernelNode_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6214, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6215
 *     global __cuGraphAddKernelNode_v2
 *     cuPythonInit()
 *     if __cuGraphAddKernelNode_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddKernelNode_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddKernelNode_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6216
 *     cuPythonInit()
 *     if __cuGraphAddKernelNode_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddKernelNode_v2" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphAddKernelNode_v2)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6217
 *     if __cuGraphAddKernelNode_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddKernelNode_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphAddKernelNode_v2)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__254, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6217, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6217, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6216
 *     cuPythonInit()
 *     if __cuGraphAddKernelNode_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddKernelNode_v2" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphAddKernelNode_v2)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6215
 *     global __cuGraphAddKernelNode_v2
 *     cuPythonInit()
 *     if __cuGraphAddKernelNode_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddKernelNode_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6218
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddKernelNode_v2" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphAddKernelNode_v2)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_KERNEL_NODE_PARAMS const *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddKernelNode_v2)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":6219
 *             raise RuntimeError('Function "cuGraphAddKernelNode_v2" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphAddKernelNode_v2)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphKernelNodeGetParams_v2(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6213
 * 
 * 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:
 *     global __cuGraphAddKernelNode_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddKernelNode_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6212
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddKernelNode_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphAddKernelNode_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6221
 *     return err
 * 
 * cdef CUresult _cuGraphKernelNodeGetParams_v2(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphKernelNodeGetParams_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeGetParams_v2(CUgraphNode __pyx_v_hNode, CUDA_KERNEL_NODE_PARAMS *__pyx_v_nodeParams) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphKernelNodeGetParams_v2", 1);
  __Pyx_TraceCall("_cuGraphKernelNodeGetParams_v2", __pyx_f[0], 6221, 1, __PYX_ERR(0, 6221, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6222
 * 
 * cdef CUresult _cuGraphKernelNodeGetParams_v2(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphKernelNodeGetParams_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphKernelNodeGetParams_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6223
 * cdef CUresult _cuGraphKernelNodeGetParams_v2(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphKernelNodeGetParams_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphKernelNodeGetParams_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6223, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6224
 *     global __cuGraphKernelNodeGetParams_v2
 *     cuPythonInit()
 *     if __cuGraphKernelNodeGetParams_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeGetParams_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeGetParams_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6225
 *     cuPythonInit()
 *     if __cuGraphKernelNodeGetParams_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphKernelNodeGetParams_v2" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphKernelNodeGetParams_v2)(hNode, nodeParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6226
 *     if __cuGraphKernelNodeGetParams_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeGetParams_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphKernelNodeGetParams_v2)(hNode, nodeParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__255, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6226, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6226, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6225
 *     cuPythonInit()
 *     if __cuGraphKernelNodeGetParams_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphKernelNodeGetParams_v2" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphKernelNodeGetParams_v2)(hNode, nodeParams)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6224
 *     global __cuGraphKernelNodeGetParams_v2
 *     cuPythonInit()
 *     if __cuGraphKernelNodeGetParams_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeGetParams_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6227
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeGetParams_v2" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphKernelNodeGetParams_v2)(hNode, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUDA_KERNEL_NODE_PARAMS *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeGetParams_v2)(__pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":6228
 *             raise RuntimeError('Function "cuGraphKernelNodeGetParams_v2" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphKernelNodeGetParams_v2)(hNode, nodeParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphKernelNodeSetParams_v2(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6222
 * 
 * cdef CUresult _cuGraphKernelNodeGetParams_v2(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphKernelNodeGetParams_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphKernelNodeGetParams_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6221
 *     return err
 * 
 * cdef CUresult _cuGraphKernelNodeGetParams_v2(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphKernelNodeGetParams_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphKernelNodeGetParams_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6230
 *     return err
 * 
 * cdef CUresult _cuGraphKernelNodeSetParams_v2(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphKernelNodeSetParams_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeSetParams_v2(CUgraphNode __pyx_v_hNode, CUDA_KERNEL_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphKernelNodeSetParams_v2", 1);
  __Pyx_TraceCall("_cuGraphKernelNodeSetParams_v2", __pyx_f[0], 6230, 1, __PYX_ERR(0, 6230, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6231
 * 
 * cdef CUresult _cuGraphKernelNodeSetParams_v2(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphKernelNodeSetParams_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphKernelNodeSetParams_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6232
 * cdef CUresult _cuGraphKernelNodeSetParams_v2(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphKernelNodeSetParams_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphKernelNodeSetParams_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6232, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6233
 *     global __cuGraphKernelNodeSetParams_v2
 *     cuPythonInit()
 *     if __cuGraphKernelNodeSetParams_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeSetParams_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeSetParams_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6234
 *     cuPythonInit()
 *     if __cuGraphKernelNodeSetParams_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphKernelNodeSetParams_v2" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphKernelNodeSetParams_v2)(hNode, nodeParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6235
 *     if __cuGraphKernelNodeSetParams_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeSetParams_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphKernelNodeSetParams_v2)(hNode, nodeParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__256, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6235, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6235, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6234
 *     cuPythonInit()
 *     if __cuGraphKernelNodeSetParams_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphKernelNodeSetParams_v2" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphKernelNodeSetParams_v2)(hNode, nodeParams)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6233
 *     global __cuGraphKernelNodeSetParams_v2
 *     cuPythonInit()
 *     if __cuGraphKernelNodeSetParams_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeSetParams_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6236
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeSetParams_v2" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphKernelNodeSetParams_v2)(hNode, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUDA_KERNEL_NODE_PARAMS const *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeSetParams_v2)(__pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":6237
 *             raise RuntimeError('Function "cuGraphKernelNodeSetParams_v2" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphKernelNodeSetParams_v2)(hNode, nodeParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * 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:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6231
 * 
 * cdef CUresult _cuGraphKernelNodeSetParams_v2(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphKernelNodeSetParams_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphKernelNodeSetParams_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6230
 *     return err
 * 
 * cdef CUresult _cuGraphKernelNodeSetParams_v2(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphKernelNodeSetParams_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphKernelNodeSetParams_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6239
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddMemcpyNode
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemcpyNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_MEMCPY3D const *__pyx_v_copyParams, CUcontext __pyx_v_ctx) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphAddMemcpyNode", 1);
  __Pyx_TraceCall("_cuGraphAddMemcpyNode", __pyx_f[0], 6239, 1, __PYX_ERR(0, 6239, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6240
 * 
 * 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:
 *     global __cuGraphAddMemcpyNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddMemcpyNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6241
 * 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:
 *     global __cuGraphAddMemcpyNode
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphAddMemcpyNode == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6241, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6242
 *     global __cuGraphAddMemcpyNode
 *     cuPythonInit()
 *     if __cuGraphAddMemcpyNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemcpyNode" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemcpyNode == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6243
 *     cuPythonInit()
 *     if __cuGraphAddMemcpyNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddMemcpyNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_MEMCPY3D*, CUcontext) nogil> __cuGraphAddMemcpyNode)(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6244
 *     if __cuGraphAddMemcpyNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemcpyNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_MEMCPY3D*, CUcontext) nogil> __cuGraphAddMemcpyNode)(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__257, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6244, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6244, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6243
 *     cuPythonInit()
 *     if __cuGraphAddMemcpyNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddMemcpyNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_MEMCPY3D*, CUcontext) nogil> __cuGraphAddMemcpyNode)(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6242
 *     global __cuGraphAddMemcpyNode
 *     cuPythonInit()
 *     if __cuGraphAddMemcpyNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemcpyNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6245
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemcpyNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_MEMCPY3D*, CUcontext) nogil> __cuGraphAddMemcpyNode)(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEMCPY3D const *, CUcontext))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemcpyNode)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_copyParams, __pyx_v_ctx);

    /* "cuda/_cuda/ccuda.pyx":6246
 *             raise RuntimeError('Function "cuGraphAddMemcpyNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_MEMCPY3D*, CUcontext) nogil> __cuGraphAddMemcpyNode)(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6240
 * 
 * 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:
 *     global __cuGraphAddMemcpyNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddMemcpyNode == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6239
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddMemcpyNode
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphAddMemcpyNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6248
 *     return err
 * 
 * cdef CUresult _cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphMemcpyNodeGetParams
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemcpyNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_MEMCPY3D *__pyx_v_nodeParams) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphMemcpyNodeGetParams", 1);
  __Pyx_TraceCall("_cuGraphMemcpyNodeGetParams", __pyx_f[0], 6248, 1, __PYX_ERR(0, 6248, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6249
 * 
 * cdef CUresult _cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphMemcpyNodeGetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphMemcpyNodeGetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6250
 * cdef CUresult _cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphMemcpyNodeGetParams
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphMemcpyNodeGetParams == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6250, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6251
 *     global __cuGraphMemcpyNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphMemcpyNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemcpyNodeGetParams" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemcpyNodeGetParams == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6252
 *     cuPythonInit()
 *     if __cuGraphMemcpyNodeGetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphMemcpyNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_MEMCPY3D*) nogil> __cuGraphMemcpyNodeGetParams)(hNode, nodeParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6253
 *     if __cuGraphMemcpyNodeGetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemcpyNodeGetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUDA_MEMCPY3D*) nogil> __cuGraphMemcpyNodeGetParams)(hNode, nodeParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__258, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6253, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6253, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6252
 *     cuPythonInit()
 *     if __cuGraphMemcpyNodeGetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphMemcpyNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_MEMCPY3D*) nogil> __cuGraphMemcpyNodeGetParams)(hNode, nodeParams)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6251
 *     global __cuGraphMemcpyNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphMemcpyNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemcpyNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6254
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemcpyNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_MEMCPY3D*) nogil> __cuGraphMemcpyNodeGetParams)(hNode, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUDA_MEMCPY3D *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemcpyNodeGetParams)(__pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":6255
 *             raise RuntimeError('Function "cuGraphMemcpyNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_MEMCPY3D*) nogil> __cuGraphMemcpyNodeGetParams)(hNode, nodeParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6249
 * 
 * cdef CUresult _cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphMemcpyNodeGetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphMemcpyNodeGetParams == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6248
 *     return err
 * 
 * cdef CUresult _cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphMemcpyNodeGetParams
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphMemcpyNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6257
 *     return err
 * 
 * cdef CUresult _cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphMemcpyNodeSetParams
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemcpyNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_MEMCPY3D const *__pyx_v_nodeParams) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphMemcpyNodeSetParams", 1);
  __Pyx_TraceCall("_cuGraphMemcpyNodeSetParams", __pyx_f[0], 6257, 1, __PYX_ERR(0, 6257, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6258
 * 
 * cdef CUresult _cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphMemcpyNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphMemcpyNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6259
 * cdef CUresult _cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphMemcpyNodeSetParams
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphMemcpyNodeSetParams == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6259, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6260
 *     global __cuGraphMemcpyNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphMemcpyNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemcpyNodeSetParams" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemcpyNodeSetParams == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6261
 *     cuPythonInit()
 *     if __cuGraphMemcpyNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphMemcpyNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_MEMCPY3D*) nogil> __cuGraphMemcpyNodeSetParams)(hNode, nodeParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6262
 *     if __cuGraphMemcpyNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemcpyNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_MEMCPY3D*) nogil> __cuGraphMemcpyNodeSetParams)(hNode, nodeParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__259, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6262, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6262, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6261
 *     cuPythonInit()
 *     if __cuGraphMemcpyNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphMemcpyNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_MEMCPY3D*) nogil> __cuGraphMemcpyNodeSetParams)(hNode, nodeParams)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6260
 *     global __cuGraphMemcpyNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphMemcpyNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemcpyNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6263
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemcpyNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_MEMCPY3D*) nogil> __cuGraphMemcpyNodeSetParams)(hNode, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUDA_MEMCPY3D const *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemcpyNodeSetParams)(__pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":6264
 *             raise RuntimeError('Function "cuGraphMemcpyNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_MEMCPY3D*) nogil> __cuGraphMemcpyNodeSetParams)(hNode, nodeParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * 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:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6258
 * 
 * cdef CUresult _cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphMemcpyNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphMemcpyNodeSetParams == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6257
 *     return err
 * 
 * cdef CUresult _cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphMemcpyNodeSetParams
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphMemcpyNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6266
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddMemsetNode
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemsetNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_MEMSET_NODE_PARAMS const *__pyx_v_memsetParams, CUcontext __pyx_v_ctx) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphAddMemsetNode", 1);
  __Pyx_TraceCall("_cuGraphAddMemsetNode", __pyx_f[0], 6266, 1, __PYX_ERR(0, 6266, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6267
 * 
 * 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:
 *     global __cuGraphAddMemsetNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddMemsetNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6268
 * 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:
 *     global __cuGraphAddMemsetNode
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphAddMemsetNode == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6268, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6269
 *     global __cuGraphAddMemsetNode
 *     cuPythonInit()
 *     if __cuGraphAddMemsetNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemsetNode" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemsetNode == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6270
 *     cuPythonInit()
 *     if __cuGraphAddMemsetNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddMemsetNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_MEMSET_NODE_PARAMS*, CUcontext) nogil> __cuGraphAddMemsetNode)(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6271
 *     if __cuGraphAddMemsetNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemsetNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_MEMSET_NODE_PARAMS*, CUcontext) nogil> __cuGraphAddMemsetNode)(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__260, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6271, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6271, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6270
 *     cuPythonInit()
 *     if __cuGraphAddMemsetNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddMemsetNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_MEMSET_NODE_PARAMS*, CUcontext) nogil> __cuGraphAddMemsetNode)(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6269
 *     global __cuGraphAddMemsetNode
 *     cuPythonInit()
 *     if __cuGraphAddMemsetNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemsetNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6272
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemsetNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_MEMSET_NODE_PARAMS*, CUcontext) nogil> __cuGraphAddMemsetNode)(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEMSET_NODE_PARAMS const *, CUcontext))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemsetNode)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_memsetParams, __pyx_v_ctx);

    /* "cuda/_cuda/ccuda.pyx":6273
 *             raise RuntimeError('Function "cuGraphAddMemsetNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_MEMSET_NODE_PARAMS*, CUcontext) nogil> __cuGraphAddMemsetNode)(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6267
 * 
 * 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:
 *     global __cuGraphAddMemsetNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddMemsetNode == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6266
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddMemsetNode
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphAddMemsetNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6275
 *     return err
 * 
 * cdef CUresult _cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphMemsetNodeGetParams
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemsetNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_MEMSET_NODE_PARAMS *__pyx_v_nodeParams) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphMemsetNodeGetParams", 1);
  __Pyx_TraceCall("_cuGraphMemsetNodeGetParams", __pyx_f[0], 6275, 1, __PYX_ERR(0, 6275, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6276
 * 
 * cdef CUresult _cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphMemsetNodeGetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphMemsetNodeGetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6277
 * cdef CUresult _cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphMemsetNodeGetParams
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphMemsetNodeGetParams == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6277, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6278
 *     global __cuGraphMemsetNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphMemsetNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemsetNodeGetParams" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemsetNodeGetParams == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6279
 *     cuPythonInit()
 *     if __cuGraphMemsetNodeGetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphMemsetNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_MEMSET_NODE_PARAMS*) nogil> __cuGraphMemsetNodeGetParams)(hNode, nodeParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6280
 *     if __cuGraphMemsetNodeGetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemsetNodeGetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUDA_MEMSET_NODE_PARAMS*) nogil> __cuGraphMemsetNodeGetParams)(hNode, nodeParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__261, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6280, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6280, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6279
 *     cuPythonInit()
 *     if __cuGraphMemsetNodeGetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphMemsetNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_MEMSET_NODE_PARAMS*) nogil> __cuGraphMemsetNodeGetParams)(hNode, nodeParams)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6278
 *     global __cuGraphMemsetNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphMemsetNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemsetNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6281
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemsetNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_MEMSET_NODE_PARAMS*) nogil> __cuGraphMemsetNodeGetParams)(hNode, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUDA_MEMSET_NODE_PARAMS *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemsetNodeGetParams)(__pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":6282
 *             raise RuntimeError('Function "cuGraphMemsetNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_MEMSET_NODE_PARAMS*) nogil> __cuGraphMemsetNodeGetParams)(hNode, nodeParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6276
 * 
 * cdef CUresult _cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphMemsetNodeGetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphMemsetNodeGetParams == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6275
 *     return err
 * 
 * cdef CUresult _cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphMemsetNodeGetParams
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphMemsetNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6284
 *     return err
 * 
 * cdef CUresult _cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphMemsetNodeSetParams
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemsetNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_MEMSET_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphMemsetNodeSetParams", 1);
  __Pyx_TraceCall("_cuGraphMemsetNodeSetParams", __pyx_f[0], 6284, 1, __PYX_ERR(0, 6284, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6285
 * 
 * cdef CUresult _cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphMemsetNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphMemsetNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6286
 * cdef CUresult _cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphMemsetNodeSetParams
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphMemsetNodeSetParams == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6286, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6287
 *     global __cuGraphMemsetNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphMemsetNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemsetNodeSetParams" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemsetNodeSetParams == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6288
 *     cuPythonInit()
 *     if __cuGraphMemsetNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphMemsetNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_MEMSET_NODE_PARAMS*) nogil> __cuGraphMemsetNodeSetParams)(hNode, nodeParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6289
 *     if __cuGraphMemsetNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemsetNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_MEMSET_NODE_PARAMS*) nogil> __cuGraphMemsetNodeSetParams)(hNode, nodeParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__262, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6289, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6289, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6288
 *     cuPythonInit()
 *     if __cuGraphMemsetNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphMemsetNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_MEMSET_NODE_PARAMS*) nogil> __cuGraphMemsetNodeSetParams)(hNode, nodeParams)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6287
 *     global __cuGraphMemsetNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphMemsetNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemsetNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6290
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemsetNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_MEMSET_NODE_PARAMS*) nogil> __cuGraphMemsetNodeSetParams)(hNode, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUDA_MEMSET_NODE_PARAMS const *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemsetNodeSetParams)(__pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":6291
 *             raise RuntimeError('Function "cuGraphMemsetNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_MEMSET_NODE_PARAMS*) nogil> __cuGraphMemsetNodeSetParams)(hNode, nodeParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * 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:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6285
 * 
 * cdef CUresult _cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphMemsetNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphMemsetNodeSetParams == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6284
 *     return err
 * 
 * cdef CUresult _cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphMemsetNodeSetParams
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphMemsetNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6293
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddHostNode
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddHostNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_HOST_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphAddHostNode", 1);
  __Pyx_TraceCall("_cuGraphAddHostNode", __pyx_f[0], 6293, 1, __PYX_ERR(0, 6293, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6294
 * 
 * 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:
 *     global __cuGraphAddHostNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddHostNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6295
 * 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:
 *     global __cuGraphAddHostNode
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphAddHostNode == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6295, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6296
 *     global __cuGraphAddHostNode
 *     cuPythonInit()
 *     if __cuGraphAddHostNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddHostNode" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddHostNode == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6297
 *     cuPythonInit()
 *     if __cuGraphAddHostNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddHostNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_HOST_NODE_PARAMS*) nogil> __cuGraphAddHostNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6298
 *     if __cuGraphAddHostNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddHostNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_HOST_NODE_PARAMS*) nogil> __cuGraphAddHostNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__263, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6298, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6298, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6297
 *     cuPythonInit()
 *     if __cuGraphAddHostNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddHostNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_HOST_NODE_PARAMS*) nogil> __cuGraphAddHostNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6296
 *     global __cuGraphAddHostNode
 *     cuPythonInit()
 *     if __cuGraphAddHostNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddHostNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6299
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddHostNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_HOST_NODE_PARAMS*) nogil> __cuGraphAddHostNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_HOST_NODE_PARAMS const *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddHostNode)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":6300
 *             raise RuntimeError('Function "cuGraphAddHostNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_HOST_NODE_PARAMS*) nogil> __cuGraphAddHostNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6294
 * 
 * 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:
 *     global __cuGraphAddHostNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddHostNode == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6293
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddHostNode
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphAddHostNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6302
 *     return err
 * 
 * cdef CUresult _cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphHostNodeGetParams
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphHostNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_HOST_NODE_PARAMS *__pyx_v_nodeParams) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphHostNodeGetParams", 1);
  __Pyx_TraceCall("_cuGraphHostNodeGetParams", __pyx_f[0], 6302, 1, __PYX_ERR(0, 6302, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6303
 * 
 * cdef CUresult _cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphHostNodeGetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphHostNodeGetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6304
 * cdef CUresult _cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphHostNodeGetParams
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphHostNodeGetParams == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6304, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6305
 *     global __cuGraphHostNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphHostNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphHostNodeGetParams" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphHostNodeGetParams == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6306
 *     cuPythonInit()
 *     if __cuGraphHostNodeGetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphHostNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_HOST_NODE_PARAMS*) nogil> __cuGraphHostNodeGetParams)(hNode, nodeParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6307
 *     if __cuGraphHostNodeGetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphHostNodeGetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUDA_HOST_NODE_PARAMS*) nogil> __cuGraphHostNodeGetParams)(hNode, nodeParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__264, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6307, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6307, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6306
 *     cuPythonInit()
 *     if __cuGraphHostNodeGetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphHostNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_HOST_NODE_PARAMS*) nogil> __cuGraphHostNodeGetParams)(hNode, nodeParams)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6305
 *     global __cuGraphHostNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphHostNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphHostNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6308
 *         with gil:
 *             raise RuntimeError('Function "cuGraphHostNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_HOST_NODE_PARAMS*) nogil> __cuGraphHostNodeGetParams)(hNode, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUDA_HOST_NODE_PARAMS *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphHostNodeGetParams)(__pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":6309
 *             raise RuntimeError('Function "cuGraphHostNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_HOST_NODE_PARAMS*) nogil> __cuGraphHostNodeGetParams)(hNode, nodeParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6303
 * 
 * cdef CUresult _cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphHostNodeGetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphHostNodeGetParams == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6302
 *     return err
 * 
 * cdef CUresult _cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphHostNodeGetParams
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphHostNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6311
 *     return err
 * 
 * cdef CUresult _cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphHostNodeSetParams
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphHostNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_HOST_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphHostNodeSetParams", 1);
  __Pyx_TraceCall("_cuGraphHostNodeSetParams", __pyx_f[0], 6311, 1, __PYX_ERR(0, 6311, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6312
 * 
 * cdef CUresult _cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphHostNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphHostNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6313
 * cdef CUresult _cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphHostNodeSetParams
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphHostNodeSetParams == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6313, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6314
 *     global __cuGraphHostNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphHostNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphHostNodeSetParams" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphHostNodeSetParams == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6315
 *     cuPythonInit()
 *     if __cuGraphHostNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphHostNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_HOST_NODE_PARAMS*) nogil> __cuGraphHostNodeSetParams)(hNode, nodeParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6316
 *     if __cuGraphHostNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphHostNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_HOST_NODE_PARAMS*) nogil> __cuGraphHostNodeSetParams)(hNode, nodeParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__265, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6316, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6316, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6315
 *     cuPythonInit()
 *     if __cuGraphHostNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphHostNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_HOST_NODE_PARAMS*) nogil> __cuGraphHostNodeSetParams)(hNode, nodeParams)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6314
 *     global __cuGraphHostNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphHostNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphHostNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6317
 *         with gil:
 *             raise RuntimeError('Function "cuGraphHostNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_HOST_NODE_PARAMS*) nogil> __cuGraphHostNodeSetParams)(hNode, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUDA_HOST_NODE_PARAMS const *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphHostNodeSetParams)(__pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":6318
 *             raise RuntimeError('Function "cuGraphHostNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_HOST_NODE_PARAMS*) nogil> __cuGraphHostNodeSetParams)(hNode, nodeParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6312
 * 
 * cdef CUresult _cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphHostNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphHostNodeSetParams == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6311
 *     return err
 * 
 * cdef CUresult _cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphHostNodeSetParams
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphHostNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6320
 *     return err
 * 
 * cdef CUresult _cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddChildGraphNode
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddChildGraphNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUgraph __pyx_v_childGraph) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphAddChildGraphNode", 1);
  __Pyx_TraceCall("_cuGraphAddChildGraphNode", __pyx_f[0], 6320, 1, __PYX_ERR(0, 6320, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6321
 * 
 * cdef CUresult _cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphAddChildGraphNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddChildGraphNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6322
 * cdef CUresult _cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphAddChildGraphNode
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphAddChildGraphNode == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6322, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6323
 *     global __cuGraphAddChildGraphNode
 *     cuPythonInit()
 *     if __cuGraphAddChildGraphNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddChildGraphNode" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddChildGraphNode == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6324
 *     cuPythonInit()
 *     if __cuGraphAddChildGraphNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddChildGraphNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUgraph) nogil> __cuGraphAddChildGraphNode)(phGraphNode, hGraph, dependencies, numDependencies, childGraph)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6325
 *     if __cuGraphAddChildGraphNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddChildGraphNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUgraph) nogil> __cuGraphAddChildGraphNode)(phGraphNode, hGraph, dependencies, numDependencies, childGraph)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__266, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6325, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6325, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6324
 *     cuPythonInit()
 *     if __cuGraphAddChildGraphNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddChildGraphNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUgraph) nogil> __cuGraphAddChildGraphNode)(phGraphNode, hGraph, dependencies, numDependencies, childGraph)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6323
 *     global __cuGraphAddChildGraphNode
 *     cuPythonInit()
 *     if __cuGraphAddChildGraphNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddChildGraphNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6326
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddChildGraphNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUgraph) nogil> __cuGraphAddChildGraphNode)(phGraphNode, hGraph, dependencies, numDependencies, childGraph)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUgraph))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddChildGraphNode)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_childGraph);

    /* "cuda/_cuda/ccuda.pyx":6327
 *             raise RuntimeError('Function "cuGraphAddChildGraphNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUgraph) nogil> __cuGraphAddChildGraphNode)(phGraphNode, hGraph, dependencies, numDependencies, childGraph)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6321
 * 
 * cdef CUresult _cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphAddChildGraphNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddChildGraphNode == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6320
 *     return err
 * 
 * cdef CUresult _cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddChildGraphNode
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphAddChildGraphNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6329
 *     return err
 * 
 * cdef CUresult _cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphChildGraphNodeGetGraph
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphChildGraphNodeGetGraph(CUgraphNode __pyx_v_hNode, CUgraph *__pyx_v_phGraph) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphChildGraphNodeGetGraph", 1);
  __Pyx_TraceCall("_cuGraphChildGraphNodeGetGraph", __pyx_f[0], 6329, 1, __PYX_ERR(0, 6329, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6330
 * 
 * cdef CUresult _cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphChildGraphNodeGetGraph             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphChildGraphNodeGetGraph == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6331
 * cdef CUresult _cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphChildGraphNodeGetGraph
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphChildGraphNodeGetGraph == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6331, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6332
 *     global __cuGraphChildGraphNodeGetGraph
 *     cuPythonInit()
 *     if __cuGraphChildGraphNodeGetGraph == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphChildGraphNodeGetGraph" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphChildGraphNodeGetGraph == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6333
 *     cuPythonInit()
 *     if __cuGraphChildGraphNodeGetGraph == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphChildGraphNodeGetGraph" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUgraph*) nogil> __cuGraphChildGraphNodeGetGraph)(hNode, phGraph)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6334
 *     if __cuGraphChildGraphNodeGetGraph == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphChildGraphNodeGetGraph" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUgraph*) nogil> __cuGraphChildGraphNodeGetGraph)(hNode, phGraph)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__267, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6334, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6334, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6333
 *     cuPythonInit()
 *     if __cuGraphChildGraphNodeGetGraph == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphChildGraphNodeGetGraph" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUgraph*) nogil> __cuGraphChildGraphNodeGetGraph)(hNode, phGraph)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6332
 *     global __cuGraphChildGraphNodeGetGraph
 *     cuPythonInit()
 *     if __cuGraphChildGraphNodeGetGraph == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphChildGraphNodeGetGraph" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6335
 *         with gil:
 *             raise RuntimeError('Function "cuGraphChildGraphNodeGetGraph" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUgraph*) nogil> __cuGraphChildGraphNodeGetGraph)(hNode, phGraph)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUgraph *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphChildGraphNodeGetGraph)(__pyx_v_hNode, __pyx_v_phGraph);

    /* "cuda/_cuda/ccuda.pyx":6336
 *             raise RuntimeError('Function "cuGraphChildGraphNodeGetGraph" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUgraph*) nogil> __cuGraphChildGraphNodeGetGraph)(hNode, phGraph)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6330
 * 
 * cdef CUresult _cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphChildGraphNodeGetGraph             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphChildGraphNodeGetGraph == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6329
 *     return err
 * 
 * cdef CUresult _cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphChildGraphNodeGetGraph
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphChildGraphNodeGetGraph", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6338
 *     return err
 * 
 * cdef CUresult _cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddEmptyNode
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddEmptyNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphAddEmptyNode", 1);
  __Pyx_TraceCall("_cuGraphAddEmptyNode", __pyx_f[0], 6338, 1, __PYX_ERR(0, 6338, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6339
 * 
 * cdef CUresult _cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphAddEmptyNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddEmptyNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6340
 * cdef CUresult _cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphAddEmptyNode
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphAddEmptyNode == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6340, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6341
 *     global __cuGraphAddEmptyNode
 *     cuPythonInit()
 *     if __cuGraphAddEmptyNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddEmptyNode" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddEmptyNode == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6342
 *     cuPythonInit()
 *     if __cuGraphAddEmptyNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddEmptyNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t) nogil> __cuGraphAddEmptyNode)(phGraphNode, hGraph, dependencies, numDependencies)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6343
 *     if __cuGraphAddEmptyNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddEmptyNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t) nogil> __cuGraphAddEmptyNode)(phGraphNode, hGraph, dependencies, numDependencies)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__268, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6343, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6343, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6342
 *     cuPythonInit()
 *     if __cuGraphAddEmptyNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddEmptyNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t) nogil> __cuGraphAddEmptyNode)(phGraphNode, hGraph, dependencies, numDependencies)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6341
 *     global __cuGraphAddEmptyNode
 *     cuPythonInit()
 *     if __cuGraphAddEmptyNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddEmptyNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6344
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddEmptyNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t) nogil> __cuGraphAddEmptyNode)(phGraphNode, hGraph, dependencies, numDependencies)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddEmptyNode)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies);

    /* "cuda/_cuda/ccuda.pyx":6345
 *             raise RuntimeError('Function "cuGraphAddEmptyNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t) nogil> __cuGraphAddEmptyNode)(phGraphNode, hGraph, dependencies, numDependencies)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6339
 * 
 * cdef CUresult _cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphAddEmptyNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddEmptyNode == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6338
 *     return err
 * 
 * cdef CUresult _cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddEmptyNode
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphAddEmptyNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6347
 *     return err
 * 
 * cdef CUresult _cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddEventRecordNode
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddEventRecordNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUevent __pyx_v_event) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphAddEventRecordNode", 1);
  __Pyx_TraceCall("_cuGraphAddEventRecordNode", __pyx_f[0], 6347, 1, __PYX_ERR(0, 6347, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6348
 * 
 * cdef CUresult _cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphAddEventRecordNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddEventRecordNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6349
 * cdef CUresult _cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphAddEventRecordNode
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphAddEventRecordNode == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6349, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6350
 *     global __cuGraphAddEventRecordNode
 *     cuPythonInit()
 *     if __cuGraphAddEventRecordNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddEventRecordNode" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddEventRecordNode == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6351
 *     cuPythonInit()
 *     if __cuGraphAddEventRecordNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddEventRecordNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUevent) nogil> __cuGraphAddEventRecordNode)(phGraphNode, hGraph, dependencies, numDependencies, event)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6352
 *     if __cuGraphAddEventRecordNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddEventRecordNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUevent) nogil> __cuGraphAddEventRecordNode)(phGraphNode, hGraph, dependencies, numDependencies, event)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__269, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6352, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6352, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6351
 *     cuPythonInit()
 *     if __cuGraphAddEventRecordNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddEventRecordNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUevent) nogil> __cuGraphAddEventRecordNode)(phGraphNode, hGraph, dependencies, numDependencies, event)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6350
 *     global __cuGraphAddEventRecordNode
 *     cuPythonInit()
 *     if __cuGraphAddEventRecordNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddEventRecordNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6353
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddEventRecordNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUevent) nogil> __cuGraphAddEventRecordNode)(phGraphNode, hGraph, dependencies, numDependencies, event)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUevent))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddEventRecordNode)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_event);

    /* "cuda/_cuda/ccuda.pyx":6354
 *             raise RuntimeError('Function "cuGraphAddEventRecordNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUevent) nogil> __cuGraphAddEventRecordNode)(phGraphNode, hGraph, dependencies, numDependencies, event)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6348
 * 
 * cdef CUresult _cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphAddEventRecordNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddEventRecordNode == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6347
 *     return err
 * 
 * cdef CUresult _cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddEventRecordNode
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphAddEventRecordNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6356
 *     return err
 * 
 * cdef CUresult _cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphEventRecordNodeGetEvent
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventRecordNodeGetEvent(CUgraphNode __pyx_v_hNode, CUevent *__pyx_v_event_out) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphEventRecordNodeGetEvent", 1);
  __Pyx_TraceCall("_cuGraphEventRecordNodeGetEvent", __pyx_f[0], 6356, 1, __PYX_ERR(0, 6356, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6357
 * 
 * cdef CUresult _cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphEventRecordNodeGetEvent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphEventRecordNodeGetEvent == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6358
 * cdef CUresult _cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphEventRecordNodeGetEvent
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphEventRecordNodeGetEvent == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6358, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6359
 *     global __cuGraphEventRecordNodeGetEvent
 *     cuPythonInit()
 *     if __cuGraphEventRecordNodeGetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventRecordNodeGetEvent" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventRecordNodeGetEvent == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6360
 *     cuPythonInit()
 *     if __cuGraphEventRecordNodeGetEvent == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphEventRecordNodeGetEvent" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUevent*) nogil> __cuGraphEventRecordNodeGetEvent)(hNode, event_out)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6361
 *     if __cuGraphEventRecordNodeGetEvent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventRecordNodeGetEvent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUevent*) nogil> __cuGraphEventRecordNodeGetEvent)(hNode, event_out)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__270, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6361, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6361, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6360
 *     cuPythonInit()
 *     if __cuGraphEventRecordNodeGetEvent == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphEventRecordNodeGetEvent" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUevent*) nogil> __cuGraphEventRecordNodeGetEvent)(hNode, event_out)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6359
 *     global __cuGraphEventRecordNodeGetEvent
 *     cuPythonInit()
 *     if __cuGraphEventRecordNodeGetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventRecordNodeGetEvent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6362
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventRecordNodeGetEvent" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUevent*) nogil> __cuGraphEventRecordNodeGetEvent)(hNode, event_out)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUevent *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventRecordNodeGetEvent)(__pyx_v_hNode, __pyx_v_event_out);

    /* "cuda/_cuda/ccuda.pyx":6363
 *             raise RuntimeError('Function "cuGraphEventRecordNodeGetEvent" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUevent*) nogil> __cuGraphEventRecordNodeGetEvent)(hNode, event_out)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6357
 * 
 * cdef CUresult _cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphEventRecordNodeGetEvent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphEventRecordNodeGetEvent == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6356
 *     return err
 * 
 * cdef CUresult _cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphEventRecordNodeGetEvent
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphEventRecordNodeGetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6365
 *     return err
 * 
 * cdef CUresult _cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphEventRecordNodeSetEvent
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventRecordNodeSetEvent(CUgraphNode __pyx_v_hNode, CUevent __pyx_v_event) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphEventRecordNodeSetEvent", 1);
  __Pyx_TraceCall("_cuGraphEventRecordNodeSetEvent", __pyx_f[0], 6365, 1, __PYX_ERR(0, 6365, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6366
 * 
 * cdef CUresult _cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphEventRecordNodeSetEvent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphEventRecordNodeSetEvent == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6367
 * cdef CUresult _cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphEventRecordNodeSetEvent
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphEventRecordNodeSetEvent == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6367, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6368
 *     global __cuGraphEventRecordNodeSetEvent
 *     cuPythonInit()
 *     if __cuGraphEventRecordNodeSetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventRecordNodeSetEvent" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventRecordNodeSetEvent == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6369
 *     cuPythonInit()
 *     if __cuGraphEventRecordNodeSetEvent == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphEventRecordNodeSetEvent" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUevent) nogil> __cuGraphEventRecordNodeSetEvent)(hNode, event)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6370
 *     if __cuGraphEventRecordNodeSetEvent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventRecordNodeSetEvent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUevent) nogil> __cuGraphEventRecordNodeSetEvent)(hNode, event)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__271, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6370, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6370, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6369
 *     cuPythonInit()
 *     if __cuGraphEventRecordNodeSetEvent == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphEventRecordNodeSetEvent" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUevent) nogil> __cuGraphEventRecordNodeSetEvent)(hNode, event)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6368
 *     global __cuGraphEventRecordNodeSetEvent
 *     cuPythonInit()
 *     if __cuGraphEventRecordNodeSetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventRecordNodeSetEvent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6371
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventRecordNodeSetEvent" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUevent) nogil> __cuGraphEventRecordNodeSetEvent)(hNode, event)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUevent))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventRecordNodeSetEvent)(__pyx_v_hNode, __pyx_v_event);

    /* "cuda/_cuda/ccuda.pyx":6372
 *             raise RuntimeError('Function "cuGraphEventRecordNodeSetEvent" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUevent) nogil> __cuGraphEventRecordNodeSetEvent)(hNode, event)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6366
 * 
 * cdef CUresult _cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphEventRecordNodeSetEvent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphEventRecordNodeSetEvent == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6365
 *     return err
 * 
 * cdef CUresult _cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphEventRecordNodeSetEvent
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphEventRecordNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6374
 *     return err
 * 
 * cdef CUresult _cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddEventWaitNode
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddEventWaitNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUevent __pyx_v_event) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphAddEventWaitNode", 1);
  __Pyx_TraceCall("_cuGraphAddEventWaitNode", __pyx_f[0], 6374, 1, __PYX_ERR(0, 6374, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6375
 * 
 * cdef CUresult _cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphAddEventWaitNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddEventWaitNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6376
 * cdef CUresult _cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphAddEventWaitNode
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphAddEventWaitNode == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6376, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6377
 *     global __cuGraphAddEventWaitNode
 *     cuPythonInit()
 *     if __cuGraphAddEventWaitNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddEventWaitNode" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddEventWaitNode == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6378
 *     cuPythonInit()
 *     if __cuGraphAddEventWaitNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddEventWaitNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUevent) nogil> __cuGraphAddEventWaitNode)(phGraphNode, hGraph, dependencies, numDependencies, event)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6379
 *     if __cuGraphAddEventWaitNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddEventWaitNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUevent) nogil> __cuGraphAddEventWaitNode)(phGraphNode, hGraph, dependencies, numDependencies, event)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__272, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6379, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6379, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6378
 *     cuPythonInit()
 *     if __cuGraphAddEventWaitNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddEventWaitNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUevent) nogil> __cuGraphAddEventWaitNode)(phGraphNode, hGraph, dependencies, numDependencies, event)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6377
 *     global __cuGraphAddEventWaitNode
 *     cuPythonInit()
 *     if __cuGraphAddEventWaitNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddEventWaitNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6380
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddEventWaitNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUevent) nogil> __cuGraphAddEventWaitNode)(phGraphNode, hGraph, dependencies, numDependencies, event)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUevent))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddEventWaitNode)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_event);

    /* "cuda/_cuda/ccuda.pyx":6381
 *             raise RuntimeError('Function "cuGraphAddEventWaitNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUevent) nogil> __cuGraphAddEventWaitNode)(phGraphNode, hGraph, dependencies, numDependencies, event)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6375
 * 
 * cdef CUresult _cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphAddEventWaitNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddEventWaitNode == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6374
 *     return err
 * 
 * cdef CUresult _cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddEventWaitNode
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphAddEventWaitNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6383
 *     return err
 * 
 * cdef CUresult _cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphEventWaitNodeGetEvent
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventWaitNodeGetEvent(CUgraphNode __pyx_v_hNode, CUevent *__pyx_v_event_out) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphEventWaitNodeGetEvent", 1);
  __Pyx_TraceCall("_cuGraphEventWaitNodeGetEvent", __pyx_f[0], 6383, 1, __PYX_ERR(0, 6383, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6384
 * 
 * cdef CUresult _cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphEventWaitNodeGetEvent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphEventWaitNodeGetEvent == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6385
 * cdef CUresult _cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphEventWaitNodeGetEvent
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphEventWaitNodeGetEvent == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6385, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6386
 *     global __cuGraphEventWaitNodeGetEvent
 *     cuPythonInit()
 *     if __cuGraphEventWaitNodeGetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventWaitNodeGetEvent" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventWaitNodeGetEvent == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6387
 *     cuPythonInit()
 *     if __cuGraphEventWaitNodeGetEvent == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphEventWaitNodeGetEvent" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUevent*) nogil> __cuGraphEventWaitNodeGetEvent)(hNode, event_out)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6388
 *     if __cuGraphEventWaitNodeGetEvent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventWaitNodeGetEvent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUevent*) nogil> __cuGraphEventWaitNodeGetEvent)(hNode, event_out)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__273, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6388, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6388, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6387
 *     cuPythonInit()
 *     if __cuGraphEventWaitNodeGetEvent == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphEventWaitNodeGetEvent" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUevent*) nogil> __cuGraphEventWaitNodeGetEvent)(hNode, event_out)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6386
 *     global __cuGraphEventWaitNodeGetEvent
 *     cuPythonInit()
 *     if __cuGraphEventWaitNodeGetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventWaitNodeGetEvent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6389
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventWaitNodeGetEvent" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUevent*) nogil> __cuGraphEventWaitNodeGetEvent)(hNode, event_out)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUevent *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventWaitNodeGetEvent)(__pyx_v_hNode, __pyx_v_event_out);

    /* "cuda/_cuda/ccuda.pyx":6390
 *             raise RuntimeError('Function "cuGraphEventWaitNodeGetEvent" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUevent*) nogil> __cuGraphEventWaitNodeGetEvent)(hNode, event_out)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6384
 * 
 * cdef CUresult _cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphEventWaitNodeGetEvent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphEventWaitNodeGetEvent == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6383
 *     return err
 * 
 * cdef CUresult _cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphEventWaitNodeGetEvent
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphEventWaitNodeGetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6392
 *     return err
 * 
 * cdef CUresult _cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphEventWaitNodeSetEvent
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventWaitNodeSetEvent(CUgraphNode __pyx_v_hNode, CUevent __pyx_v_event) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphEventWaitNodeSetEvent", 1);
  __Pyx_TraceCall("_cuGraphEventWaitNodeSetEvent", __pyx_f[0], 6392, 1, __PYX_ERR(0, 6392, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6393
 * 
 * cdef CUresult _cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphEventWaitNodeSetEvent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphEventWaitNodeSetEvent == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6394
 * cdef CUresult _cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphEventWaitNodeSetEvent
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphEventWaitNodeSetEvent == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6394, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6395
 *     global __cuGraphEventWaitNodeSetEvent
 *     cuPythonInit()
 *     if __cuGraphEventWaitNodeSetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventWaitNodeSetEvent" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventWaitNodeSetEvent == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6396
 *     cuPythonInit()
 *     if __cuGraphEventWaitNodeSetEvent == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphEventWaitNodeSetEvent" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUevent) nogil> __cuGraphEventWaitNodeSetEvent)(hNode, event)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6397
 *     if __cuGraphEventWaitNodeSetEvent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventWaitNodeSetEvent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUevent) nogil> __cuGraphEventWaitNodeSetEvent)(hNode, event)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__274, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6397, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6397, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6396
 *     cuPythonInit()
 *     if __cuGraphEventWaitNodeSetEvent == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphEventWaitNodeSetEvent" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUevent) nogil> __cuGraphEventWaitNodeSetEvent)(hNode, event)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6395
 *     global __cuGraphEventWaitNodeSetEvent
 *     cuPythonInit()
 *     if __cuGraphEventWaitNodeSetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventWaitNodeSetEvent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6398
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventWaitNodeSetEvent" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUevent) nogil> __cuGraphEventWaitNodeSetEvent)(hNode, event)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUevent))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventWaitNodeSetEvent)(__pyx_v_hNode, __pyx_v_event);

    /* "cuda/_cuda/ccuda.pyx":6399
 *             raise RuntimeError('Function "cuGraphEventWaitNodeSetEvent" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUevent) nogil> __cuGraphEventWaitNodeSetEvent)(hNode, event)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * 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:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6393
 * 
 * cdef CUresult _cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphEventWaitNodeSetEvent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphEventWaitNodeSetEvent == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6392
 *     return err
 * 
 * cdef CUresult _cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphEventWaitNodeSetEvent
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphEventWaitNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6401
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddExternalSemaphoresSignalNode
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddExternalSemaphoresSignalNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphAddExternalSemaphoresSignalNode", 1);
  __Pyx_TraceCall("_cuGraphAddExternalSemaphoresSignalNode", __pyx_f[0], 6401, 1, __PYX_ERR(0, 6401, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6402
 * 
 * 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:
 *     global __cuGraphAddExternalSemaphoresSignalNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddExternalSemaphoresSignalNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6403
 * 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:
 *     global __cuGraphAddExternalSemaphoresSignalNode
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphAddExternalSemaphoresSignalNode == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6403, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6404
 *     global __cuGraphAddExternalSemaphoresSignalNode
 *     cuPythonInit()
 *     if __cuGraphAddExternalSemaphoresSignalNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddExternalSemaphoresSignalNode" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddExternalSemaphoresSignalNode == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6405
 *     cuPythonInit()
 *     if __cuGraphAddExternalSemaphoresSignalNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddExternalSemaphoresSignalNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS*) nogil> __cuGraphAddExternalSemaphoresSignalNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6406
 *     if __cuGraphAddExternalSemaphoresSignalNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddExternalSemaphoresSignalNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS*) nogil> __cuGraphAddExternalSemaphoresSignalNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__275, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6406, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6406, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6405
 *     cuPythonInit()
 *     if __cuGraphAddExternalSemaphoresSignalNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddExternalSemaphoresSignalNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS*) nogil> __cuGraphAddExternalSemaphoresSignalNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6404
 *     global __cuGraphAddExternalSemaphoresSignalNode
 *     cuPythonInit()
 *     if __cuGraphAddExternalSemaphoresSignalNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddExternalSemaphoresSignalNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6407
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddExternalSemaphoresSignalNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS*) nogil> __cuGraphAddExternalSemaphoresSignalNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddExternalSemaphoresSignalNode)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":6408
 *             raise RuntimeError('Function "cuGraphAddExternalSemaphoresSignalNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS*) nogil> __cuGraphAddExternalSemaphoresSignalNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6402
 * 
 * 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:
 *     global __cuGraphAddExternalSemaphoresSignalNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddExternalSemaphoresSignalNode == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6401
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddExternalSemaphoresSignalNode
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphAddExternalSemaphoresSignalNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6410
 *     return err
 * 
 * cdef CUresult _cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExternalSemaphoresSignalNodeGetParams
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *__pyx_v_params_out) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphExternalSemaphoresSignalNodeGetParams", 1);
  __Pyx_TraceCall("_cuGraphExternalSemaphoresSignalNodeGetParams", __pyx_f[0], 6410, 1, __PYX_ERR(0, 6410, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6411
 * 
 * cdef CUresult _cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExternalSemaphoresSignalNodeGetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresSignalNodeGetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6412
 * cdef CUresult _cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExternalSemaphoresSignalNodeGetParams
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphExternalSemaphoresSignalNodeGetParams == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6412, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6413
 *     global __cuGraphExternalSemaphoresSignalNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresSignalNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeGetParams" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresSignalNodeGetParams == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6414
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresSignalNodeGetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS*) nogil> __cuGraphExternalSemaphoresSignalNodeGetParams)(hNode, params_out)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6415
 *     if __cuGraphExternalSemaphoresSignalNodeGetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeGetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS*) nogil> __cuGraphExternalSemaphoresSignalNodeGetParams)(hNode, params_out)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__276, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6415, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6415, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6414
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresSignalNodeGetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS*) nogil> __cuGraphExternalSemaphoresSignalNodeGetParams)(hNode, params_out)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6413
 *     global __cuGraphExternalSemaphoresSignalNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresSignalNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6416
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS*) nogil> __cuGraphExternalSemaphoresSignalNodeGetParams)(hNode, params_out)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresSignalNodeGetParams)(__pyx_v_hNode, __pyx_v_params_out);

    /* "cuda/_cuda/ccuda.pyx":6417
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS*) nogil> __cuGraphExternalSemaphoresSignalNodeGetParams)(hNode, params_out)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6411
 * 
 * cdef CUresult _cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExternalSemaphoresSignalNodeGetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresSignalNodeGetParams == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6410
 *     return err
 * 
 * cdef CUresult _cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExternalSemaphoresSignalNodeGetParams
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphExternalSemaphoresSignalNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6419
 *     return err
 * 
 * cdef CUresult _cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExternalSemaphoresSignalNodeSetParams
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphExternalSemaphoresSignalNodeSetParams", 1);
  __Pyx_TraceCall("_cuGraphExternalSemaphoresSignalNodeSetParams", __pyx_f[0], 6419, 1, __PYX_ERR(0, 6419, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6420
 * 
 * cdef CUresult _cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExternalSemaphoresSignalNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresSignalNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6421
 * cdef CUresult _cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExternalSemaphoresSignalNodeSetParams
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphExternalSemaphoresSignalNodeSetParams == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6421, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6422
 *     global __cuGraphExternalSemaphoresSignalNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresSignalNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeSetParams" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresSignalNodeSetParams == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6423
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresSignalNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS*) nogil> __cuGraphExternalSemaphoresSignalNodeSetParams)(hNode, nodeParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6424
 *     if __cuGraphExternalSemaphoresSignalNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS*) nogil> __cuGraphExternalSemaphoresSignalNodeSetParams)(hNode, nodeParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__277, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6424, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6424, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6423
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresSignalNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS*) nogil> __cuGraphExternalSemaphoresSignalNodeSetParams)(hNode, nodeParams)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6422
 *     global __cuGraphExternalSemaphoresSignalNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresSignalNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6425
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS*) nogil> __cuGraphExternalSemaphoresSignalNodeSetParams)(hNode, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresSignalNodeSetParams)(__pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":6426
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS*) nogil> __cuGraphExternalSemaphoresSignalNodeSetParams)(hNode, nodeParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * 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:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6420
 * 
 * cdef CUresult _cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExternalSemaphoresSignalNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresSignalNodeSetParams == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6419
 *     return err
 * 
 * cdef CUresult _cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExternalSemaphoresSignalNodeSetParams
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphExternalSemaphoresSignalNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6428
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddExternalSemaphoresWaitNode
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddExternalSemaphoresWaitNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphAddExternalSemaphoresWaitNode", 1);
  __Pyx_TraceCall("_cuGraphAddExternalSemaphoresWaitNode", __pyx_f[0], 6428, 1, __PYX_ERR(0, 6428, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6429
 * 
 * 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:
 *     global __cuGraphAddExternalSemaphoresWaitNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddExternalSemaphoresWaitNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6430
 * 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:
 *     global __cuGraphAddExternalSemaphoresWaitNode
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphAddExternalSemaphoresWaitNode == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6430, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6431
 *     global __cuGraphAddExternalSemaphoresWaitNode
 *     cuPythonInit()
 *     if __cuGraphAddExternalSemaphoresWaitNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddExternalSemaphoresWaitNode" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddExternalSemaphoresWaitNode == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6432
 *     cuPythonInit()
 *     if __cuGraphAddExternalSemaphoresWaitNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddExternalSemaphoresWaitNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_EXT_SEM_WAIT_NODE_PARAMS*) nogil> __cuGraphAddExternalSemaphoresWaitNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6433
 *     if __cuGraphAddExternalSemaphoresWaitNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddExternalSemaphoresWaitNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_EXT_SEM_WAIT_NODE_PARAMS*) nogil> __cuGraphAddExternalSemaphoresWaitNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__278, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6433, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6433, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6432
 *     cuPythonInit()
 *     if __cuGraphAddExternalSemaphoresWaitNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddExternalSemaphoresWaitNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_EXT_SEM_WAIT_NODE_PARAMS*) nogil> __cuGraphAddExternalSemaphoresWaitNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6431
 *     global __cuGraphAddExternalSemaphoresWaitNode
 *     cuPythonInit()
 *     if __cuGraphAddExternalSemaphoresWaitNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddExternalSemaphoresWaitNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6434
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddExternalSemaphoresWaitNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_EXT_SEM_WAIT_NODE_PARAMS*) nogil> __cuGraphAddExternalSemaphoresWaitNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddExternalSemaphoresWaitNode)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":6435
 *             raise RuntimeError('Function "cuGraphAddExternalSemaphoresWaitNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_EXT_SEM_WAIT_NODE_PARAMS*) nogil> __cuGraphAddExternalSemaphoresWaitNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6429
 * 
 * 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:
 *     global __cuGraphAddExternalSemaphoresWaitNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddExternalSemaphoresWaitNode == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6428
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddExternalSemaphoresWaitNode
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphAddExternalSemaphoresWaitNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6437
 *     return err
 * 
 * cdef CUresult _cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExternalSemaphoresWaitNodeGetParams
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS *__pyx_v_params_out) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphExternalSemaphoresWaitNodeGetParams", 1);
  __Pyx_TraceCall("_cuGraphExternalSemaphoresWaitNodeGetParams", __pyx_f[0], 6437, 1, __PYX_ERR(0, 6437, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6438
 * 
 * cdef CUresult _cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExternalSemaphoresWaitNodeGetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresWaitNodeGetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6439
 * cdef CUresult _cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExternalSemaphoresWaitNodeGetParams
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphExternalSemaphoresWaitNodeGetParams == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6439, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6440
 *     global __cuGraphExternalSemaphoresWaitNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresWaitNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeGetParams" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresWaitNodeGetParams == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6441
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresWaitNodeGetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS*) nogil> __cuGraphExternalSemaphoresWaitNodeGetParams)(hNode, params_out)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6442
 *     if __cuGraphExternalSemaphoresWaitNodeGetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeGetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS*) nogil> __cuGraphExternalSemaphoresWaitNodeGetParams)(hNode, params_out)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__279, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6442, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6442, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6441
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresWaitNodeGetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS*) nogil> __cuGraphExternalSemaphoresWaitNodeGetParams)(hNode, params_out)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6440
 *     global __cuGraphExternalSemaphoresWaitNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresWaitNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6443
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS*) nogil> __cuGraphExternalSemaphoresWaitNodeGetParams)(hNode, params_out)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresWaitNodeGetParams)(__pyx_v_hNode, __pyx_v_params_out);

    /* "cuda/_cuda/ccuda.pyx":6444
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS*) nogil> __cuGraphExternalSemaphoresWaitNodeGetParams)(hNode, params_out)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6438
 * 
 * cdef CUresult _cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExternalSemaphoresWaitNodeGetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresWaitNodeGetParams == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6437
 *     return err
 * 
 * cdef CUresult _cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExternalSemaphoresWaitNodeGetParams
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphExternalSemaphoresWaitNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6446
 *     return err
 * 
 * cdef CUresult _cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExternalSemaphoresWaitNodeSetParams
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphExternalSemaphoresWaitNodeSetParams", 1);
  __Pyx_TraceCall("_cuGraphExternalSemaphoresWaitNodeSetParams", __pyx_f[0], 6446, 1, __PYX_ERR(0, 6446, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6447
 * 
 * cdef CUresult _cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExternalSemaphoresWaitNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresWaitNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6448
 * cdef CUresult _cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExternalSemaphoresWaitNodeSetParams
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphExternalSemaphoresWaitNodeSetParams == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6448, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6449
 *     global __cuGraphExternalSemaphoresWaitNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresWaitNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeSetParams" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresWaitNodeSetParams == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6450
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresWaitNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS*) nogil> __cuGraphExternalSemaphoresWaitNodeSetParams)(hNode, nodeParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6451
 *     if __cuGraphExternalSemaphoresWaitNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS*) nogil> __cuGraphExternalSemaphoresWaitNodeSetParams)(hNode, nodeParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__280, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6451, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6451, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6450
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresWaitNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS*) nogil> __cuGraphExternalSemaphoresWaitNodeSetParams)(hNode, nodeParams)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6449
 *     global __cuGraphExternalSemaphoresWaitNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresWaitNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6452
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS*) nogil> __cuGraphExternalSemaphoresWaitNodeSetParams)(hNode, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresWaitNodeSetParams)(__pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":6453
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS*) nogil> __cuGraphExternalSemaphoresWaitNodeSetParams)(hNode, nodeParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * 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:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6447
 * 
 * cdef CUresult _cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExternalSemaphoresWaitNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresWaitNodeSetParams == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6446
 *     return err
 * 
 * cdef CUresult _cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExternalSemaphoresWaitNodeSetParams
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphExternalSemaphoresWaitNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6455
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddBatchMemOpNode
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddBatchMemOpNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_BATCH_MEM_OP_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphAddBatchMemOpNode", 1);
  __Pyx_TraceCall("_cuGraphAddBatchMemOpNode", __pyx_f[0], 6455, 1, __PYX_ERR(0, 6455, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6456
 * 
 * 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:
 *     global __cuGraphAddBatchMemOpNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddBatchMemOpNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6457
 * 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:
 *     global __cuGraphAddBatchMemOpNode
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphAddBatchMemOpNode == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6457, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6458
 *     global __cuGraphAddBatchMemOpNode
 *     cuPythonInit()
 *     if __cuGraphAddBatchMemOpNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddBatchMemOpNode" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddBatchMemOpNode == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6459
 *     cuPythonInit()
 *     if __cuGraphAddBatchMemOpNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddBatchMemOpNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_BATCH_MEM_OP_NODE_PARAMS*) nogil> __cuGraphAddBatchMemOpNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6460
 *     if __cuGraphAddBatchMemOpNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddBatchMemOpNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_BATCH_MEM_OP_NODE_PARAMS*) nogil> __cuGraphAddBatchMemOpNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__281, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6460, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6460, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6459
 *     cuPythonInit()
 *     if __cuGraphAddBatchMemOpNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddBatchMemOpNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_BATCH_MEM_OP_NODE_PARAMS*) nogil> __cuGraphAddBatchMemOpNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6458
 *     global __cuGraphAddBatchMemOpNode
 *     cuPythonInit()
 *     if __cuGraphAddBatchMemOpNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddBatchMemOpNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6461
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddBatchMemOpNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_BATCH_MEM_OP_NODE_PARAMS*) nogil> __cuGraphAddBatchMemOpNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_BATCH_MEM_OP_NODE_PARAMS const *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddBatchMemOpNode)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":6462
 *             raise RuntimeError('Function "cuGraphAddBatchMemOpNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_BATCH_MEM_OP_NODE_PARAMS*) nogil> __cuGraphAddBatchMemOpNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6456
 * 
 * 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:
 *     global __cuGraphAddBatchMemOpNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddBatchMemOpNode == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6455
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddBatchMemOpNode
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphAddBatchMemOpNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6464
 *     return err
 * 
 * cdef CUresult _cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphBatchMemOpNodeGetParams
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphBatchMemOpNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS *__pyx_v_nodeParams_out) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphBatchMemOpNodeGetParams", 1);
  __Pyx_TraceCall("_cuGraphBatchMemOpNodeGetParams", __pyx_f[0], 6464, 1, __PYX_ERR(0, 6464, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6465
 * 
 * cdef CUresult _cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphBatchMemOpNodeGetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphBatchMemOpNodeGetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6466
 * cdef CUresult _cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphBatchMemOpNodeGetParams
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphBatchMemOpNodeGetParams == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6466, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6467
 *     global __cuGraphBatchMemOpNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphBatchMemOpNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphBatchMemOpNodeGetParams" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphBatchMemOpNodeGetParams == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6468
 *     cuPythonInit()
 *     if __cuGraphBatchMemOpNodeGetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphBatchMemOpNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS*) nogil> __cuGraphBatchMemOpNodeGetParams)(hNode, nodeParams_out)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6469
 *     if __cuGraphBatchMemOpNodeGetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphBatchMemOpNodeGetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS*) nogil> __cuGraphBatchMemOpNodeGetParams)(hNode, nodeParams_out)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__282, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6469, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6469, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6468
 *     cuPythonInit()
 *     if __cuGraphBatchMemOpNodeGetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphBatchMemOpNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS*) nogil> __cuGraphBatchMemOpNodeGetParams)(hNode, nodeParams_out)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6467
 *     global __cuGraphBatchMemOpNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphBatchMemOpNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphBatchMemOpNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6470
 *         with gil:
 *             raise RuntimeError('Function "cuGraphBatchMemOpNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS*) nogil> __cuGraphBatchMemOpNodeGetParams)(hNode, nodeParams_out)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphBatchMemOpNodeGetParams)(__pyx_v_hNode, __pyx_v_nodeParams_out);

    /* "cuda/_cuda/ccuda.pyx":6471
 *             raise RuntimeError('Function "cuGraphBatchMemOpNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS*) nogil> __cuGraphBatchMemOpNodeGetParams)(hNode, nodeParams_out)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6465
 * 
 * cdef CUresult _cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphBatchMemOpNodeGetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphBatchMemOpNodeGetParams == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6464
 *     return err
 * 
 * cdef CUresult _cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphBatchMemOpNodeGetParams
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphBatchMemOpNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6473
 *     return err
 * 
 * cdef CUresult _cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphBatchMemOpNodeSetParams
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphBatchMemOpNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphBatchMemOpNodeSetParams", 1);
  __Pyx_TraceCall("_cuGraphBatchMemOpNodeSetParams", __pyx_f[0], 6473, 1, __PYX_ERR(0, 6473, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6474
 * 
 * cdef CUresult _cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphBatchMemOpNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphBatchMemOpNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6475
 * cdef CUresult _cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphBatchMemOpNodeSetParams
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphBatchMemOpNodeSetParams == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6475, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6476
 *     global __cuGraphBatchMemOpNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphBatchMemOpNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphBatchMemOpNodeSetParams" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphBatchMemOpNodeSetParams == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6477
 *     cuPythonInit()
 *     if __cuGraphBatchMemOpNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphBatchMemOpNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS*) nogil> __cuGraphBatchMemOpNodeSetParams)(hNode, nodeParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6478
 *     if __cuGraphBatchMemOpNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphBatchMemOpNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS*) nogil> __cuGraphBatchMemOpNodeSetParams)(hNode, nodeParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__283, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6478, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6478, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6477
 *     cuPythonInit()
 *     if __cuGraphBatchMemOpNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphBatchMemOpNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS*) nogil> __cuGraphBatchMemOpNodeSetParams)(hNode, nodeParams)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6476
 *     global __cuGraphBatchMemOpNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphBatchMemOpNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphBatchMemOpNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6479
 *         with gil:
 *             raise RuntimeError('Function "cuGraphBatchMemOpNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS*) nogil> __cuGraphBatchMemOpNodeSetParams)(hNode, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphBatchMemOpNodeSetParams)(__pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":6480
 *             raise RuntimeError('Function "cuGraphBatchMemOpNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS*) nogil> __cuGraphBatchMemOpNodeSetParams)(hNode, nodeParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6474
 * 
 * cdef CUresult _cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphBatchMemOpNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphBatchMemOpNodeSetParams == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6473
 *     return err
 * 
 * cdef CUresult _cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphBatchMemOpNodeSetParams
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphBatchMemOpNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6482
 *     return err
 * 
 * cdef CUresult _cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecBatchMemOpNodeSetParams
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecBatchMemOpNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphExecBatchMemOpNodeSetParams", 1);
  __Pyx_TraceCall("_cuGraphExecBatchMemOpNodeSetParams", __pyx_f[0], 6482, 1, __PYX_ERR(0, 6482, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6483
 * 
 * cdef CUresult _cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecBatchMemOpNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecBatchMemOpNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6484
 * cdef CUresult _cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecBatchMemOpNodeSetParams
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphExecBatchMemOpNodeSetParams == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6484, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6485
 *     global __cuGraphExecBatchMemOpNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecBatchMemOpNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecBatchMemOpNodeSetParams" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecBatchMemOpNodeSetParams == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6486
 *     cuPythonInit()
 *     if __cuGraphExecBatchMemOpNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecBatchMemOpNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS*) nogil> __cuGraphExecBatchMemOpNodeSetParams)(hGraphExec, hNode, nodeParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6487
 *     if __cuGraphExecBatchMemOpNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecBatchMemOpNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS*) nogil> __cuGraphExecBatchMemOpNodeSetParams)(hGraphExec, hNode, nodeParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__284, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6487, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6487, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6486
 *     cuPythonInit()
 *     if __cuGraphExecBatchMemOpNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecBatchMemOpNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS*) nogil> __cuGraphExecBatchMemOpNodeSetParams)(hGraphExec, hNode, nodeParams)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6485
 *     global __cuGraphExecBatchMemOpNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecBatchMemOpNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecBatchMemOpNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6488
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecBatchMemOpNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS*) nogil> __cuGraphExecBatchMemOpNodeSetParams)(hGraphExec, hNode, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphExec, CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecBatchMemOpNodeSetParams)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":6489
 *             raise RuntimeError('Function "cuGraphExecBatchMemOpNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS*) nogil> __cuGraphExecBatchMemOpNodeSetParams)(hGraphExec, hNode, nodeParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * 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:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6483
 * 
 * cdef CUresult _cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecBatchMemOpNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecBatchMemOpNodeSetParams == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6482
 *     return err
 * 
 * cdef CUresult _cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecBatchMemOpNodeSetParams
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphExecBatchMemOpNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6491
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddMemAllocNode
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemAllocNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS *__pyx_v_nodeParams) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphAddMemAllocNode", 1);
  __Pyx_TraceCall("_cuGraphAddMemAllocNode", __pyx_f[0], 6491, 1, __PYX_ERR(0, 6491, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6492
 * 
 * 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:
 *     global __cuGraphAddMemAllocNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddMemAllocNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6493
 * 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:
 *     global __cuGraphAddMemAllocNode
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphAddMemAllocNode == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6493, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6494
 *     global __cuGraphAddMemAllocNode
 *     cuPythonInit()
 *     if __cuGraphAddMemAllocNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemAllocNode" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemAllocNode == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6495
 *     cuPythonInit()
 *     if __cuGraphAddMemAllocNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddMemAllocNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUDA_MEM_ALLOC_NODE_PARAMS*) nogil> __cuGraphAddMemAllocNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6496
 *     if __cuGraphAddMemAllocNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemAllocNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUDA_MEM_ALLOC_NODE_PARAMS*) nogil> __cuGraphAddMemAllocNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__285, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6496, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6496, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6495
 *     cuPythonInit()
 *     if __cuGraphAddMemAllocNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddMemAllocNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUDA_MEM_ALLOC_NODE_PARAMS*) nogil> __cuGraphAddMemAllocNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6494
 *     global __cuGraphAddMemAllocNode
 *     cuPythonInit()
 *     if __cuGraphAddMemAllocNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemAllocNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6497
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemAllocNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUDA_MEM_ALLOC_NODE_PARAMS*) nogil> __cuGraphAddMemAllocNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEM_ALLOC_NODE_PARAMS *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemAllocNode)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":6498
 *             raise RuntimeError('Function "cuGraphAddMemAllocNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUDA_MEM_ALLOC_NODE_PARAMS*) nogil> __cuGraphAddMemAllocNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6492
 * 
 * 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:
 *     global __cuGraphAddMemAllocNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddMemAllocNode == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6491
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddMemAllocNode
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphAddMemAllocNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6500
 *     return err
 * 
 * cdef CUresult _cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphMemAllocNodeGetParams
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemAllocNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_MEM_ALLOC_NODE_PARAMS *__pyx_v_params_out) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphMemAllocNodeGetParams", 1);
  __Pyx_TraceCall("_cuGraphMemAllocNodeGetParams", __pyx_f[0], 6500, 1, __PYX_ERR(0, 6500, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6501
 * 
 * cdef CUresult _cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphMemAllocNodeGetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphMemAllocNodeGetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6502
 * cdef CUresult _cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphMemAllocNodeGetParams
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphMemAllocNodeGetParams == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6502, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6503
 *     global __cuGraphMemAllocNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphMemAllocNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemAllocNodeGetParams" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemAllocNodeGetParams == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6504
 *     cuPythonInit()
 *     if __cuGraphMemAllocNodeGetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphMemAllocNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_MEM_ALLOC_NODE_PARAMS*) nogil> __cuGraphMemAllocNodeGetParams)(hNode, params_out)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6505
 *     if __cuGraphMemAllocNodeGetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemAllocNodeGetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUDA_MEM_ALLOC_NODE_PARAMS*) nogil> __cuGraphMemAllocNodeGetParams)(hNode, params_out)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__286, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6505, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6505, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6504
 *     cuPythonInit()
 *     if __cuGraphMemAllocNodeGetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphMemAllocNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_MEM_ALLOC_NODE_PARAMS*) nogil> __cuGraphMemAllocNodeGetParams)(hNode, params_out)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6503
 *     global __cuGraphMemAllocNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphMemAllocNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemAllocNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6506
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemAllocNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_MEM_ALLOC_NODE_PARAMS*) nogil> __cuGraphMemAllocNodeGetParams)(hNode, params_out)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUDA_MEM_ALLOC_NODE_PARAMS *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemAllocNodeGetParams)(__pyx_v_hNode, __pyx_v_params_out);

    /* "cuda/_cuda/ccuda.pyx":6507
 *             raise RuntimeError('Function "cuGraphMemAllocNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_MEM_ALLOC_NODE_PARAMS*) nogil> __cuGraphMemAllocNodeGetParams)(hNode, params_out)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6501
 * 
 * cdef CUresult _cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphMemAllocNodeGetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphMemAllocNodeGetParams == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6500
 *     return err
 * 
 * cdef CUresult _cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphMemAllocNodeGetParams
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphMemAllocNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6509
 *     return err
 * 
 * cdef CUresult _cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddMemFreeNode
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemFreeNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUdeviceptr __pyx_v_dptr) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphAddMemFreeNode", 1);
  __Pyx_TraceCall("_cuGraphAddMemFreeNode", __pyx_f[0], 6509, 1, __PYX_ERR(0, 6509, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6510
 * 
 * cdef CUresult _cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphAddMemFreeNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddMemFreeNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6511
 * cdef CUresult _cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphAddMemFreeNode
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphAddMemFreeNode == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6511, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6512
 *     global __cuGraphAddMemFreeNode
 *     cuPythonInit()
 *     if __cuGraphAddMemFreeNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemFreeNode" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemFreeNode == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6513
 *     cuPythonInit()
 *     if __cuGraphAddMemFreeNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddMemFreeNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUdeviceptr) nogil> __cuGraphAddMemFreeNode)(phGraphNode, hGraph, dependencies, numDependencies, dptr)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6514
 *     if __cuGraphAddMemFreeNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemFreeNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUdeviceptr) nogil> __cuGraphAddMemFreeNode)(phGraphNode, hGraph, dependencies, numDependencies, dptr)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__287, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6514, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6514, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6513
 *     cuPythonInit()
 *     if __cuGraphAddMemFreeNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddMemFreeNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUdeviceptr) nogil> __cuGraphAddMemFreeNode)(phGraphNode, hGraph, dependencies, numDependencies, dptr)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6512
 *     global __cuGraphAddMemFreeNode
 *     cuPythonInit()
 *     if __cuGraphAddMemFreeNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemFreeNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6515
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemFreeNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUdeviceptr) nogil> __cuGraphAddMemFreeNode)(phGraphNode, hGraph, dependencies, numDependencies, dptr)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUdeviceptr))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemFreeNode)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_dptr);

    /* "cuda/_cuda/ccuda.pyx":6516
 *             raise RuntimeError('Function "cuGraphAddMemFreeNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUdeviceptr) nogil> __cuGraphAddMemFreeNode)(phGraphNode, hGraph, dependencies, numDependencies, dptr)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6510
 * 
 * cdef CUresult _cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphAddMemFreeNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddMemFreeNode == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6509
 *     return err
 * 
 * cdef CUresult _cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddMemFreeNode
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphAddMemFreeNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6518
 *     return err
 * 
 * cdef CUresult _cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphMemFreeNodeGetParams
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemFreeNodeGetParams(CUgraphNode __pyx_v_hNode, CUdeviceptr *__pyx_v_dptr_out) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphMemFreeNodeGetParams", 1);
  __Pyx_TraceCall("_cuGraphMemFreeNodeGetParams", __pyx_f[0], 6518, 1, __PYX_ERR(0, 6518, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6519
 * 
 * cdef CUresult _cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphMemFreeNodeGetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphMemFreeNodeGetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6520
 * cdef CUresult _cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphMemFreeNodeGetParams
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphMemFreeNodeGetParams == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6520, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6521
 *     global __cuGraphMemFreeNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphMemFreeNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemFreeNodeGetParams" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemFreeNodeGetParams == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6522
 *     cuPythonInit()
 *     if __cuGraphMemFreeNodeGetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphMemFreeNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUdeviceptr*) nogil> __cuGraphMemFreeNodeGetParams)(hNode, dptr_out)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6523
 *     if __cuGraphMemFreeNodeGetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemFreeNodeGetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUdeviceptr*) nogil> __cuGraphMemFreeNodeGetParams)(hNode, dptr_out)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__288, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6523, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6523, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6522
 *     cuPythonInit()
 *     if __cuGraphMemFreeNodeGetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphMemFreeNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUdeviceptr*) nogil> __cuGraphMemFreeNodeGetParams)(hNode, dptr_out)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6521
 *     global __cuGraphMemFreeNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphMemFreeNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemFreeNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6524
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemFreeNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUdeviceptr*) nogil> __cuGraphMemFreeNodeGetParams)(hNode, dptr_out)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUdeviceptr *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemFreeNodeGetParams)(__pyx_v_hNode, __pyx_v_dptr_out);

    /* "cuda/_cuda/ccuda.pyx":6525
 *             raise RuntimeError('Function "cuGraphMemFreeNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUdeviceptr*) nogil> __cuGraphMemFreeNodeGetParams)(hNode, dptr_out)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceGraphMemTrim(CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6519
 * 
 * cdef CUresult _cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphMemFreeNodeGetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphMemFreeNodeGetParams == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6518
 *     return err
 * 
 * cdef CUresult _cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphMemFreeNodeGetParams
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphMemFreeNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6527
 *     return err
 * 
 * cdef CUresult _cuDeviceGraphMemTrim(CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGraphMemTrim
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGraphMemTrim(CUdevice __pyx_v_device) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDeviceGraphMemTrim", 1);
  __Pyx_TraceCall("_cuDeviceGraphMemTrim", __pyx_f[0], 6527, 1, __PYX_ERR(0, 6527, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6528
 * 
 * cdef CUresult _cuDeviceGraphMemTrim(CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGraphMemTrim             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGraphMemTrim == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6529
 * cdef CUresult _cuDeviceGraphMemTrim(CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGraphMemTrim
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDeviceGraphMemTrim == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6529, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6530
 *     global __cuDeviceGraphMemTrim
 *     cuPythonInit()
 *     if __cuDeviceGraphMemTrim == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGraphMemTrim" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGraphMemTrim == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6531
 *     cuPythonInit()
 *     if __cuDeviceGraphMemTrim == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGraphMemTrim" not found')
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDeviceGraphMemTrim)(device)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6532
 *     if __cuDeviceGraphMemTrim == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGraphMemTrim" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDeviceGraphMemTrim)(device)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__289, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6532, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6532, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6531
 *     cuPythonInit()
 *     if __cuDeviceGraphMemTrim == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGraphMemTrim" not found')
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDeviceGraphMemTrim)(device)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6530
 *     global __cuDeviceGraphMemTrim
 *     cuPythonInit()
 *     if __cuDeviceGraphMemTrim == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGraphMemTrim" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6533
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGraphMemTrim" not found')
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDeviceGraphMemTrim)(device)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGraphMemTrim)(__pyx_v_device);

    /* "cuda/_cuda/ccuda.pyx":6534
 *             raise RuntimeError('Function "cuDeviceGraphMemTrim" not found')
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDeviceGraphMemTrim)(device)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6528
 * 
 * cdef CUresult _cuDeviceGraphMemTrim(CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGraphMemTrim             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGraphMemTrim == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6527
 *     return err
 * 
 * cdef CUresult _cuDeviceGraphMemTrim(CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGraphMemTrim
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDeviceGraphMemTrim", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6536
 *     return err
 * 
 * cdef CUresult _cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetGraphMemAttribute
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetGraphMemAttribute(CUdevice __pyx_v_device, CUgraphMem_attribute __pyx_v_attr, void *__pyx_v_value) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDeviceGetGraphMemAttribute", 1);
  __Pyx_TraceCall("_cuDeviceGetGraphMemAttribute", __pyx_f[0], 6536, 1, __PYX_ERR(0, 6536, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6537
 * 
 * cdef CUresult _cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetGraphMemAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetGraphMemAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6538
 * cdef CUresult _cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetGraphMemAttribute
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDeviceGetGraphMemAttribute == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6538, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6539
 *     global __cuDeviceGetGraphMemAttribute
 *     cuPythonInit()
 *     if __cuDeviceGetGraphMemAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetGraphMemAttribute" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetGraphMemAttribute == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6540
 *     cuPythonInit()
 *     if __cuDeviceGetGraphMemAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetGraphMemAttribute" not found')
 *     err = (<CUresult (*)(CUdevice, CUgraphMem_attribute, void*) nogil> __cuDeviceGetGraphMemAttribute)(device, attr, value)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6541
 *     if __cuDeviceGetGraphMemAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetGraphMemAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice, CUgraphMem_attribute, void*) nogil> __cuDeviceGetGraphMemAttribute)(device, attr, value)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__290, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6541, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6541, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6540
 *     cuPythonInit()
 *     if __cuDeviceGetGraphMemAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetGraphMemAttribute" not found')
 *     err = (<CUresult (*)(CUdevice, CUgraphMem_attribute, void*) nogil> __cuDeviceGetGraphMemAttribute)(device, attr, value)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6539
 *     global __cuDeviceGetGraphMemAttribute
 *     cuPythonInit()
 *     if __cuDeviceGetGraphMemAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetGraphMemAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6542
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetGraphMemAttribute" not found')
 *     err = (<CUresult (*)(CUdevice, CUgraphMem_attribute, void*) nogil> __cuDeviceGetGraphMemAttribute)(device, attr, value)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdevice, CUgraphMem_attribute, void *))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetGraphMemAttribute)(__pyx_v_device, __pyx_v_attr, __pyx_v_value);

    /* "cuda/_cuda/ccuda.pyx":6543
 *             raise RuntimeError('Function "cuDeviceGetGraphMemAttribute" not found')
 *     err = (<CUresult (*)(CUdevice, CUgraphMem_attribute, void*) nogil> __cuDeviceGetGraphMemAttribute)(device, attr, value)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6537
 * 
 * cdef CUresult _cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetGraphMemAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetGraphMemAttribute == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6536
 *     return err
 * 
 * cdef CUresult _cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetGraphMemAttribute
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDeviceGetGraphMemAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6545
 *     return err
 * 
 * cdef CUresult _cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceSetGraphMemAttribute
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceSetGraphMemAttribute(CUdevice __pyx_v_device, CUgraphMem_attribute __pyx_v_attr, void *__pyx_v_value) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDeviceSetGraphMemAttribute", 1);
  __Pyx_TraceCall("_cuDeviceSetGraphMemAttribute", __pyx_f[0], 6545, 1, __PYX_ERR(0, 6545, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6546
 * 
 * cdef CUresult _cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceSetGraphMemAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceSetGraphMemAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6547
 * cdef CUresult _cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceSetGraphMemAttribute
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDeviceSetGraphMemAttribute == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6547, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6548
 *     global __cuDeviceSetGraphMemAttribute
 *     cuPythonInit()
 *     if __cuDeviceSetGraphMemAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceSetGraphMemAttribute" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceSetGraphMemAttribute == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6549
 *     cuPythonInit()
 *     if __cuDeviceSetGraphMemAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceSetGraphMemAttribute" not found')
 *     err = (<CUresult (*)(CUdevice, CUgraphMem_attribute, void*) nogil> __cuDeviceSetGraphMemAttribute)(device, attr, value)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6550
 *     if __cuDeviceSetGraphMemAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceSetGraphMemAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice, CUgraphMem_attribute, void*) nogil> __cuDeviceSetGraphMemAttribute)(device, attr, value)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__291, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6550, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6550, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6549
 *     cuPythonInit()
 *     if __cuDeviceSetGraphMemAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceSetGraphMemAttribute" not found')
 *     err = (<CUresult (*)(CUdevice, CUgraphMem_attribute, void*) nogil> __cuDeviceSetGraphMemAttribute)(device, attr, value)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6548
 *     global __cuDeviceSetGraphMemAttribute
 *     cuPythonInit()
 *     if __cuDeviceSetGraphMemAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceSetGraphMemAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6551
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceSetGraphMemAttribute" not found')
 *     err = (<CUresult (*)(CUdevice, CUgraphMem_attribute, void*) nogil> __cuDeviceSetGraphMemAttribute)(device, attr, value)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdevice, CUgraphMem_attribute, void *))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceSetGraphMemAttribute)(__pyx_v_device, __pyx_v_attr, __pyx_v_value);

    /* "cuda/_cuda/ccuda.pyx":6552
 *             raise RuntimeError('Function "cuDeviceSetGraphMemAttribute" not found')
 *     err = (<CUresult (*)(CUdevice, CUgraphMem_attribute, void*) nogil> __cuDeviceSetGraphMemAttribute)(device, attr, value)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6546
 * 
 * cdef CUresult _cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceSetGraphMemAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceSetGraphMemAttribute == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6545
 *     return err
 * 
 * cdef CUresult _cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceSetGraphMemAttribute
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDeviceSetGraphMemAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6554
 *     return err
 * 
 * cdef CUresult _cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphClone
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphClone(CUgraph *__pyx_v_phGraphClone, CUgraph __pyx_v_originalGraph) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphClone", 1);
  __Pyx_TraceCall("_cuGraphClone", __pyx_f[0], 6554, 1, __PYX_ERR(0, 6554, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6555
 * 
 * cdef CUresult _cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphClone             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphClone == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6556
 * cdef CUresult _cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphClone
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphClone == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6556, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6557
 *     global __cuGraphClone
 *     cuPythonInit()
 *     if __cuGraphClone == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphClone" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphClone == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6558
 *     cuPythonInit()
 *     if __cuGraphClone == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphClone" not found')
 *     err = (<CUresult (*)(CUgraph*, CUgraph) nogil> __cuGraphClone)(phGraphClone, originalGraph)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6559
 *     if __cuGraphClone == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphClone" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph*, CUgraph) nogil> __cuGraphClone)(phGraphClone, originalGraph)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__292, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6559, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6559, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6558
 *     cuPythonInit()
 *     if __cuGraphClone == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphClone" not found')
 *     err = (<CUresult (*)(CUgraph*, CUgraph) nogil> __cuGraphClone)(phGraphClone, originalGraph)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6557
 *     global __cuGraphClone
 *     cuPythonInit()
 *     if __cuGraphClone == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphClone" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6560
 *         with gil:
 *             raise RuntimeError('Function "cuGraphClone" not found')
 *     err = (<CUresult (*)(CUgraph*, CUgraph) nogil> __cuGraphClone)(phGraphClone, originalGraph)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraph *, CUgraph))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphClone)(__pyx_v_phGraphClone, __pyx_v_originalGraph);

    /* "cuda/_cuda/ccuda.pyx":6561
 *             raise RuntimeError('Function "cuGraphClone" not found')
 *     err = (<CUresult (*)(CUgraph*, CUgraph) nogil> __cuGraphClone)(phGraphClone, originalGraph)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6555
 * 
 * cdef CUresult _cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphClone             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphClone == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6554
 *     return err
 * 
 * cdef CUresult _cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphClone
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphClone", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6563
 *     return err
 * 
 * cdef CUresult _cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphNodeFindInClone
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeFindInClone(CUgraphNode *__pyx_v_phNode, CUgraphNode __pyx_v_hOriginalNode, CUgraph __pyx_v_hClonedGraph) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphNodeFindInClone", 1);
  __Pyx_TraceCall("_cuGraphNodeFindInClone", __pyx_f[0], 6563, 1, __PYX_ERR(0, 6563, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6564
 * 
 * cdef CUresult _cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphNodeFindInClone             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphNodeFindInClone == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6565
 * cdef CUresult _cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphNodeFindInClone
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphNodeFindInClone == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6565, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6566
 *     global __cuGraphNodeFindInClone
 *     cuPythonInit()
 *     if __cuGraphNodeFindInClone == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeFindInClone" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeFindInClone == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6567
 *     cuPythonInit()
 *     if __cuGraphNodeFindInClone == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphNodeFindInClone" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraphNode, CUgraph) nogil> __cuGraphNodeFindInClone)(phNode, hOriginalNode, hClonedGraph)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6568
 *     if __cuGraphNodeFindInClone == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeFindInClone" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraphNode, CUgraph) nogil> __cuGraphNodeFindInClone)(phNode, hOriginalNode, hClonedGraph)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__293, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6568, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6568, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6567
 *     cuPythonInit()
 *     if __cuGraphNodeFindInClone == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphNodeFindInClone" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraphNode, CUgraph) nogil> __cuGraphNodeFindInClone)(phNode, hOriginalNode, hClonedGraph)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6566
 *     global __cuGraphNodeFindInClone
 *     cuPythonInit()
 *     if __cuGraphNodeFindInClone == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeFindInClone" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6569
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeFindInClone" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraphNode, CUgraph) nogil> __cuGraphNodeFindInClone)(phNode, hOriginalNode, hClonedGraph)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode *, CUgraphNode, CUgraph))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeFindInClone)(__pyx_v_phNode, __pyx_v_hOriginalNode, __pyx_v_hClonedGraph);

    /* "cuda/_cuda/ccuda.pyx":6570
 *             raise RuntimeError('Function "cuGraphNodeFindInClone" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraphNode, CUgraph) nogil> __cuGraphNodeFindInClone)(phNode, hOriginalNode, hClonedGraph)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6564
 * 
 * cdef CUresult _cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphNodeFindInClone             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphNodeFindInClone == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6563
 *     return err
 * 
 * cdef CUresult _cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphNodeFindInClone
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphNodeFindInClone", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6572
 *     return err
 * 
 * cdef CUresult _cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphNodeGetType
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetType(CUgraphNode __pyx_v_hNode, CUgraphNodeType *__pyx_v_typename) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphNodeGetType", 1);
  __Pyx_TraceCall("_cuGraphNodeGetType", __pyx_f[0], 6572, 1, __PYX_ERR(0, 6572, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6573
 * 
 * cdef CUresult _cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphNodeGetType             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphNodeGetType == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6574
 * cdef CUresult _cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphNodeGetType
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphNodeGetType == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6574, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6575
 *     global __cuGraphNodeGetType
 *     cuPythonInit()
 *     if __cuGraphNodeGetType == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetType" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetType == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6576
 *     cuPythonInit()
 *     if __cuGraphNodeGetType == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphNodeGetType" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNodeType*) nogil> __cuGraphNodeGetType)(hNode, typename)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6577
 *     if __cuGraphNodeGetType == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetType" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNodeType*) nogil> __cuGraphNodeGetType)(hNode, typename)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__294, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6577, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6577, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6576
 *     cuPythonInit()
 *     if __cuGraphNodeGetType == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphNodeGetType" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNodeType*) nogil> __cuGraphNodeGetType)(hNode, typename)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6575
 *     global __cuGraphNodeGetType
 *     cuPythonInit()
 *     if __cuGraphNodeGetType == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetType" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6578
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetType" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNodeType*) nogil> __cuGraphNodeGetType)(hNode, typename)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUgraphNodeType *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetType)(__pyx_v_hNode, __pyx_v_typename);

    /* "cuda/_cuda/ccuda.pyx":6579
 *             raise RuntimeError('Function "cuGraphNodeGetType" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNodeType*) nogil> __cuGraphNodeGetType)(hNode, typename)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6573
 * 
 * cdef CUresult _cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphNodeGetType             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphNodeGetType == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6572
 *     return err
 * 
 * cdef CUresult _cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphNodeGetType
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphNodeGetType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6581
 *     return err
 * 
 * cdef CUresult _cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphGetNodes
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphGetNodes(CUgraph __pyx_v_hGraph, CUgraphNode *__pyx_v_nodes, size_t *__pyx_v_numNodes) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphGetNodes", 1);
  __Pyx_TraceCall("_cuGraphGetNodes", __pyx_f[0], 6581, 1, __PYX_ERR(0, 6581, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6582
 * 
 * cdef CUresult _cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphGetNodes             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphGetNodes == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6583
 * cdef CUresult _cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphGetNodes
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphGetNodes == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6583, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6584
 *     global __cuGraphGetNodes
 *     cuPythonInit()
 *     if __cuGraphGetNodes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphGetNodes" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphGetNodes == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6585
 *     cuPythonInit()
 *     if __cuGraphGetNodes == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphGetNodes" not found')
 *     err = (<CUresult (*)(CUgraph, CUgraphNode*, size_t*) nogil> __cuGraphGetNodes)(hGraph, nodes, numNodes)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6586
 *     if __cuGraphGetNodes == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphGetNodes" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph, CUgraphNode*, size_t*) nogil> __cuGraphGetNodes)(hGraph, nodes, numNodes)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__295, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6586, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6586, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6585
 *     cuPythonInit()
 *     if __cuGraphGetNodes == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphGetNodes" not found')
 *     err = (<CUresult (*)(CUgraph, CUgraphNode*, size_t*) nogil> __cuGraphGetNodes)(hGraph, nodes, numNodes)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6584
 *     global __cuGraphGetNodes
 *     cuPythonInit()
 *     if __cuGraphGetNodes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphGetNodes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6587
 *         with gil:
 *             raise RuntimeError('Function "cuGraphGetNodes" not found')
 *     err = (<CUresult (*)(CUgraph, CUgraphNode*, size_t*) nogil> __cuGraphGetNodes)(hGraph, nodes, numNodes)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraph, CUgraphNode *, size_t *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphGetNodes)(__pyx_v_hGraph, __pyx_v_nodes, __pyx_v_numNodes);

    /* "cuda/_cuda/ccuda.pyx":6588
 *             raise RuntimeError('Function "cuGraphGetNodes" not found')
 *     err = (<CUresult (*)(CUgraph, CUgraphNode*, size_t*) nogil> __cuGraphGetNodes)(hGraph, nodes, numNodes)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6582
 * 
 * cdef CUresult _cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphGetNodes             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphGetNodes == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6581
 *     return err
 * 
 * cdef CUresult _cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphGetNodes
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphGetNodes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6590
 *     return err
 * 
 * cdef CUresult _cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphGetRootNodes
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphGetRootNodes(CUgraph __pyx_v_hGraph, CUgraphNode *__pyx_v_rootNodes, size_t *__pyx_v_numRootNodes) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphGetRootNodes", 1);
  __Pyx_TraceCall("_cuGraphGetRootNodes", __pyx_f[0], 6590, 1, __PYX_ERR(0, 6590, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6591
 * 
 * cdef CUresult _cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphGetRootNodes             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphGetRootNodes == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6592
 * cdef CUresult _cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphGetRootNodes
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphGetRootNodes == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6592, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6593
 *     global __cuGraphGetRootNodes
 *     cuPythonInit()
 *     if __cuGraphGetRootNodes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphGetRootNodes" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphGetRootNodes == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6594
 *     cuPythonInit()
 *     if __cuGraphGetRootNodes == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphGetRootNodes" not found')
 *     err = (<CUresult (*)(CUgraph, CUgraphNode*, size_t*) nogil> __cuGraphGetRootNodes)(hGraph, rootNodes, numRootNodes)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6595
 *     if __cuGraphGetRootNodes == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphGetRootNodes" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph, CUgraphNode*, size_t*) nogil> __cuGraphGetRootNodes)(hGraph, rootNodes, numRootNodes)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__296, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6595, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6595, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6594
 *     cuPythonInit()
 *     if __cuGraphGetRootNodes == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphGetRootNodes" not found')
 *     err = (<CUresult (*)(CUgraph, CUgraphNode*, size_t*) nogil> __cuGraphGetRootNodes)(hGraph, rootNodes, numRootNodes)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6593
 *     global __cuGraphGetRootNodes
 *     cuPythonInit()
 *     if __cuGraphGetRootNodes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphGetRootNodes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6596
 *         with gil:
 *             raise RuntimeError('Function "cuGraphGetRootNodes" not found')
 *     err = (<CUresult (*)(CUgraph, CUgraphNode*, size_t*) nogil> __cuGraphGetRootNodes)(hGraph, rootNodes, numRootNodes)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraph, CUgraphNode *, size_t *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphGetRootNodes)(__pyx_v_hGraph, __pyx_v_rootNodes, __pyx_v_numRootNodes);

    /* "cuda/_cuda/ccuda.pyx":6597
 *             raise RuntimeError('Function "cuGraphGetRootNodes" not found')
 *     err = (<CUresult (*)(CUgraph, CUgraphNode*, size_t*) nogil> __cuGraphGetRootNodes)(hGraph, rootNodes, numRootNodes)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6591
 * 
 * cdef CUresult _cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphGetRootNodes             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphGetRootNodes == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6590
 *     return err
 * 
 * cdef CUresult _cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphGetRootNodes
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphGetRootNodes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6599
 *     return err
 * 
 * cdef CUresult _cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphGetEdges
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphGetEdges(CUgraph __pyx_v_hGraph, CUgraphNode *__pyx_v_from_, CUgraphNode *__pyx_v_to, size_t *__pyx_v_numEdges) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphGetEdges", 1);
  __Pyx_TraceCall("_cuGraphGetEdges", __pyx_f[0], 6599, 1, __PYX_ERR(0, 6599, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6600
 * 
 * cdef CUresult _cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphGetEdges             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphGetEdges == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6601
 * cdef CUresult _cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphGetEdges
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphGetEdges == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6601, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6602
 *     global __cuGraphGetEdges
 *     cuPythonInit()
 *     if __cuGraphGetEdges == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphGetEdges" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphGetEdges == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6603
 *     cuPythonInit()
 *     if __cuGraphGetEdges == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphGetEdges" not found')
 *     err = (<CUresult (*)(CUgraph, CUgraphNode*, CUgraphNode*, size_t*) nogil> __cuGraphGetEdges)(hGraph, from_, to, numEdges)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6604
 *     if __cuGraphGetEdges == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphGetEdges" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph, CUgraphNode*, CUgraphNode*, size_t*) nogil> __cuGraphGetEdges)(hGraph, from_, to, numEdges)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__297, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6604, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6604, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6603
 *     cuPythonInit()
 *     if __cuGraphGetEdges == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphGetEdges" not found')
 *     err = (<CUresult (*)(CUgraph, CUgraphNode*, CUgraphNode*, size_t*) nogil> __cuGraphGetEdges)(hGraph, from_, to, numEdges)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6602
 *     global __cuGraphGetEdges
 *     cuPythonInit()
 *     if __cuGraphGetEdges == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphGetEdges" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6605
 *         with gil:
 *             raise RuntimeError('Function "cuGraphGetEdges" not found')
 *     err = (<CUresult (*)(CUgraph, CUgraphNode*, CUgraphNode*, size_t*) nogil> __cuGraphGetEdges)(hGraph, from_, to, numEdges)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraph, CUgraphNode *, CUgraphNode *, size_t *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphGetEdges)(__pyx_v_hGraph, __pyx_v_from_, __pyx_v_to, __pyx_v_numEdges);

    /* "cuda/_cuda/ccuda.pyx":6606
 *             raise RuntimeError('Function "cuGraphGetEdges" not found')
 *     err = (<CUresult (*)(CUgraph, CUgraphNode*, CUgraphNode*, size_t*) nogil> __cuGraphGetEdges)(hGraph, from_, to, numEdges)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6600
 * 
 * cdef CUresult _cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphGetEdges             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphGetEdges == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6599
 *     return err
 * 
 * cdef CUresult _cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphGetEdges
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphGetEdges", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6608
 *     return err
 * 
 * cdef CUresult _cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphNodeGetDependencies
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetDependencies(CUgraphNode __pyx_v_hNode, CUgraphNode *__pyx_v_dependencies, size_t *__pyx_v_numDependencies) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphNodeGetDependencies", 1);
  __Pyx_TraceCall("_cuGraphNodeGetDependencies", __pyx_f[0], 6608, 1, __PYX_ERR(0, 6608, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6609
 * 
 * cdef CUresult _cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphNodeGetDependencies             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphNodeGetDependencies == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6610
 * cdef CUresult _cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphNodeGetDependencies
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphNodeGetDependencies == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6610, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6611
 *     global __cuGraphNodeGetDependencies
 *     cuPythonInit()
 *     if __cuGraphNodeGetDependencies == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetDependencies" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetDependencies == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6612
 *     cuPythonInit()
 *     if __cuGraphNodeGetDependencies == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphNodeGetDependencies" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNode*, size_t*) nogil> __cuGraphNodeGetDependencies)(hNode, dependencies, numDependencies)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6613
 *     if __cuGraphNodeGetDependencies == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetDependencies" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNode*, size_t*) nogil> __cuGraphNodeGetDependencies)(hNode, dependencies, numDependencies)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__298, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6613, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6613, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6612
 *     cuPythonInit()
 *     if __cuGraphNodeGetDependencies == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphNodeGetDependencies" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNode*, size_t*) nogil> __cuGraphNodeGetDependencies)(hNode, dependencies, numDependencies)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6611
 *     global __cuGraphNodeGetDependencies
 *     cuPythonInit()
 *     if __cuGraphNodeGetDependencies == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetDependencies" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6614
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetDependencies" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNode*, size_t*) nogil> __cuGraphNodeGetDependencies)(hNode, dependencies, numDependencies)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUgraphNode *, size_t *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetDependencies)(__pyx_v_hNode, __pyx_v_dependencies, __pyx_v_numDependencies);

    /* "cuda/_cuda/ccuda.pyx":6615
 *             raise RuntimeError('Function "cuGraphNodeGetDependencies" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNode*, size_t*) nogil> __cuGraphNodeGetDependencies)(hNode, dependencies, numDependencies)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6609
 * 
 * cdef CUresult _cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphNodeGetDependencies             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphNodeGetDependencies == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6608
 *     return err
 * 
 * cdef CUresult _cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphNodeGetDependencies
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphNodeGetDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6617
 *     return err
 * 
 * cdef CUresult _cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphNodeGetDependentNodes
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetDependentNodes(CUgraphNode __pyx_v_hNode, CUgraphNode *__pyx_v_dependentNodes, size_t *__pyx_v_numDependentNodes) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphNodeGetDependentNodes", 1);
  __Pyx_TraceCall("_cuGraphNodeGetDependentNodes", __pyx_f[0], 6617, 1, __PYX_ERR(0, 6617, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6618
 * 
 * cdef CUresult _cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphNodeGetDependentNodes             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphNodeGetDependentNodes == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6619
 * cdef CUresult _cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphNodeGetDependentNodes
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphNodeGetDependentNodes == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6619, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6620
 *     global __cuGraphNodeGetDependentNodes
 *     cuPythonInit()
 *     if __cuGraphNodeGetDependentNodes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetDependentNodes" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetDependentNodes == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6621
 *     cuPythonInit()
 *     if __cuGraphNodeGetDependentNodes == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphNodeGetDependentNodes" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNode*, size_t*) nogil> __cuGraphNodeGetDependentNodes)(hNode, dependentNodes, numDependentNodes)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6622
 *     if __cuGraphNodeGetDependentNodes == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetDependentNodes" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNode*, size_t*) nogil> __cuGraphNodeGetDependentNodes)(hNode, dependentNodes, numDependentNodes)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__299, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6622, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6622, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6621
 *     cuPythonInit()
 *     if __cuGraphNodeGetDependentNodes == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphNodeGetDependentNodes" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNode*, size_t*) nogil> __cuGraphNodeGetDependentNodes)(hNode, dependentNodes, numDependentNodes)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6620
 *     global __cuGraphNodeGetDependentNodes
 *     cuPythonInit()
 *     if __cuGraphNodeGetDependentNodes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetDependentNodes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6623
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetDependentNodes" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNode*, size_t*) nogil> __cuGraphNodeGetDependentNodes)(hNode, dependentNodes, numDependentNodes)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUgraphNode *, size_t *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetDependentNodes)(__pyx_v_hNode, __pyx_v_dependentNodes, __pyx_v_numDependentNodes);

    /* "cuda/_cuda/ccuda.pyx":6624
 *             raise RuntimeError('Function "cuGraphNodeGetDependentNodes" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNode*, size_t*) nogil> __cuGraphNodeGetDependentNodes)(hNode, dependentNodes, numDependentNodes)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6618
 * 
 * cdef CUresult _cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphNodeGetDependentNodes             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphNodeGetDependentNodes == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6617
 *     return err
 * 
 * cdef CUresult _cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphNodeGetDependentNodes
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphNodeGetDependentNodes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6626
 *     return err
 * 
 * cdef CUresult _cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddDependencies
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddDependencies(CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_from_, CUgraphNode const *__pyx_v_to, size_t __pyx_v_numDependencies) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphAddDependencies", 1);
  __Pyx_TraceCall("_cuGraphAddDependencies", __pyx_f[0], 6626, 1, __PYX_ERR(0, 6626, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6627
 * 
 * cdef CUresult _cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphAddDependencies             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddDependencies == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6628
 * cdef CUresult _cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphAddDependencies
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphAddDependencies == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6628, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6629
 *     global __cuGraphAddDependencies
 *     cuPythonInit()
 *     if __cuGraphAddDependencies == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddDependencies" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddDependencies == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6630
 *     cuPythonInit()
 *     if __cuGraphAddDependencies == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddDependencies" not found')
 *     err = (<CUresult (*)(CUgraph, const CUgraphNode*, const CUgraphNode*, size_t) nogil> __cuGraphAddDependencies)(hGraph, from_, to, numDependencies)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6631
 *     if __cuGraphAddDependencies == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddDependencies" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph, const CUgraphNode*, const CUgraphNode*, size_t) nogil> __cuGraphAddDependencies)(hGraph, from_, to, numDependencies)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__300, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6631, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6631, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6630
 *     cuPythonInit()
 *     if __cuGraphAddDependencies == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddDependencies" not found')
 *     err = (<CUresult (*)(CUgraph, const CUgraphNode*, const CUgraphNode*, size_t) nogil> __cuGraphAddDependencies)(hGraph, from_, to, numDependencies)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6629
 *     global __cuGraphAddDependencies
 *     cuPythonInit()
 *     if __cuGraphAddDependencies == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddDependencies" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6632
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddDependencies" not found')
 *     err = (<CUresult (*)(CUgraph, const CUgraphNode*, const CUgraphNode*, size_t) nogil> __cuGraphAddDependencies)(hGraph, from_, to, numDependencies)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraph, CUgraphNode const *, CUgraphNode const *, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddDependencies)(__pyx_v_hGraph, __pyx_v_from_, __pyx_v_to, __pyx_v_numDependencies);

    /* "cuda/_cuda/ccuda.pyx":6633
 *             raise RuntimeError('Function "cuGraphAddDependencies" not found')
 *     err = (<CUresult (*)(CUgraph, const CUgraphNode*, const CUgraphNode*, size_t) nogil> __cuGraphAddDependencies)(hGraph, from_, to, numDependencies)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6627
 * 
 * cdef CUresult _cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphAddDependencies             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddDependencies == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6626
 *     return err
 * 
 * cdef CUresult _cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddDependencies
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphAddDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6635
 *     return err
 * 
 * cdef CUresult _cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphRemoveDependencies
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphRemoveDependencies(CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_from_, CUgraphNode const *__pyx_v_to, size_t __pyx_v_numDependencies) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphRemoveDependencies", 1);
  __Pyx_TraceCall("_cuGraphRemoveDependencies", __pyx_f[0], 6635, 1, __PYX_ERR(0, 6635, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6636
 * 
 * cdef CUresult _cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphRemoveDependencies             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphRemoveDependencies == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6637
 * cdef CUresult _cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphRemoveDependencies
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphRemoveDependencies == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6637, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6638
 *     global __cuGraphRemoveDependencies
 *     cuPythonInit()
 *     if __cuGraphRemoveDependencies == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphRemoveDependencies" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphRemoveDependencies == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6639
 *     cuPythonInit()
 *     if __cuGraphRemoveDependencies == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphRemoveDependencies" not found')
 *     err = (<CUresult (*)(CUgraph, const CUgraphNode*, const CUgraphNode*, size_t) nogil> __cuGraphRemoveDependencies)(hGraph, from_, to, numDependencies)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6640
 *     if __cuGraphRemoveDependencies == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphRemoveDependencies" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph, const CUgraphNode*, const CUgraphNode*, size_t) nogil> __cuGraphRemoveDependencies)(hGraph, from_, to, numDependencies)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__301, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6640, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6640, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6639
 *     cuPythonInit()
 *     if __cuGraphRemoveDependencies == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphRemoveDependencies" not found')
 *     err = (<CUresult (*)(CUgraph, const CUgraphNode*, const CUgraphNode*, size_t) nogil> __cuGraphRemoveDependencies)(hGraph, from_, to, numDependencies)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6638
 *     global __cuGraphRemoveDependencies
 *     cuPythonInit()
 *     if __cuGraphRemoveDependencies == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphRemoveDependencies" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6641
 *         with gil:
 *             raise RuntimeError('Function "cuGraphRemoveDependencies" not found')
 *     err = (<CUresult (*)(CUgraph, const CUgraphNode*, const CUgraphNode*, size_t) nogil> __cuGraphRemoveDependencies)(hGraph, from_, to, numDependencies)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraph, CUgraphNode const *, CUgraphNode const *, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphRemoveDependencies)(__pyx_v_hGraph, __pyx_v_from_, __pyx_v_to, __pyx_v_numDependencies);

    /* "cuda/_cuda/ccuda.pyx":6642
 *             raise RuntimeError('Function "cuGraphRemoveDependencies" not found')
 *     err = (<CUresult (*)(CUgraph, const CUgraphNode*, const CUgraphNode*, size_t) nogil> __cuGraphRemoveDependencies)(hGraph, from_, to, numDependencies)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphDestroyNode(CUgraphNode hNode) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6636
 * 
 * cdef CUresult _cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphRemoveDependencies             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphRemoveDependencies == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6635
 *     return err
 * 
 * cdef CUresult _cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphRemoveDependencies
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphRemoveDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6644
 *     return err
 * 
 * cdef CUresult _cuGraphDestroyNode(CUgraphNode hNode) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphDestroyNode
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphDestroyNode(CUgraphNode __pyx_v_hNode) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphDestroyNode", 1);
  __Pyx_TraceCall("_cuGraphDestroyNode", __pyx_f[0], 6644, 1, __PYX_ERR(0, 6644, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6645
 * 
 * cdef CUresult _cuGraphDestroyNode(CUgraphNode hNode) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphDestroyNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphDestroyNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6646
 * cdef CUresult _cuGraphDestroyNode(CUgraphNode hNode) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphDestroyNode
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphDestroyNode == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6646, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6647
 *     global __cuGraphDestroyNode
 *     cuPythonInit()
 *     if __cuGraphDestroyNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDestroyNode" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphDestroyNode == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6648
 *     cuPythonInit()
 *     if __cuGraphDestroyNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphDestroyNode" not found')
 *     err = (<CUresult (*)(CUgraphNode) nogil> __cuGraphDestroyNode)(hNode)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6649
 *     if __cuGraphDestroyNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDestroyNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode) nogil> __cuGraphDestroyNode)(hNode)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__302, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6649, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6649, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6648
 *     cuPythonInit()
 *     if __cuGraphDestroyNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphDestroyNode" not found')
 *     err = (<CUresult (*)(CUgraphNode) nogil> __cuGraphDestroyNode)(hNode)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6647
 *     global __cuGraphDestroyNode
 *     cuPythonInit()
 *     if __cuGraphDestroyNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDestroyNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6650
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDestroyNode" not found')
 *     err = (<CUresult (*)(CUgraphNode) nogil> __cuGraphDestroyNode)(hNode)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphDestroyNode)(__pyx_v_hNode);

    /* "cuda/_cuda/ccuda.pyx":6651
 *             raise RuntimeError('Function "cuGraphDestroyNode" not found')
 *     err = (<CUresult (*)(CUgraphNode) nogil> __cuGraphDestroyNode)(hNode)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphInstantiateWithFlags(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6645
 * 
 * cdef CUresult _cuGraphDestroyNode(CUgraphNode hNode) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphDestroyNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphDestroyNode == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6644
 *     return err
 * 
 * cdef CUresult _cuGraphDestroyNode(CUgraphNode hNode) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphDestroyNode
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphDestroyNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6653
 *     return err
 * 
 * cdef CUresult _cuGraphInstantiateWithFlags(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphInstantiateWithFlags
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphInstantiateWithFlags(CUgraphExec *__pyx_v_phGraphExec, CUgraph __pyx_v_hGraph, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphInstantiateWithFlags", 1);
  __Pyx_TraceCall("_cuGraphInstantiateWithFlags", __pyx_f[0], 6653, 1, __PYX_ERR(0, 6653, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6654
 * 
 * cdef CUresult _cuGraphInstantiateWithFlags(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphInstantiateWithFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphInstantiateWithFlags == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6655
 * cdef CUresult _cuGraphInstantiateWithFlags(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphInstantiateWithFlags
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphInstantiateWithFlags == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6655, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6656
 *     global __cuGraphInstantiateWithFlags
 *     cuPythonInit()
 *     if __cuGraphInstantiateWithFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphInstantiateWithFlags" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphInstantiateWithFlags == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6657
 *     cuPythonInit()
 *     if __cuGraphInstantiateWithFlags == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphInstantiateWithFlags" not found')
 *     err = (<CUresult (*)(CUgraphExec*, CUgraph, unsigned long long) nogil> __cuGraphInstantiateWithFlags)(phGraphExec, hGraph, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6658
 *     if __cuGraphInstantiateWithFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphInstantiateWithFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec*, CUgraph, unsigned long long) nogil> __cuGraphInstantiateWithFlags)(phGraphExec, hGraph, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__303, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6658, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6658, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6657
 *     cuPythonInit()
 *     if __cuGraphInstantiateWithFlags == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphInstantiateWithFlags" not found')
 *     err = (<CUresult (*)(CUgraphExec*, CUgraph, unsigned long long) nogil> __cuGraphInstantiateWithFlags)(phGraphExec, hGraph, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6656
 *     global __cuGraphInstantiateWithFlags
 *     cuPythonInit()
 *     if __cuGraphInstantiateWithFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphInstantiateWithFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6659
 *         with gil:
 *             raise RuntimeError('Function "cuGraphInstantiateWithFlags" not found')
 *     err = (<CUresult (*)(CUgraphExec*, CUgraph, unsigned long long) nogil> __cuGraphInstantiateWithFlags)(phGraphExec, hGraph, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphExec *, CUgraph, unsigned PY_LONG_LONG))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphInstantiateWithFlags)(__pyx_v_phGraphExec, __pyx_v_hGraph, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":6660
 *             raise RuntimeError('Function "cuGraphInstantiateWithFlags" not found')
 *     err = (<CUresult (*)(CUgraphExec*, CUgraph, unsigned long long) nogil> __cuGraphInstantiateWithFlags)(phGraphExec, hGraph, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphInstantiateWithParams(CUgraphExec* phGraphExec, CUgraph hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS* instantiateParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6654
 * 
 * cdef CUresult _cuGraphInstantiateWithFlags(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphInstantiateWithFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphInstantiateWithFlags == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6653
 *     return err
 * 
 * cdef CUresult _cuGraphInstantiateWithFlags(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphInstantiateWithFlags
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphInstantiateWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6662
 *     return err
 * 
 * cdef CUresult _cuGraphInstantiateWithParams(CUgraphExec* phGraphExec, CUgraph hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS* instantiateParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphInstantiateWithParams
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphInstantiateWithParams(CUgraphExec *__pyx_v_phGraphExec, CUgraph __pyx_v_hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS *__pyx_v_instantiateParams) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphInstantiateWithParams", 1);
  __Pyx_TraceCall("_cuGraphInstantiateWithParams", __pyx_f[0], 6662, 1, __PYX_ERR(0, 6662, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6663
 * 
 * cdef CUresult _cuGraphInstantiateWithParams(CUgraphExec* phGraphExec, CUgraph hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS* instantiateParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphInstantiateWithParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphInstantiateWithParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6664
 * cdef CUresult _cuGraphInstantiateWithParams(CUgraphExec* phGraphExec, CUgraph hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS* instantiateParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphInstantiateWithParams
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphInstantiateWithParams == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6664, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6665
 *     global __cuGraphInstantiateWithParams
 *     cuPythonInit()
 *     if __cuGraphInstantiateWithParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphInstantiateWithParams" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphInstantiateWithParams == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6666
 *     cuPythonInit()
 *     if __cuGraphInstantiateWithParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphInstantiateWithParams" not found')
 *     err = (<CUresult (*)(CUgraphExec*, CUgraph, CUDA_GRAPH_INSTANTIATE_PARAMS*) nogil> __cuGraphInstantiateWithParams)(phGraphExec, hGraph, instantiateParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6667
 *     if __cuGraphInstantiateWithParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphInstantiateWithParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec*, CUgraph, CUDA_GRAPH_INSTANTIATE_PARAMS*) nogil> __cuGraphInstantiateWithParams)(phGraphExec, hGraph, instantiateParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__304, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6667, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6667, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6666
 *     cuPythonInit()
 *     if __cuGraphInstantiateWithParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphInstantiateWithParams" not found')
 *     err = (<CUresult (*)(CUgraphExec*, CUgraph, CUDA_GRAPH_INSTANTIATE_PARAMS*) nogil> __cuGraphInstantiateWithParams)(phGraphExec, hGraph, instantiateParams)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6665
 *     global __cuGraphInstantiateWithParams
 *     cuPythonInit()
 *     if __cuGraphInstantiateWithParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphInstantiateWithParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6668
 *         with gil:
 *             raise RuntimeError('Function "cuGraphInstantiateWithParams" not found')
 *     err = (<CUresult (*)(CUgraphExec*, CUgraph, CUDA_GRAPH_INSTANTIATE_PARAMS*) nogil> __cuGraphInstantiateWithParams)(phGraphExec, hGraph, instantiateParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphExec *, CUgraph, CUDA_GRAPH_INSTANTIATE_PARAMS *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphInstantiateWithParams)(__pyx_v_phGraphExec, __pyx_v_hGraph, __pyx_v_instantiateParams);

    /* "cuda/_cuda/ccuda.pyx":6669
 *             raise RuntimeError('Function "cuGraphInstantiateWithParams" not found')
 *     err = (<CUresult (*)(CUgraphExec*, CUgraph, CUDA_GRAPH_INSTANTIATE_PARAMS*) nogil> __cuGraphInstantiateWithParams)(phGraphExec, hGraph, instantiateParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphExecGetFlags(CUgraphExec hGraphExec, cuuint64_t* flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6663
 * 
 * cdef CUresult _cuGraphInstantiateWithParams(CUgraphExec* phGraphExec, CUgraph hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS* instantiateParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphInstantiateWithParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphInstantiateWithParams == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6662
 *     return err
 * 
 * cdef CUresult _cuGraphInstantiateWithParams(CUgraphExec* phGraphExec, CUgraph hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS* instantiateParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphInstantiateWithParams
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphInstantiateWithParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6671
 *     return err
 * 
 * cdef CUresult _cuGraphExecGetFlags(CUgraphExec hGraphExec, cuuint64_t* flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecGetFlags
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecGetFlags(CUgraphExec __pyx_v_hGraphExec, cuuint64_t *__pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphExecGetFlags", 1);
  __Pyx_TraceCall("_cuGraphExecGetFlags", __pyx_f[0], 6671, 1, __PYX_ERR(0, 6671, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6672
 * 
 * cdef CUresult _cuGraphExecGetFlags(CUgraphExec hGraphExec, cuuint64_t* flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecGetFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecGetFlags == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6673
 * cdef CUresult _cuGraphExecGetFlags(CUgraphExec hGraphExec, cuuint64_t* flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecGetFlags
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphExecGetFlags == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6673, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6674
 *     global __cuGraphExecGetFlags
 *     cuPythonInit()
 *     if __cuGraphExecGetFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecGetFlags" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecGetFlags == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6675
 *     cuPythonInit()
 *     if __cuGraphExecGetFlags == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecGetFlags" not found')
 *     err = (<CUresult (*)(CUgraphExec, cuuint64_t*) nogil> __cuGraphExecGetFlags)(hGraphExec, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6676
 *     if __cuGraphExecGetFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecGetFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, cuuint64_t*) nogil> __cuGraphExecGetFlags)(hGraphExec, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__305, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6676, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6676, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6675
 *     cuPythonInit()
 *     if __cuGraphExecGetFlags == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecGetFlags" not found')
 *     err = (<CUresult (*)(CUgraphExec, cuuint64_t*) nogil> __cuGraphExecGetFlags)(hGraphExec, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6674
 *     global __cuGraphExecGetFlags
 *     cuPythonInit()
 *     if __cuGraphExecGetFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecGetFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6677
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecGetFlags" not found')
 *     err = (<CUresult (*)(CUgraphExec, cuuint64_t*) nogil> __cuGraphExecGetFlags)(hGraphExec, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphExec, cuuint64_t *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecGetFlags)(__pyx_v_hGraphExec, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":6678
 *             raise RuntimeError('Function "cuGraphExecGetFlags" not found')
 *     err = (<CUresult (*)(CUgraphExec, cuuint64_t*) nogil> __cuGraphExecGetFlags)(hGraphExec, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphExecKernelNodeSetParams_v2(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6672
 * 
 * cdef CUresult _cuGraphExecGetFlags(CUgraphExec hGraphExec, cuuint64_t* flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecGetFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecGetFlags == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6671
 *     return err
 * 
 * cdef CUresult _cuGraphExecGetFlags(CUgraphExec hGraphExec, cuuint64_t* flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecGetFlags
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphExecGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6680
 *     return err
 * 
 * cdef CUresult _cuGraphExecKernelNodeSetParams_v2(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecKernelNodeSetParams_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecKernelNodeSetParams_v2(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_KERNEL_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphExecKernelNodeSetParams_v2", 1);
  __Pyx_TraceCall("_cuGraphExecKernelNodeSetParams_v2", __pyx_f[0], 6680, 1, __PYX_ERR(0, 6680, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6681
 * 
 * cdef CUresult _cuGraphExecKernelNodeSetParams_v2(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecKernelNodeSetParams_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecKernelNodeSetParams_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6682
 * cdef CUresult _cuGraphExecKernelNodeSetParams_v2(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecKernelNodeSetParams_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphExecKernelNodeSetParams_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6682, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6683
 *     global __cuGraphExecKernelNodeSetParams_v2
 *     cuPythonInit()
 *     if __cuGraphExecKernelNodeSetParams_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecKernelNodeSetParams_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecKernelNodeSetParams_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6684
 *     cuPythonInit()
 *     if __cuGraphExecKernelNodeSetParams_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecKernelNodeSetParams_v2" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphExecKernelNodeSetParams_v2)(hGraphExec, hNode, nodeParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6685
 *     if __cuGraphExecKernelNodeSetParams_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecKernelNodeSetParams_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphExecKernelNodeSetParams_v2)(hGraphExec, hNode, nodeParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__306, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6685, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6685, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6684
 *     cuPythonInit()
 *     if __cuGraphExecKernelNodeSetParams_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecKernelNodeSetParams_v2" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphExecKernelNodeSetParams_v2)(hGraphExec, hNode, nodeParams)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6683
 *     global __cuGraphExecKernelNodeSetParams_v2
 *     cuPythonInit()
 *     if __cuGraphExecKernelNodeSetParams_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecKernelNodeSetParams_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6686
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecKernelNodeSetParams_v2" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphExecKernelNodeSetParams_v2)(hGraphExec, hNode, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphExec, CUgraphNode, CUDA_KERNEL_NODE_PARAMS const *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecKernelNodeSetParams_v2)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":6687
 *             raise RuntimeError('Function "cuGraphExecKernelNodeSetParams_v2" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphExecKernelNodeSetParams_v2)(hGraphExec, hNode, nodeParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6681
 * 
 * cdef CUresult _cuGraphExecKernelNodeSetParams_v2(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecKernelNodeSetParams_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecKernelNodeSetParams_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6680
 *     return err
 * 
 * cdef CUresult _cuGraphExecKernelNodeSetParams_v2(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecKernelNodeSetParams_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphExecKernelNodeSetParams_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6689
 *     return err
 * 
 * cdef CUresult _cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecMemcpyNodeSetParams
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecMemcpyNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_MEMCPY3D const *__pyx_v_copyParams, CUcontext __pyx_v_ctx) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphExecMemcpyNodeSetParams", 1);
  __Pyx_TraceCall("_cuGraphExecMemcpyNodeSetParams", __pyx_f[0], 6689, 1, __PYX_ERR(0, 6689, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6690
 * 
 * cdef CUresult _cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecMemcpyNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecMemcpyNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6691
 * cdef CUresult _cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecMemcpyNodeSetParams
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphExecMemcpyNodeSetParams == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6691, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6692
 *     global __cuGraphExecMemcpyNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecMemcpyNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecMemcpyNodeSetParams" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecMemcpyNodeSetParams == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6693
 *     cuPythonInit()
 *     if __cuGraphExecMemcpyNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecMemcpyNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_MEMCPY3D*, CUcontext) nogil> __cuGraphExecMemcpyNodeSetParams)(hGraphExec, hNode, copyParams, ctx)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6694
 *     if __cuGraphExecMemcpyNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecMemcpyNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_MEMCPY3D*, CUcontext) nogil> __cuGraphExecMemcpyNodeSetParams)(hGraphExec, hNode, copyParams, ctx)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__307, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6694, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6694, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6693
 *     cuPythonInit()
 *     if __cuGraphExecMemcpyNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecMemcpyNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_MEMCPY3D*, CUcontext) nogil> __cuGraphExecMemcpyNodeSetParams)(hGraphExec, hNode, copyParams, ctx)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6692
 *     global __cuGraphExecMemcpyNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecMemcpyNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecMemcpyNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6695
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecMemcpyNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_MEMCPY3D*, CUcontext) nogil> __cuGraphExecMemcpyNodeSetParams)(hGraphExec, hNode, copyParams, ctx)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphExec, CUgraphNode, CUDA_MEMCPY3D const *, CUcontext))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecMemcpyNodeSetParams)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_copyParams, __pyx_v_ctx);

    /* "cuda/_cuda/ccuda.pyx":6696
 *             raise RuntimeError('Function "cuGraphExecMemcpyNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_MEMCPY3D*, CUcontext) nogil> __cuGraphExecMemcpyNodeSetParams)(hGraphExec, hNode, copyParams, ctx)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6690
 * 
 * cdef CUresult _cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecMemcpyNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecMemcpyNodeSetParams == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6689
 *     return err
 * 
 * cdef CUresult _cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecMemcpyNodeSetParams
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphExecMemcpyNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6698
 *     return err
 * 
 * cdef CUresult _cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecMemsetNodeSetParams
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecMemsetNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_MEMSET_NODE_PARAMS const *__pyx_v_memsetParams, CUcontext __pyx_v_ctx) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphExecMemsetNodeSetParams", 1);
  __Pyx_TraceCall("_cuGraphExecMemsetNodeSetParams", __pyx_f[0], 6698, 1, __PYX_ERR(0, 6698, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6699
 * 
 * cdef CUresult _cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecMemsetNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecMemsetNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6700
 * cdef CUresult _cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecMemsetNodeSetParams
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphExecMemsetNodeSetParams == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6700, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6701
 *     global __cuGraphExecMemsetNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecMemsetNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecMemsetNodeSetParams" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecMemsetNodeSetParams == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6702
 *     cuPythonInit()
 *     if __cuGraphExecMemsetNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecMemsetNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_MEMSET_NODE_PARAMS*, CUcontext) nogil> __cuGraphExecMemsetNodeSetParams)(hGraphExec, hNode, memsetParams, ctx)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6703
 *     if __cuGraphExecMemsetNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecMemsetNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_MEMSET_NODE_PARAMS*, CUcontext) nogil> __cuGraphExecMemsetNodeSetParams)(hGraphExec, hNode, memsetParams, ctx)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__308, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6703, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6703, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6702
 *     cuPythonInit()
 *     if __cuGraphExecMemsetNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecMemsetNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_MEMSET_NODE_PARAMS*, CUcontext) nogil> __cuGraphExecMemsetNodeSetParams)(hGraphExec, hNode, memsetParams, ctx)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6701
 *     global __cuGraphExecMemsetNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecMemsetNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecMemsetNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6704
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecMemsetNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_MEMSET_NODE_PARAMS*, CUcontext) nogil> __cuGraphExecMemsetNodeSetParams)(hGraphExec, hNode, memsetParams, ctx)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphExec, CUgraphNode, CUDA_MEMSET_NODE_PARAMS const *, CUcontext))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecMemsetNodeSetParams)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_memsetParams, __pyx_v_ctx);

    /* "cuda/_cuda/ccuda.pyx":6705
 *             raise RuntimeError('Function "cuGraphExecMemsetNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_MEMSET_NODE_PARAMS*, CUcontext) nogil> __cuGraphExecMemsetNodeSetParams)(hGraphExec, hNode, memsetParams, ctx)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6699
 * 
 * cdef CUresult _cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecMemsetNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecMemsetNodeSetParams == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6698
 *     return err
 * 
 * cdef CUresult _cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecMemsetNodeSetParams
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphExecMemsetNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6707
 *     return err
 * 
 * cdef CUresult _cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecHostNodeSetParams
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecHostNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_HOST_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphExecHostNodeSetParams", 1);
  __Pyx_TraceCall("_cuGraphExecHostNodeSetParams", __pyx_f[0], 6707, 1, __PYX_ERR(0, 6707, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6708
 * 
 * cdef CUresult _cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecHostNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecHostNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6709
 * cdef CUresult _cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecHostNodeSetParams
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphExecHostNodeSetParams == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6709, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6710
 *     global __cuGraphExecHostNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecHostNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecHostNodeSetParams" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecHostNodeSetParams == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6711
 *     cuPythonInit()
 *     if __cuGraphExecHostNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecHostNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_HOST_NODE_PARAMS*) nogil> __cuGraphExecHostNodeSetParams)(hGraphExec, hNode, nodeParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6712
 *     if __cuGraphExecHostNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecHostNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_HOST_NODE_PARAMS*) nogil> __cuGraphExecHostNodeSetParams)(hGraphExec, hNode, nodeParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__309, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6712, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6712, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6711
 *     cuPythonInit()
 *     if __cuGraphExecHostNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecHostNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_HOST_NODE_PARAMS*) nogil> __cuGraphExecHostNodeSetParams)(hGraphExec, hNode, nodeParams)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6710
 *     global __cuGraphExecHostNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecHostNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecHostNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6713
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecHostNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_HOST_NODE_PARAMS*) nogil> __cuGraphExecHostNodeSetParams)(hGraphExec, hNode, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphExec, CUgraphNode, CUDA_HOST_NODE_PARAMS const *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecHostNodeSetParams)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":6714
 *             raise RuntimeError('Function "cuGraphExecHostNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_HOST_NODE_PARAMS*) nogil> __cuGraphExecHostNodeSetParams)(hGraphExec, hNode, nodeParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6708
 * 
 * cdef CUresult _cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecHostNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecHostNodeSetParams == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6707
 *     return err
 * 
 * cdef CUresult _cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecHostNodeSetParams
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphExecHostNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6716
 *     return err
 * 
 * cdef CUresult _cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecChildGraphNodeSetParams
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecChildGraphNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUgraph __pyx_v_childGraph) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphExecChildGraphNodeSetParams", 1);
  __Pyx_TraceCall("_cuGraphExecChildGraphNodeSetParams", __pyx_f[0], 6716, 1, __PYX_ERR(0, 6716, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6717
 * 
 * cdef CUresult _cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecChildGraphNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecChildGraphNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6718
 * cdef CUresult _cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecChildGraphNodeSetParams
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphExecChildGraphNodeSetParams == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6718, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6719
 *     global __cuGraphExecChildGraphNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecChildGraphNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecChildGraphNodeSetParams" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecChildGraphNodeSetParams == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6720
 *     cuPythonInit()
 *     if __cuGraphExecChildGraphNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecChildGraphNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, CUgraph) nogil> __cuGraphExecChildGraphNodeSetParams)(hGraphExec, hNode, childGraph)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6721
 *     if __cuGraphExecChildGraphNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecChildGraphNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, CUgraph) nogil> __cuGraphExecChildGraphNodeSetParams)(hGraphExec, hNode, childGraph)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__310, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6721, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6721, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6720
 *     cuPythonInit()
 *     if __cuGraphExecChildGraphNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecChildGraphNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, CUgraph) nogil> __cuGraphExecChildGraphNodeSetParams)(hGraphExec, hNode, childGraph)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6719
 *     global __cuGraphExecChildGraphNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecChildGraphNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecChildGraphNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6722
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecChildGraphNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, CUgraph) nogil> __cuGraphExecChildGraphNodeSetParams)(hGraphExec, hNode, childGraph)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphExec, CUgraphNode, CUgraph))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecChildGraphNodeSetParams)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_childGraph);

    /* "cuda/_cuda/ccuda.pyx":6723
 *             raise RuntimeError('Function "cuGraphExecChildGraphNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, CUgraph) nogil> __cuGraphExecChildGraphNodeSetParams)(hGraphExec, hNode, childGraph)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6717
 * 
 * cdef CUresult _cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecChildGraphNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecChildGraphNodeSetParams == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6716
 *     return err
 * 
 * cdef CUresult _cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecChildGraphNodeSetParams
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphExecChildGraphNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6725
 *     return err
 * 
 * cdef CUresult _cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecEventRecordNodeSetEvent
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecEventRecordNodeSetEvent(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUevent __pyx_v_event) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphExecEventRecordNodeSetEvent", 1);
  __Pyx_TraceCall("_cuGraphExecEventRecordNodeSetEvent", __pyx_f[0], 6725, 1, __PYX_ERR(0, 6725, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6726
 * 
 * cdef CUresult _cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecEventRecordNodeSetEvent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecEventRecordNodeSetEvent == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6727
 * cdef CUresult _cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecEventRecordNodeSetEvent
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphExecEventRecordNodeSetEvent == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6727, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6728
 *     global __cuGraphExecEventRecordNodeSetEvent
 *     cuPythonInit()
 *     if __cuGraphExecEventRecordNodeSetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecEventRecordNodeSetEvent" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecEventRecordNodeSetEvent == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6729
 *     cuPythonInit()
 *     if __cuGraphExecEventRecordNodeSetEvent == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecEventRecordNodeSetEvent" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, CUevent) nogil> __cuGraphExecEventRecordNodeSetEvent)(hGraphExec, hNode, event)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6730
 *     if __cuGraphExecEventRecordNodeSetEvent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecEventRecordNodeSetEvent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, CUevent) nogil> __cuGraphExecEventRecordNodeSetEvent)(hGraphExec, hNode, event)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__311, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6730, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6730, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6729
 *     cuPythonInit()
 *     if __cuGraphExecEventRecordNodeSetEvent == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecEventRecordNodeSetEvent" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, CUevent) nogil> __cuGraphExecEventRecordNodeSetEvent)(hGraphExec, hNode, event)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6728
 *     global __cuGraphExecEventRecordNodeSetEvent
 *     cuPythonInit()
 *     if __cuGraphExecEventRecordNodeSetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecEventRecordNodeSetEvent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6731
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecEventRecordNodeSetEvent" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, CUevent) nogil> __cuGraphExecEventRecordNodeSetEvent)(hGraphExec, hNode, event)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphExec, CUgraphNode, CUevent))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecEventRecordNodeSetEvent)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_event);

    /* "cuda/_cuda/ccuda.pyx":6732
 *             raise RuntimeError('Function "cuGraphExecEventRecordNodeSetEvent" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, CUevent) nogil> __cuGraphExecEventRecordNodeSetEvent)(hGraphExec, hNode, event)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6726
 * 
 * cdef CUresult _cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecEventRecordNodeSetEvent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecEventRecordNodeSetEvent == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6725
 *     return err
 * 
 * cdef CUresult _cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecEventRecordNodeSetEvent
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphExecEventRecordNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6734
 *     return err
 * 
 * cdef CUresult _cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecEventWaitNodeSetEvent
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecEventWaitNodeSetEvent(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUevent __pyx_v_event) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphExecEventWaitNodeSetEvent", 1);
  __Pyx_TraceCall("_cuGraphExecEventWaitNodeSetEvent", __pyx_f[0], 6734, 1, __PYX_ERR(0, 6734, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6735
 * 
 * cdef CUresult _cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecEventWaitNodeSetEvent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecEventWaitNodeSetEvent == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6736
 * cdef CUresult _cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecEventWaitNodeSetEvent
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphExecEventWaitNodeSetEvent == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6736, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6737
 *     global __cuGraphExecEventWaitNodeSetEvent
 *     cuPythonInit()
 *     if __cuGraphExecEventWaitNodeSetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecEventWaitNodeSetEvent" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecEventWaitNodeSetEvent == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6738
 *     cuPythonInit()
 *     if __cuGraphExecEventWaitNodeSetEvent == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecEventWaitNodeSetEvent" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, CUevent) nogil> __cuGraphExecEventWaitNodeSetEvent)(hGraphExec, hNode, event)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6739
 *     if __cuGraphExecEventWaitNodeSetEvent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecEventWaitNodeSetEvent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, CUevent) nogil> __cuGraphExecEventWaitNodeSetEvent)(hGraphExec, hNode, event)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__312, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6739, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6739, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6738
 *     cuPythonInit()
 *     if __cuGraphExecEventWaitNodeSetEvent == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecEventWaitNodeSetEvent" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, CUevent) nogil> __cuGraphExecEventWaitNodeSetEvent)(hGraphExec, hNode, event)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6737
 *     global __cuGraphExecEventWaitNodeSetEvent
 *     cuPythonInit()
 *     if __cuGraphExecEventWaitNodeSetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecEventWaitNodeSetEvent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6740
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecEventWaitNodeSetEvent" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, CUevent) nogil> __cuGraphExecEventWaitNodeSetEvent)(hGraphExec, hNode, event)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphExec, CUgraphNode, CUevent))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecEventWaitNodeSetEvent)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_event);

    /* "cuda/_cuda/ccuda.pyx":6741
 *             raise RuntimeError('Function "cuGraphExecEventWaitNodeSetEvent" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, CUevent) nogil> __cuGraphExecEventWaitNodeSetEvent)(hGraphExec, hNode, event)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6735
 * 
 * cdef CUresult _cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecEventWaitNodeSetEvent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecEventWaitNodeSetEvent == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6734
 *     return err
 * 
 * cdef CUresult _cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecEventWaitNodeSetEvent
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphExecEventWaitNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6743
 *     return err
 * 
 * cdef CUresult _cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecExternalSemaphoresSignalNodeSetParams
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphExecExternalSemaphoresSignalNodeSetParams", 1);
  __Pyx_TraceCall("_cuGraphExecExternalSemaphoresSignalNodeSetParams", __pyx_f[0], 6743, 1, __PYX_ERR(0, 6743, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6744
 * 
 * cdef CUresult _cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecExternalSemaphoresSignalNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecExternalSemaphoresSignalNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6745
 * cdef CUresult _cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecExternalSemaphoresSignalNodeSetParams
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphExecExternalSemaphoresSignalNodeSetParams == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6745, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6746
 *     global __cuGraphExecExternalSemaphoresSignalNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecExternalSemaphoresSignalNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecExternalSemaphoresSignalNodeSetParams" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecExternalSemaphoresSignalNodeSetParams == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6747
 *     cuPythonInit()
 *     if __cuGraphExecExternalSemaphoresSignalNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecExternalSemaphoresSignalNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS*) nogil> __cuGraphExecExternalSemaphoresSignalNodeSetParams)(hGraphExec, hNode, nodeParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6748
 *     if __cuGraphExecExternalSemaphoresSignalNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecExternalSemaphoresSignalNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS*) nogil> __cuGraphExecExternalSemaphoresSignalNodeSetParams)(hGraphExec, hNode, nodeParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__313, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6748, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6748, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6747
 *     cuPythonInit()
 *     if __cuGraphExecExternalSemaphoresSignalNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecExternalSemaphoresSignalNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS*) nogil> __cuGraphExecExternalSemaphoresSignalNodeSetParams)(hGraphExec, hNode, nodeParams)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6746
 *     global __cuGraphExecExternalSemaphoresSignalNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecExternalSemaphoresSignalNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecExternalSemaphoresSignalNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6749
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecExternalSemaphoresSignalNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS*) nogil> __cuGraphExecExternalSemaphoresSignalNodeSetParams)(hGraphExec, hNode, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphExec, CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecExternalSemaphoresSignalNodeSetParams)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":6750
 *             raise RuntimeError('Function "cuGraphExecExternalSemaphoresSignalNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS*) nogil> __cuGraphExecExternalSemaphoresSignalNodeSetParams)(hGraphExec, hNode, nodeParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6744
 * 
 * cdef CUresult _cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecExternalSemaphoresSignalNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecExternalSemaphoresSignalNodeSetParams == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6743
 *     return err
 * 
 * cdef CUresult _cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecExternalSemaphoresSignalNodeSetParams
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphExecExternalSemaphoresSignalNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6752
 *     return err
 * 
 * cdef CUresult _cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecExternalSemaphoresWaitNodeSetParams
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphExecExternalSemaphoresWaitNodeSetParams", 1);
  __Pyx_TraceCall("_cuGraphExecExternalSemaphoresWaitNodeSetParams", __pyx_f[0], 6752, 1, __PYX_ERR(0, 6752, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6753
 * 
 * cdef CUresult _cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecExternalSemaphoresWaitNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecExternalSemaphoresWaitNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6754
 * cdef CUresult _cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecExternalSemaphoresWaitNodeSetParams
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphExecExternalSemaphoresWaitNodeSetParams == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6754, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6755
 *     global __cuGraphExecExternalSemaphoresWaitNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecExternalSemaphoresWaitNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecExternalSemaphoresWaitNodeSetParams" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecExternalSemaphoresWaitNodeSetParams == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6756
 *     cuPythonInit()
 *     if __cuGraphExecExternalSemaphoresWaitNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecExternalSemaphoresWaitNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS*) nogil> __cuGraphExecExternalSemaphoresWaitNodeSetParams)(hGraphExec, hNode, nodeParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6757
 *     if __cuGraphExecExternalSemaphoresWaitNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecExternalSemaphoresWaitNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS*) nogil> __cuGraphExecExternalSemaphoresWaitNodeSetParams)(hGraphExec, hNode, nodeParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__314, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6757, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6757, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6756
 *     cuPythonInit()
 *     if __cuGraphExecExternalSemaphoresWaitNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecExternalSemaphoresWaitNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS*) nogil> __cuGraphExecExternalSemaphoresWaitNodeSetParams)(hGraphExec, hNode, nodeParams)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6755
 *     global __cuGraphExecExternalSemaphoresWaitNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecExternalSemaphoresWaitNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecExternalSemaphoresWaitNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6758
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecExternalSemaphoresWaitNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS*) nogil> __cuGraphExecExternalSemaphoresWaitNodeSetParams)(hGraphExec, hNode, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphExec, CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecExternalSemaphoresWaitNodeSetParams)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":6759
 *             raise RuntimeError('Function "cuGraphExecExternalSemaphoresWaitNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS*) nogil> __cuGraphExecExternalSemaphoresWaitNodeSetParams)(hGraphExec, hNode, nodeParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6753
 * 
 * cdef CUresult _cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecExternalSemaphoresWaitNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecExternalSemaphoresWaitNodeSetParams == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6752
 *     return err
 * 
 * cdef CUresult _cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecExternalSemaphoresWaitNodeSetParams
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphExecExternalSemaphoresWaitNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6761
 *     return err
 * 
 * cdef CUresult _cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphNodeSetEnabled
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeSetEnabled(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, unsigned int __pyx_v_isEnabled) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphNodeSetEnabled", 1);
  __Pyx_TraceCall("_cuGraphNodeSetEnabled", __pyx_f[0], 6761, 1, __PYX_ERR(0, 6761, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6762
 * 
 * cdef CUresult _cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphNodeSetEnabled             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphNodeSetEnabled == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6763
 * cdef CUresult _cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphNodeSetEnabled
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphNodeSetEnabled == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6763, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6764
 *     global __cuGraphNodeSetEnabled
 *     cuPythonInit()
 *     if __cuGraphNodeSetEnabled == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeSetEnabled" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeSetEnabled == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6765
 *     cuPythonInit()
 *     if __cuGraphNodeSetEnabled == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphNodeSetEnabled" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, unsigned int) nogil> __cuGraphNodeSetEnabled)(hGraphExec, hNode, isEnabled)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6766
 *     if __cuGraphNodeSetEnabled == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeSetEnabled" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, unsigned int) nogil> __cuGraphNodeSetEnabled)(hGraphExec, hNode, isEnabled)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__315, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6766, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6766, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6765
 *     cuPythonInit()
 *     if __cuGraphNodeSetEnabled == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphNodeSetEnabled" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, unsigned int) nogil> __cuGraphNodeSetEnabled)(hGraphExec, hNode, isEnabled)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6764
 *     global __cuGraphNodeSetEnabled
 *     cuPythonInit()
 *     if __cuGraphNodeSetEnabled == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeSetEnabled" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6767
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeSetEnabled" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, unsigned int) nogil> __cuGraphNodeSetEnabled)(hGraphExec, hNode, isEnabled)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphExec, CUgraphNode, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeSetEnabled)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_isEnabled);

    /* "cuda/_cuda/ccuda.pyx":6768
 *             raise RuntimeError('Function "cuGraphNodeSetEnabled" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, unsigned int) nogil> __cuGraphNodeSetEnabled)(hGraphExec, hNode, isEnabled)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6762
 * 
 * cdef CUresult _cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphNodeSetEnabled             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphNodeSetEnabled == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6761
 *     return err
 * 
 * cdef CUresult _cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphNodeSetEnabled
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphNodeSetEnabled", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6770
 *     return err
 * 
 * cdef CUresult _cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphNodeGetEnabled
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetEnabled(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, unsigned int *__pyx_v_isEnabled) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphNodeGetEnabled", 1);
  __Pyx_TraceCall("_cuGraphNodeGetEnabled", __pyx_f[0], 6770, 1, __PYX_ERR(0, 6770, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6771
 * 
 * cdef CUresult _cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphNodeGetEnabled             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphNodeGetEnabled == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6772
 * cdef CUresult _cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphNodeGetEnabled
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphNodeGetEnabled == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6772, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6773
 *     global __cuGraphNodeGetEnabled
 *     cuPythonInit()
 *     if __cuGraphNodeGetEnabled == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetEnabled" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetEnabled == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6774
 *     cuPythonInit()
 *     if __cuGraphNodeGetEnabled == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphNodeGetEnabled" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, unsigned int*) nogil> __cuGraphNodeGetEnabled)(hGraphExec, hNode, isEnabled)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6775
 *     if __cuGraphNodeGetEnabled == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetEnabled" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, unsigned int*) nogil> __cuGraphNodeGetEnabled)(hGraphExec, hNode, isEnabled)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__316, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6775, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6775, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6774
 *     cuPythonInit()
 *     if __cuGraphNodeGetEnabled == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphNodeGetEnabled" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, unsigned int*) nogil> __cuGraphNodeGetEnabled)(hGraphExec, hNode, isEnabled)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6773
 *     global __cuGraphNodeGetEnabled
 *     cuPythonInit()
 *     if __cuGraphNodeGetEnabled == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetEnabled" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6776
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetEnabled" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, unsigned int*) nogil> __cuGraphNodeGetEnabled)(hGraphExec, hNode, isEnabled)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphExec, CUgraphNode, unsigned int *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetEnabled)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_isEnabled);

    /* "cuda/_cuda/ccuda.pyx":6777
 *             raise RuntimeError('Function "cuGraphNodeGetEnabled" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, unsigned int*) nogil> __cuGraphNodeGetEnabled)(hGraphExec, hNode, isEnabled)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6771
 * 
 * cdef CUresult _cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphNodeGetEnabled             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphNodeGetEnabled == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6770
 *     return err
 * 
 * cdef CUresult _cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphNodeGetEnabled
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphNodeGetEnabled", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6779
 *     return err
 * 
 * cdef CUresult _cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphUpload
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphUpload(CUgraphExec __pyx_v_hGraphExec, CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphUpload", 1);
  __Pyx_TraceCall("_cuGraphUpload", __pyx_f[0], 6779, 1, __PYX_ERR(0, 6779, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6780
 * 
 * cdef CUresult _cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphUpload             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphUpload == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6781
 * cdef CUresult _cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphUpload
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphUpload == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6781, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6782
 *     global __cuGraphUpload
 *     cuPythonInit()
 *     if __cuGraphUpload == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphUpload" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphUpload == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6783
 *     cuPythonInit()
 *     if __cuGraphUpload == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphUpload" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUstream) nogil> __cuGraphUpload)(hGraphExec, hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6784
 *     if __cuGraphUpload == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphUpload" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUstream) nogil> __cuGraphUpload)(hGraphExec, hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__317, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6784, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6784, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6783
 *     cuPythonInit()
 *     if __cuGraphUpload == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphUpload" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUstream) nogil> __cuGraphUpload)(hGraphExec, hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6782
 *     global __cuGraphUpload
 *     cuPythonInit()
 *     if __cuGraphUpload == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphUpload" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6785
 *         with gil:
 *             raise RuntimeError('Function "cuGraphUpload" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUstream) nogil> __cuGraphUpload)(hGraphExec, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphExec, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphUpload)(__pyx_v_hGraphExec, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":6786
 *             raise RuntimeError('Function "cuGraphUpload" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUstream) nogil> __cuGraphUpload)(hGraphExec, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6780
 * 
 * cdef CUresult _cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphUpload             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphUpload == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6779
 *     return err
 * 
 * cdef CUresult _cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphUpload
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphUpload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6788
 *     return err
 * 
 * cdef CUresult _cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphLaunch
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphLaunch(CUgraphExec __pyx_v_hGraphExec, CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphLaunch", 1);
  __Pyx_TraceCall("_cuGraphLaunch", __pyx_f[0], 6788, 1, __PYX_ERR(0, 6788, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6789
 * 
 * cdef CUresult _cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphLaunch             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphLaunch == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6790
 * cdef CUresult _cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphLaunch
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphLaunch == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6790, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6791
 *     global __cuGraphLaunch
 *     cuPythonInit()
 *     if __cuGraphLaunch == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphLaunch" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphLaunch == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6792
 *     cuPythonInit()
 *     if __cuGraphLaunch == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphLaunch" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUstream) nogil> __cuGraphLaunch)(hGraphExec, hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6793
 *     if __cuGraphLaunch == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphLaunch" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUstream) nogil> __cuGraphLaunch)(hGraphExec, hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__318, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6793, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6793, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6792
 *     cuPythonInit()
 *     if __cuGraphLaunch == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphLaunch" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUstream) nogil> __cuGraphLaunch)(hGraphExec, hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6791
 *     global __cuGraphLaunch
 *     cuPythonInit()
 *     if __cuGraphLaunch == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphLaunch" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6794
 *         with gil:
 *             raise RuntimeError('Function "cuGraphLaunch" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUstream) nogil> __cuGraphLaunch)(hGraphExec, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphExec, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphLaunch)(__pyx_v_hGraphExec, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":6795
 *             raise RuntimeError('Function "cuGraphLaunch" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUstream) nogil> __cuGraphLaunch)(hGraphExec, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphExecDestroy(CUgraphExec hGraphExec) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6789
 * 
 * cdef CUresult _cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphLaunch             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphLaunch == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6788
 *     return err
 * 
 * cdef CUresult _cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphLaunch
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphLaunch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6797
 *     return err
 * 
 * cdef CUresult _cuGraphExecDestroy(CUgraphExec hGraphExec) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecDestroy
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecDestroy(CUgraphExec __pyx_v_hGraphExec) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphExecDestroy", 1);
  __Pyx_TraceCall("_cuGraphExecDestroy", __pyx_f[0], 6797, 1, __PYX_ERR(0, 6797, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6798
 * 
 * cdef CUresult _cuGraphExecDestroy(CUgraphExec hGraphExec) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6799
 * cdef CUresult _cuGraphExecDestroy(CUgraphExec hGraphExec) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecDestroy
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphExecDestroy == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6799, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6800
 *     global __cuGraphExecDestroy
 *     cuPythonInit()
 *     if __cuGraphExecDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecDestroy" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecDestroy == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6801
 *     cuPythonInit()
 *     if __cuGraphExecDestroy == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecDestroy" not found')
 *     err = (<CUresult (*)(CUgraphExec) nogil> __cuGraphExecDestroy)(hGraphExec)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6802
 *     if __cuGraphExecDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec) nogil> __cuGraphExecDestroy)(hGraphExec)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__319, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6802, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6802, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6801
 *     cuPythonInit()
 *     if __cuGraphExecDestroy == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecDestroy" not found')
 *     err = (<CUresult (*)(CUgraphExec) nogil> __cuGraphExecDestroy)(hGraphExec)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6800
 *     global __cuGraphExecDestroy
 *     cuPythonInit()
 *     if __cuGraphExecDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6803
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecDestroy" not found')
 *     err = (<CUresult (*)(CUgraphExec) nogil> __cuGraphExecDestroy)(hGraphExec)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphExec))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecDestroy)(__pyx_v_hGraphExec);

    /* "cuda/_cuda/ccuda.pyx":6804
 *             raise RuntimeError('Function "cuGraphExecDestroy" not found')
 *     err = (<CUresult (*)(CUgraphExec) nogil> __cuGraphExecDestroy)(hGraphExec)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphDestroy(CUgraph hGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6798
 * 
 * cdef CUresult _cuGraphExecDestroy(CUgraphExec hGraphExec) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecDestroy == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6797
 *     return err
 * 
 * cdef CUresult _cuGraphExecDestroy(CUgraphExec hGraphExec) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecDestroy
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphExecDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6806
 *     return err
 * 
 * cdef CUresult _cuGraphDestroy(CUgraph hGraph) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphDestroy
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphDestroy(CUgraph __pyx_v_hGraph) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphDestroy", 1);
  __Pyx_TraceCall("_cuGraphDestroy", __pyx_f[0], 6806, 1, __PYX_ERR(0, 6806, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6807
 * 
 * cdef CUresult _cuGraphDestroy(CUgraph hGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6808
 * cdef CUresult _cuGraphDestroy(CUgraph hGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphDestroy
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphDestroy == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6808, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6809
 *     global __cuGraphDestroy
 *     cuPythonInit()
 *     if __cuGraphDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDestroy" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphDestroy == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6810
 *     cuPythonInit()
 *     if __cuGraphDestroy == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphDestroy" not found')
 *     err = (<CUresult (*)(CUgraph) nogil> __cuGraphDestroy)(hGraph)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6811
 *     if __cuGraphDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph) nogil> __cuGraphDestroy)(hGraph)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__320, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6811, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6811, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6810
 *     cuPythonInit()
 *     if __cuGraphDestroy == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphDestroy" not found')
 *     err = (<CUresult (*)(CUgraph) nogil> __cuGraphDestroy)(hGraph)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6809
 *     global __cuGraphDestroy
 *     cuPythonInit()
 *     if __cuGraphDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6812
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDestroy" not found')
 *     err = (<CUresult (*)(CUgraph) nogil> __cuGraphDestroy)(hGraph)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraph))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphDestroy)(__pyx_v_hGraph);

    /* "cuda/_cuda/ccuda.pyx":6813
 *             raise RuntimeError('Function "cuGraphDestroy" not found')
 *     err = (<CUresult (*)(CUgraph) nogil> __cuGraphDestroy)(hGraph)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphExecUpdate_v2(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphExecUpdateResultInfo* resultInfo) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6807
 * 
 * cdef CUresult _cuGraphDestroy(CUgraph hGraph) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphDestroy == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6806
 *     return err
 * 
 * cdef CUresult _cuGraphDestroy(CUgraph hGraph) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphDestroy
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6815
 *     return err
 * 
 * cdef CUresult _cuGraphExecUpdate_v2(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphExecUpdateResultInfo* resultInfo) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecUpdate_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecUpdate_v2(CUgraphExec __pyx_v_hGraphExec, CUgraph __pyx_v_hGraph, CUgraphExecUpdateResultInfo *__pyx_v_resultInfo) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphExecUpdate_v2", 1);
  __Pyx_TraceCall("_cuGraphExecUpdate_v2", __pyx_f[0], 6815, 1, __PYX_ERR(0, 6815, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6816
 * 
 * cdef CUresult _cuGraphExecUpdate_v2(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphExecUpdateResultInfo* resultInfo) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecUpdate_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecUpdate_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6817
 * cdef CUresult _cuGraphExecUpdate_v2(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphExecUpdateResultInfo* resultInfo) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecUpdate_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphExecUpdate_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6817, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6818
 *     global __cuGraphExecUpdate_v2
 *     cuPythonInit()
 *     if __cuGraphExecUpdate_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecUpdate_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecUpdate_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6819
 *     cuPythonInit()
 *     if __cuGraphExecUpdate_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecUpdate_v2" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraph, CUgraphExecUpdateResultInfo*) nogil> __cuGraphExecUpdate_v2)(hGraphExec, hGraph, resultInfo)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6820
 *     if __cuGraphExecUpdate_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecUpdate_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraph, CUgraphExecUpdateResultInfo*) nogil> __cuGraphExecUpdate_v2)(hGraphExec, hGraph, resultInfo)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__321, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6820, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6820, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6819
 *     cuPythonInit()
 *     if __cuGraphExecUpdate_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecUpdate_v2" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraph, CUgraphExecUpdateResultInfo*) nogil> __cuGraphExecUpdate_v2)(hGraphExec, hGraph, resultInfo)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6818
 *     global __cuGraphExecUpdate_v2
 *     cuPythonInit()
 *     if __cuGraphExecUpdate_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecUpdate_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6821
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecUpdate_v2" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraph, CUgraphExecUpdateResultInfo*) nogil> __cuGraphExecUpdate_v2)(hGraphExec, hGraph, resultInfo)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphExec, CUgraph, CUgraphExecUpdateResultInfo *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecUpdate_v2)(__pyx_v_hGraphExec, __pyx_v_hGraph, __pyx_v_resultInfo);

    /* "cuda/_cuda/ccuda.pyx":6822
 *             raise RuntimeError('Function "cuGraphExecUpdate_v2" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraph, CUgraphExecUpdateResultInfo*) nogil> __cuGraphExecUpdate_v2)(hGraphExec, hGraph, resultInfo)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6816
 * 
 * cdef CUresult _cuGraphExecUpdate_v2(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphExecUpdateResultInfo* resultInfo) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecUpdate_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecUpdate_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6815
 *     return err
 * 
 * cdef CUresult _cuGraphExecUpdate_v2(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphExecUpdateResultInfo* resultInfo) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecUpdate_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphExecUpdate_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6824
 *     return err
 * 
 * cdef CUresult _cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphKernelNodeCopyAttributes
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeCopyAttributes(CUgraphNode __pyx_v_dst, CUgraphNode __pyx_v_src) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphKernelNodeCopyAttributes", 1);
  __Pyx_TraceCall("_cuGraphKernelNodeCopyAttributes", __pyx_f[0], 6824, 1, __PYX_ERR(0, 6824, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6825
 * 
 * cdef CUresult _cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphKernelNodeCopyAttributes             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphKernelNodeCopyAttributes == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6826
 * cdef CUresult _cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphKernelNodeCopyAttributes
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphKernelNodeCopyAttributes == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6826, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6827
 *     global __cuGraphKernelNodeCopyAttributes
 *     cuPythonInit()
 *     if __cuGraphKernelNodeCopyAttributes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeCopyAttributes" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeCopyAttributes == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6828
 *     cuPythonInit()
 *     if __cuGraphKernelNodeCopyAttributes == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphKernelNodeCopyAttributes" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNode) nogil> __cuGraphKernelNodeCopyAttributes)(dst, src)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6829
 *     if __cuGraphKernelNodeCopyAttributes == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeCopyAttributes" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNode) nogil> __cuGraphKernelNodeCopyAttributes)(dst, src)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__322, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6829, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6829, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6828
 *     cuPythonInit()
 *     if __cuGraphKernelNodeCopyAttributes == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphKernelNodeCopyAttributes" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNode) nogil> __cuGraphKernelNodeCopyAttributes)(dst, src)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6827
 *     global __cuGraphKernelNodeCopyAttributes
 *     cuPythonInit()
 *     if __cuGraphKernelNodeCopyAttributes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeCopyAttributes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6830
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeCopyAttributes" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNode) nogil> __cuGraphKernelNodeCopyAttributes)(dst, src)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUgraphNode))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeCopyAttributes)(__pyx_v_dst, __pyx_v_src);

    /* "cuda/_cuda/ccuda.pyx":6831
 *             raise RuntimeError('Function "cuGraphKernelNodeCopyAttributes" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNode) nogil> __cuGraphKernelNodeCopyAttributes)(dst, src)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6825
 * 
 * cdef CUresult _cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphKernelNodeCopyAttributes             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphKernelNodeCopyAttributes == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6824
 *     return err
 * 
 * cdef CUresult _cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphKernelNodeCopyAttributes
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphKernelNodeCopyAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6833
 *     return err
 * 
 * cdef CUresult _cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphKernelNodeGetAttribute
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeGetAttribute(CUgraphNode __pyx_v_hNode, CUkernelNodeAttrID __pyx_v_attr, CUkernelNodeAttrValue *__pyx_v_value_out) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphKernelNodeGetAttribute", 1);
  __Pyx_TraceCall("_cuGraphKernelNodeGetAttribute", __pyx_f[0], 6833, 1, __PYX_ERR(0, 6833, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6834
 * 
 * cdef CUresult _cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphKernelNodeGetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphKernelNodeGetAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6835
 * cdef CUresult _cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphKernelNodeGetAttribute
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphKernelNodeGetAttribute == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6835, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6836
 *     global __cuGraphKernelNodeGetAttribute
 *     cuPythonInit()
 *     if __cuGraphKernelNodeGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeGetAttribute" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeGetAttribute == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6837
 *     cuPythonInit()
 *     if __cuGraphKernelNodeGetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphKernelNodeGetAttribute" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue*) nogil> __cuGraphKernelNodeGetAttribute)(hNode, attr, value_out)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6838
 *     if __cuGraphKernelNodeGetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeGetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue*) nogil> __cuGraphKernelNodeGetAttribute)(hNode, attr, value_out)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__323, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6838, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6838, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6837
 *     cuPythonInit()
 *     if __cuGraphKernelNodeGetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphKernelNodeGetAttribute" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue*) nogil> __cuGraphKernelNodeGetAttribute)(hNode, attr, value_out)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6836
 *     global __cuGraphKernelNodeGetAttribute
 *     cuPythonInit()
 *     if __cuGraphKernelNodeGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeGetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6839
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeGetAttribute" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue*) nogil> __cuGraphKernelNodeGetAttribute)(hNode, attr, value_out)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeGetAttribute)(__pyx_v_hNode, __pyx_v_attr, __pyx_v_value_out);

    /* "cuda/_cuda/ccuda.pyx":6840
 *             raise RuntimeError('Function "cuGraphKernelNodeGetAttribute" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue*) nogil> __cuGraphKernelNodeGetAttribute)(hNode, attr, value_out)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6834
 * 
 * cdef CUresult _cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphKernelNodeGetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphKernelNodeGetAttribute == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6833
 *     return err
 * 
 * cdef CUresult _cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphKernelNodeGetAttribute
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphKernelNodeGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6842
 *     return err
 * 
 * cdef CUresult _cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphKernelNodeSetAttribute
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeSetAttribute(CUgraphNode __pyx_v_hNode, CUkernelNodeAttrID __pyx_v_attr, CUkernelNodeAttrValue const *__pyx_v_value) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphKernelNodeSetAttribute", 1);
  __Pyx_TraceCall("_cuGraphKernelNodeSetAttribute", __pyx_f[0], 6842, 1, __PYX_ERR(0, 6842, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6843
 * 
 * cdef CUresult _cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphKernelNodeSetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphKernelNodeSetAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6844
 * cdef CUresult _cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphKernelNodeSetAttribute
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphKernelNodeSetAttribute == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6844, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6845
 *     global __cuGraphKernelNodeSetAttribute
 *     cuPythonInit()
 *     if __cuGraphKernelNodeSetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeSetAttribute" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeSetAttribute == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6846
 *     cuPythonInit()
 *     if __cuGraphKernelNodeSetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphKernelNodeSetAttribute" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUkernelNodeAttrID, const CUkernelNodeAttrValue*) nogil> __cuGraphKernelNodeSetAttribute)(hNode, attr, value)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6847
 *     if __cuGraphKernelNodeSetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeSetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUkernelNodeAttrID, const CUkernelNodeAttrValue*) nogil> __cuGraphKernelNodeSetAttribute)(hNode, attr, value)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__324, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6847, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6847, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6846
 *     cuPythonInit()
 *     if __cuGraphKernelNodeSetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphKernelNodeSetAttribute" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUkernelNodeAttrID, const CUkernelNodeAttrValue*) nogil> __cuGraphKernelNodeSetAttribute)(hNode, attr, value)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6845
 *     global __cuGraphKernelNodeSetAttribute
 *     cuPythonInit()
 *     if __cuGraphKernelNodeSetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeSetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6848
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeSetAttribute" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUkernelNodeAttrID, const CUkernelNodeAttrValue*) nogil> __cuGraphKernelNodeSetAttribute)(hNode, attr, value)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue const *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeSetAttribute)(__pyx_v_hNode, __pyx_v_attr, __pyx_v_value);

    /* "cuda/_cuda/ccuda.pyx":6849
 *             raise RuntimeError('Function "cuGraphKernelNodeSetAttribute" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUkernelNodeAttrID, const CUkernelNodeAttrValue*) nogil> __cuGraphKernelNodeSetAttribute)(hNode, attr, value)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6843
 * 
 * cdef CUresult _cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphKernelNodeSetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphKernelNodeSetAttribute == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6842
 *     return err
 * 
 * cdef CUresult _cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphKernelNodeSetAttribute
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphKernelNodeSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6851
 *     return err
 * 
 * cdef CUresult _cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphDebugDotPrint
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphDebugDotPrint(CUgraph __pyx_v_hGraph, char const *__pyx_v_path, unsigned int __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphDebugDotPrint", 1);
  __Pyx_TraceCall("_cuGraphDebugDotPrint", __pyx_f[0], 6851, 1, __PYX_ERR(0, 6851, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6852
 * 
 * cdef CUresult _cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphDebugDotPrint             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphDebugDotPrint == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6853
 * cdef CUresult _cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphDebugDotPrint
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphDebugDotPrint == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6853, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6854
 *     global __cuGraphDebugDotPrint
 *     cuPythonInit()
 *     if __cuGraphDebugDotPrint == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDebugDotPrint" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphDebugDotPrint == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6855
 *     cuPythonInit()
 *     if __cuGraphDebugDotPrint == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphDebugDotPrint" not found')
 *     err = (<CUresult (*)(CUgraph, const char*, unsigned int) nogil> __cuGraphDebugDotPrint)(hGraph, path, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6856
 *     if __cuGraphDebugDotPrint == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDebugDotPrint" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph, const char*, unsigned int) nogil> __cuGraphDebugDotPrint)(hGraph, path, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__325, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6856, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6856, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6855
 *     cuPythonInit()
 *     if __cuGraphDebugDotPrint == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphDebugDotPrint" not found')
 *     err = (<CUresult (*)(CUgraph, const char*, unsigned int) nogil> __cuGraphDebugDotPrint)(hGraph, path, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6854
 *     global __cuGraphDebugDotPrint
 *     cuPythonInit()
 *     if __cuGraphDebugDotPrint == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDebugDotPrint" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6857
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDebugDotPrint" not found')
 *     err = (<CUresult (*)(CUgraph, const char*, unsigned int) nogil> __cuGraphDebugDotPrint)(hGraph, path, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraph, char const *, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphDebugDotPrint)(__pyx_v_hGraph, __pyx_v_path, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":6858
 *             raise RuntimeError('Function "cuGraphDebugDotPrint" not found')
 *     err = (<CUresult (*)(CUgraph, const char*, unsigned int) nogil> __cuGraphDebugDotPrint)(hGraph, path, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6852
 * 
 * cdef CUresult _cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphDebugDotPrint             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphDebugDotPrint == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6851
 *     return err
 * 
 * cdef CUresult _cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphDebugDotPrint
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphDebugDotPrint", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6860
 *     return err
 * 
 * cdef CUresult _cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuUserObjectCreate
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuUserObjectCreate(CUuserObject *__pyx_v_object_out, void *__pyx_v_ptr, CUhostFn __pyx_v_destroy, unsigned int __pyx_v_initialRefcount, unsigned int __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuUserObjectCreate", 1);
  __Pyx_TraceCall("_cuUserObjectCreate", __pyx_f[0], 6860, 1, __PYX_ERR(0, 6860, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6861
 * 
 * cdef CUresult _cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuUserObjectCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuUserObjectCreate == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6862
 * cdef CUresult _cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuUserObjectCreate
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuUserObjectCreate == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6862, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6863
 *     global __cuUserObjectCreate
 *     cuPythonInit()
 *     if __cuUserObjectCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectCreate" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuUserObjectCreate == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6864
 *     cuPythonInit()
 *     if __cuUserObjectCreate == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuUserObjectCreate" not found')
 *     err = (<CUresult (*)(CUuserObject*, void*, CUhostFn, unsigned int, unsigned int) nogil> __cuUserObjectCreate)(object_out, ptr, destroy, initialRefcount, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6865
 *     if __cuUserObjectCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUuserObject*, void*, CUhostFn, unsigned int, unsigned int) nogil> __cuUserObjectCreate)(object_out, ptr, destroy, initialRefcount, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__326, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6865, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6865, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6864
 *     cuPythonInit()
 *     if __cuUserObjectCreate == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuUserObjectCreate" not found')
 *     err = (<CUresult (*)(CUuserObject*, void*, CUhostFn, unsigned int, unsigned int) nogil> __cuUserObjectCreate)(object_out, ptr, destroy, initialRefcount, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6863
 *     global __cuUserObjectCreate
 *     cuPythonInit()
 *     if __cuUserObjectCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6866
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectCreate" not found')
 *     err = (<CUresult (*)(CUuserObject*, void*, CUhostFn, unsigned int, unsigned int) nogil> __cuUserObjectCreate)(object_out, ptr, destroy, initialRefcount, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUuserObject *, void *, CUhostFn, unsigned int, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuUserObjectCreate)(__pyx_v_object_out, __pyx_v_ptr, __pyx_v_destroy, __pyx_v_initialRefcount, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":6867
 *             raise RuntimeError('Function "cuUserObjectCreate" not found')
 *     err = (<CUresult (*)(CUuserObject*, void*, CUhostFn, unsigned int, unsigned int) nogil> __cuUserObjectCreate)(object_out, ptr, destroy, initialRefcount, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuUserObjectRetain(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6861
 * 
 * cdef CUresult _cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuUserObjectCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuUserObjectCreate == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6860
 *     return err
 * 
 * cdef CUresult _cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuUserObjectCreate
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuUserObjectCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6869
 *     return err
 * 
 * cdef CUresult _cuUserObjectRetain(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuUserObjectRetain
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuUserObjectRetain(CUuserObject __pyx_v_object, unsigned int __pyx_v_count) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuUserObjectRetain", 1);
  __Pyx_TraceCall("_cuUserObjectRetain", __pyx_f[0], 6869, 1, __PYX_ERR(0, 6869, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6870
 * 
 * cdef CUresult _cuUserObjectRetain(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuUserObjectRetain             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuUserObjectRetain == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6871
 * cdef CUresult _cuUserObjectRetain(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuUserObjectRetain
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuUserObjectRetain == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6871, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6872
 *     global __cuUserObjectRetain
 *     cuPythonInit()
 *     if __cuUserObjectRetain == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectRetain" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuUserObjectRetain == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6873
 *     cuPythonInit()
 *     if __cuUserObjectRetain == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuUserObjectRetain" not found')
 *     err = (<CUresult (*)(CUuserObject, unsigned int) nogil> __cuUserObjectRetain)(object, count)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6874
 *     if __cuUserObjectRetain == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectRetain" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUuserObject, unsigned int) nogil> __cuUserObjectRetain)(object, count)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__327, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6874, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6874, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6873
 *     cuPythonInit()
 *     if __cuUserObjectRetain == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuUserObjectRetain" not found')
 *     err = (<CUresult (*)(CUuserObject, unsigned int) nogil> __cuUserObjectRetain)(object, count)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6872
 *     global __cuUserObjectRetain
 *     cuPythonInit()
 *     if __cuUserObjectRetain == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectRetain" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6875
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectRetain" not found')
 *     err = (<CUresult (*)(CUuserObject, unsigned int) nogil> __cuUserObjectRetain)(object, count)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUuserObject, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuUserObjectRetain)(__pyx_v_object, __pyx_v_count);

    /* "cuda/_cuda/ccuda.pyx":6876
 *             raise RuntimeError('Function "cuUserObjectRetain" not found')
 *     err = (<CUresult (*)(CUuserObject, unsigned int) nogil> __cuUserObjectRetain)(object, count)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuUserObjectRelease(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6870
 * 
 * cdef CUresult _cuUserObjectRetain(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuUserObjectRetain             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuUserObjectRetain == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6869
 *     return err
 * 
 * cdef CUresult _cuUserObjectRetain(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuUserObjectRetain
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuUserObjectRetain", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6878
 *     return err
 * 
 * cdef CUresult _cuUserObjectRelease(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuUserObjectRelease
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuUserObjectRelease(CUuserObject __pyx_v_object, unsigned int __pyx_v_count) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuUserObjectRelease", 1);
  __Pyx_TraceCall("_cuUserObjectRelease", __pyx_f[0], 6878, 1, __PYX_ERR(0, 6878, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6879
 * 
 * cdef CUresult _cuUserObjectRelease(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuUserObjectRelease             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuUserObjectRelease == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6880
 * cdef CUresult _cuUserObjectRelease(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuUserObjectRelease
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuUserObjectRelease == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6880, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6881
 *     global __cuUserObjectRelease
 *     cuPythonInit()
 *     if __cuUserObjectRelease == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectRelease" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuUserObjectRelease == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6882
 *     cuPythonInit()
 *     if __cuUserObjectRelease == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuUserObjectRelease" not found')
 *     err = (<CUresult (*)(CUuserObject, unsigned int) nogil> __cuUserObjectRelease)(object, count)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6883
 *     if __cuUserObjectRelease == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectRelease" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUuserObject, unsigned int) nogil> __cuUserObjectRelease)(object, count)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__328, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6883, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6883, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6882
 *     cuPythonInit()
 *     if __cuUserObjectRelease == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuUserObjectRelease" not found')
 *     err = (<CUresult (*)(CUuserObject, unsigned int) nogil> __cuUserObjectRelease)(object, count)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6881
 *     global __cuUserObjectRelease
 *     cuPythonInit()
 *     if __cuUserObjectRelease == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectRelease" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6884
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectRelease" not found')
 *     err = (<CUresult (*)(CUuserObject, unsigned int) nogil> __cuUserObjectRelease)(object, count)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUuserObject, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuUserObjectRelease)(__pyx_v_object, __pyx_v_count);

    /* "cuda/_cuda/ccuda.pyx":6885
 *             raise RuntimeError('Function "cuUserObjectRelease" not found')
 *     err = (<CUresult (*)(CUuserObject, unsigned int) nogil> __cuUserObjectRelease)(object, count)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6879
 * 
 * cdef CUresult _cuUserObjectRelease(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuUserObjectRelease             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuUserObjectRelease == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6878
 *     return err
 * 
 * cdef CUresult _cuUserObjectRelease(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuUserObjectRelease
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuUserObjectRelease", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6887
 *     return err
 * 
 * cdef CUresult _cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphRetainUserObject
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphRetainUserObject(CUgraph __pyx_v_graph, CUuserObject __pyx_v_object, unsigned int __pyx_v_count, unsigned int __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphRetainUserObject", 1);
  __Pyx_TraceCall("_cuGraphRetainUserObject", __pyx_f[0], 6887, 1, __PYX_ERR(0, 6887, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6888
 * 
 * cdef CUresult _cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphRetainUserObject             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphRetainUserObject == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6889
 * cdef CUresult _cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphRetainUserObject
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphRetainUserObject == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6889, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6890
 *     global __cuGraphRetainUserObject
 *     cuPythonInit()
 *     if __cuGraphRetainUserObject == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphRetainUserObject" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphRetainUserObject == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6891
 *     cuPythonInit()
 *     if __cuGraphRetainUserObject == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphRetainUserObject" not found')
 *     err = (<CUresult (*)(CUgraph, CUuserObject, unsigned int, unsigned int) nogil> __cuGraphRetainUserObject)(graph, object, count, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6892
 *     if __cuGraphRetainUserObject == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphRetainUserObject" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph, CUuserObject, unsigned int, unsigned int) nogil> __cuGraphRetainUserObject)(graph, object, count, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__329, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6892, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6892, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6891
 *     cuPythonInit()
 *     if __cuGraphRetainUserObject == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphRetainUserObject" not found')
 *     err = (<CUresult (*)(CUgraph, CUuserObject, unsigned int, unsigned int) nogil> __cuGraphRetainUserObject)(graph, object, count, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6890
 *     global __cuGraphRetainUserObject
 *     cuPythonInit()
 *     if __cuGraphRetainUserObject == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphRetainUserObject" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6893
 *         with gil:
 *             raise RuntimeError('Function "cuGraphRetainUserObject" not found')
 *     err = (<CUresult (*)(CUgraph, CUuserObject, unsigned int, unsigned int) nogil> __cuGraphRetainUserObject)(graph, object, count, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraph, CUuserObject, unsigned int, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphRetainUserObject)(__pyx_v_graph, __pyx_v_object, __pyx_v_count, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":6894
 *             raise RuntimeError('Function "cuGraphRetainUserObject" not found')
 *     err = (<CUresult (*)(CUgraph, CUuserObject, unsigned int, unsigned int) nogil> __cuGraphRetainUserObject)(graph, object, count, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6888
 * 
 * cdef CUresult _cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphRetainUserObject             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphRetainUserObject == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6887
 *     return err
 * 
 * cdef CUresult _cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphRetainUserObject
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphRetainUserObject", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6896
 *     return err
 * 
 * cdef CUresult _cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphReleaseUserObject
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphReleaseUserObject(CUgraph __pyx_v_graph, CUuserObject __pyx_v_object, unsigned int __pyx_v_count) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphReleaseUserObject", 1);
  __Pyx_TraceCall("_cuGraphReleaseUserObject", __pyx_f[0], 6896, 1, __PYX_ERR(0, 6896, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6897
 * 
 * cdef CUresult _cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphReleaseUserObject             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphReleaseUserObject == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6898
 * cdef CUresult _cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphReleaseUserObject
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphReleaseUserObject == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6898, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6899
 *     global __cuGraphReleaseUserObject
 *     cuPythonInit()
 *     if __cuGraphReleaseUserObject == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphReleaseUserObject" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphReleaseUserObject == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6900
 *     cuPythonInit()
 *     if __cuGraphReleaseUserObject == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphReleaseUserObject" not found')
 *     err = (<CUresult (*)(CUgraph, CUuserObject, unsigned int) nogil> __cuGraphReleaseUserObject)(graph, object, count)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6901
 *     if __cuGraphReleaseUserObject == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphReleaseUserObject" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph, CUuserObject, unsigned int) nogil> __cuGraphReleaseUserObject)(graph, object, count)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__330, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6901, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6901, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6900
 *     cuPythonInit()
 *     if __cuGraphReleaseUserObject == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphReleaseUserObject" not found')
 *     err = (<CUresult (*)(CUgraph, CUuserObject, unsigned int) nogil> __cuGraphReleaseUserObject)(graph, object, count)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6899
 *     global __cuGraphReleaseUserObject
 *     cuPythonInit()
 *     if __cuGraphReleaseUserObject == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphReleaseUserObject" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6902
 *         with gil:
 *             raise RuntimeError('Function "cuGraphReleaseUserObject" not found')
 *     err = (<CUresult (*)(CUgraph, CUuserObject, unsigned int) nogil> __cuGraphReleaseUserObject)(graph, object, count)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraph, CUuserObject, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphReleaseUserObject)(__pyx_v_graph, __pyx_v_object, __pyx_v_count);

    /* "cuda/_cuda/ccuda.pyx":6903
 *             raise RuntimeError('Function "cuGraphReleaseUserObject" not found')
 *     err = (<CUresult (*)(CUgraph, CUuserObject, unsigned int) nogil> __cuGraphReleaseUserObject)(graph, object, count)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphAddNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6897
 * 
 * cdef CUresult _cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphReleaseUserObject             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphReleaseUserObject == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6896
 *     return err
 * 
 * cdef CUresult _cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphReleaseUserObject
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphReleaseUserObject", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6905
 *     return err
 * 
 * cdef CUresult _cuGraphAddNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddNode
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUgraphNodeParams *__pyx_v_nodeParams) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphAddNode", 1);
  __Pyx_TraceCall("_cuGraphAddNode", __pyx_f[0], 6905, 1, __PYX_ERR(0, 6905, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6906
 * 
 * cdef CUresult _cuGraphAddNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphAddNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6907
 * cdef CUresult _cuGraphAddNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphAddNode
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphAddNode == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6907, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6908
 *     global __cuGraphAddNode
 *     cuPythonInit()
 *     if __cuGraphAddNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddNode" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddNode == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6909
 *     cuPythonInit()
 *     if __cuGraphAddNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUgraphNodeParams*) nogil> __cuGraphAddNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6910
 *     if __cuGraphAddNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUgraphNodeParams*) nogil> __cuGraphAddNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__331, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6910, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6910, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6909
 *     cuPythonInit()
 *     if __cuGraphAddNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUgraphNodeParams*) nogil> __cuGraphAddNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6908
 *     global __cuGraphAddNode
 *     cuPythonInit()
 *     if __cuGraphAddNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6911
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUgraphNodeParams*) nogil> __cuGraphAddNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUgraphNodeParams *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddNode)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":6912
 *             raise RuntimeError('Function "cuGraphAddNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUgraphNodeParams*) nogil> __cuGraphAddNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphNodeSetParams(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6906
 * 
 * cdef CUresult _cuGraphAddNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphAddNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddNode == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6905
 *     return err
 * 
 * cdef CUresult _cuGraphAddNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddNode
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphAddNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6914
 *     return err
 * 
 * cdef CUresult _cuGraphNodeSetParams(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphNodeSetParams
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeSetParams(CUgraphNode __pyx_v_hNode, CUgraphNodeParams *__pyx_v_nodeParams) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphNodeSetParams", 1);
  __Pyx_TraceCall("_cuGraphNodeSetParams", __pyx_f[0], 6914, 1, __PYX_ERR(0, 6914, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6915
 * 
 * cdef CUresult _cuGraphNodeSetParams(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6916
 * cdef CUresult _cuGraphNodeSetParams(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphNodeSetParams
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphNodeSetParams == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6916, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6917
 *     global __cuGraphNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeSetParams" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeSetParams == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6918
 *     cuPythonInit()
 *     if __cuGraphNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNodeParams*) nogil> __cuGraphNodeSetParams)(hNode, nodeParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6919
 *     if __cuGraphNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNodeParams*) nogil> __cuGraphNodeSetParams)(hNode, nodeParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__332, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6919, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6919, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6918
 *     cuPythonInit()
 *     if __cuGraphNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNodeParams*) nogil> __cuGraphNodeSetParams)(hNode, nodeParams)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6917
 *     global __cuGraphNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6920
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNodeParams*) nogil> __cuGraphNodeSetParams)(hNode, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUgraphNodeParams *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeSetParams)(__pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":6921
 *             raise RuntimeError('Function "cuGraphNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNodeParams*) nogil> __cuGraphNodeSetParams)(hNode, nodeParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphExecNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6915
 * 
 * cdef CUresult _cuGraphNodeSetParams(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphNodeSetParams == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6914
 *     return err
 * 
 * cdef CUresult _cuGraphNodeSetParams(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphNodeSetParams
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6923
 *     return err
 * 
 * cdef CUresult _cuGraphExecNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecNodeSetParams
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUgraphNodeParams *__pyx_v_nodeParams) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphExecNodeSetParams", 1);
  __Pyx_TraceCall("_cuGraphExecNodeSetParams", __pyx_f[0], 6923, 1, __PYX_ERR(0, 6923, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6924
 * 
 * cdef CUresult _cuGraphExecNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6925
 * cdef CUresult _cuGraphExecNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecNodeSetParams
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphExecNodeSetParams == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6925, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6926
 *     global __cuGraphExecNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecNodeSetParams" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecNodeSetParams == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6927
 *     cuPythonInit()
 *     if __cuGraphExecNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, CUgraphNodeParams*) nogil> __cuGraphExecNodeSetParams)(hGraphExec, hNode, nodeParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6928
 *     if __cuGraphExecNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, CUgraphNodeParams*) nogil> __cuGraphExecNodeSetParams)(hGraphExec, hNode, nodeParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__333, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6928, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6928, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6927
 *     cuPythonInit()
 *     if __cuGraphExecNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, CUgraphNodeParams*) nogil> __cuGraphExecNodeSetParams)(hGraphExec, hNode, nodeParams)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6926
 *     global __cuGraphExecNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6929
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, CUgraphNodeParams*) nogil> __cuGraphExecNodeSetParams)(hGraphExec, hNode, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphExec, CUgraphNode, CUgraphNodeParams *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecNodeSetParams)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":6930
 *             raise RuntimeError('Function "cuGraphExecNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, CUgraphNodeParams*) nogil> __cuGraphExecNodeSetParams)(hGraphExec, hNode, nodeParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6924
 * 
 * cdef CUresult _cuGraphExecNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphExecNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecNodeSetParams == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6923
 *     return err
 * 
 * cdef CUresult _cuGraphExecNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecNodeSetParams
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphExecNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6932
 *     return err
 * 
 * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuOccupancyMaxActiveBlocksPerMultiprocessor
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxActiveBlocksPerMultiprocessor(int *__pyx_v_numBlocks, CUfunction __pyx_v_func, int __pyx_v_blockSize, size_t __pyx_v_dynamicSMemSize) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuOccupancyMaxActiveBlocksPerMultiprocessor", 1);
  __Pyx_TraceCall("_cuOccupancyMaxActiveBlocksPerMultiprocessor", __pyx_f[0], 6932, 1, __PYX_ERR(0, 6932, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6933
 * 
 * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuOccupancyMaxActiveBlocksPerMultiprocessor             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuOccupancyMaxActiveBlocksPerMultiprocessor == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6934
 * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuOccupancyMaxActiveBlocksPerMultiprocessor
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuOccupancyMaxActiveBlocksPerMultiprocessor == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6934, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6935
 *     global __cuOccupancyMaxActiveBlocksPerMultiprocessor
 *     cuPythonInit()
 *     if __cuOccupancyMaxActiveBlocksPerMultiprocessor == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessor" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxActiveBlocksPerMultiprocessor == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6936
 *     cuPythonInit()
 *     if __cuOccupancyMaxActiveBlocksPerMultiprocessor == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessor" not found')
 *     err = (<CUresult (*)(int*, CUfunction, int, size_t) nogil> __cuOccupancyMaxActiveBlocksPerMultiprocessor)(numBlocks, func, blockSize, dynamicSMemSize)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6937
 *     if __cuOccupancyMaxActiveBlocksPerMultiprocessor == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessor" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, CUfunction, int, size_t) nogil> __cuOccupancyMaxActiveBlocksPerMultiprocessor)(numBlocks, func, blockSize, dynamicSMemSize)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__334, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6937, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6937, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6936
 *     cuPythonInit()
 *     if __cuOccupancyMaxActiveBlocksPerMultiprocessor == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessor" not found')
 *     err = (<CUresult (*)(int*, CUfunction, int, size_t) nogil> __cuOccupancyMaxActiveBlocksPerMultiprocessor)(numBlocks, func, blockSize, dynamicSMemSize)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6935
 *     global __cuOccupancyMaxActiveBlocksPerMultiprocessor
 *     cuPythonInit()
 *     if __cuOccupancyMaxActiveBlocksPerMultiprocessor == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessor" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6938
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessor" not found')
 *     err = (<CUresult (*)(int*, CUfunction, int, size_t) nogil> __cuOccupancyMaxActiveBlocksPerMultiprocessor)(numBlocks, func, blockSize, dynamicSMemSize)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(int *, CUfunction, int, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxActiveBlocksPerMultiprocessor)(__pyx_v_numBlocks, __pyx_v_func, __pyx_v_blockSize, __pyx_v_dynamicSMemSize);

    /* "cuda/_cuda/ccuda.pyx":6939
 *             raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessor" not found')
 *     err = (<CUresult (*)(int*, CUfunction, int, size_t) nogil> __cuOccupancyMaxActiveBlocksPerMultiprocessor)(numBlocks, func, blockSize, dynamicSMemSize)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6933
 * 
 * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuOccupancyMaxActiveBlocksPerMultiprocessor             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuOccupancyMaxActiveBlocksPerMultiprocessor == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6932
 *     return err
 * 
 * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuOccupancyMaxActiveBlocksPerMultiprocessor
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuOccupancyMaxActiveBlocksPerMultiprocessor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6941
 *     return err
 * 
 * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int *__pyx_v_numBlocks, CUfunction __pyx_v_func, int __pyx_v_blockSize, size_t __pyx_v_dynamicSMemSize, unsigned int __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", 1);
  __Pyx_TraceCall("_cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", __pyx_f[0], 6941, 1, __PYX_ERR(0, 6941, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6942
 * 
 * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6943
 * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6943, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6944
 *     global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags
 *     cuPythonInit()
 *     if __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6945
 *     cuPythonInit()
 *     if __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags" not found')
 *     err = (<CUresult (*)(int*, CUfunction, int, size_t, unsigned int) nogil> __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags)(numBlocks, func, blockSize, dynamicSMemSize, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6946
 *     if __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, CUfunction, int, size_t, unsigned int) nogil> __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags)(numBlocks, func, blockSize, dynamicSMemSize, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__335, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6946, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6946, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6945
 *     cuPythonInit()
 *     if __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags" not found')
 *     err = (<CUresult (*)(int*, CUfunction, int, size_t, unsigned int) nogil> __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags)(numBlocks, func, blockSize, dynamicSMemSize, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6944
 *     global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags
 *     cuPythonInit()
 *     if __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6947
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags" not found')
 *     err = (<CUresult (*)(int*, CUfunction, int, size_t, unsigned int) nogil> __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags)(numBlocks, func, blockSize, dynamicSMemSize, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(int *, CUfunction, int, size_t, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags)(__pyx_v_numBlocks, __pyx_v_func, __pyx_v_blockSize, __pyx_v_dynamicSMemSize, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":6948
 *             raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags" not found')
 *     err = (<CUresult (*)(int*, CUfunction, int, size_t, unsigned int) nogil> __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags)(numBlocks, func, blockSize, dynamicSMemSize, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6942
 * 
 * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6941
 *     return err
 * 
 * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6950
 *     return err
 * 
 * cdef CUresult _cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuOccupancyMaxPotentialBlockSize
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxPotentialBlockSize(int *__pyx_v_minGridSize, int *__pyx_v_blockSize, CUfunction __pyx_v_func, CUoccupancyB2DSize __pyx_v_blockSizeToDynamicSMemSize, size_t __pyx_v_dynamicSMemSize, int __pyx_v_blockSizeLimit) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuOccupancyMaxPotentialBlockSize", 1);
  __Pyx_TraceCall("_cuOccupancyMaxPotentialBlockSize", __pyx_f[0], 6950, 1, __PYX_ERR(0, 6950, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6951
 * 
 * cdef CUresult _cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuOccupancyMaxPotentialBlockSize             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuOccupancyMaxPotentialBlockSize == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6952
 * cdef CUresult _cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuOccupancyMaxPotentialBlockSize
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuOccupancyMaxPotentialBlockSize == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6952, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6953
 *     global __cuOccupancyMaxPotentialBlockSize
 *     cuPythonInit()
 *     if __cuOccupancyMaxPotentialBlockSize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSize" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxPotentialBlockSize == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6954
 *     cuPythonInit()
 *     if __cuOccupancyMaxPotentialBlockSize == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSize" not found')
 *     err = (<CUresult (*)(int*, int*, CUfunction, CUoccupancyB2DSize, size_t, int) nogil> __cuOccupancyMaxPotentialBlockSize)(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6955
 *     if __cuOccupancyMaxPotentialBlockSize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, int*, CUfunction, CUoccupancyB2DSize, size_t, int) nogil> __cuOccupancyMaxPotentialBlockSize)(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__336, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6955, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6955, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6954
 *     cuPythonInit()
 *     if __cuOccupancyMaxPotentialBlockSize == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSize" not found')
 *     err = (<CUresult (*)(int*, int*, CUfunction, CUoccupancyB2DSize, size_t, int) nogil> __cuOccupancyMaxPotentialBlockSize)(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6953
 *     global __cuOccupancyMaxPotentialBlockSize
 *     cuPythonInit()
 *     if __cuOccupancyMaxPotentialBlockSize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSize" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6956
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSize" not found')
 *     err = (<CUresult (*)(int*, int*, CUfunction, CUoccupancyB2DSize, size_t, int) nogil> __cuOccupancyMaxPotentialBlockSize)(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(int *, int *, CUfunction, CUoccupancyB2DSize, size_t, int))__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxPotentialBlockSize)(__pyx_v_minGridSize, __pyx_v_blockSize, __pyx_v_func, __pyx_v_blockSizeToDynamicSMemSize, __pyx_v_dynamicSMemSize, __pyx_v_blockSizeLimit);

    /* "cuda/_cuda/ccuda.pyx":6957
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSize" not found')
 *     err = (<CUresult (*)(int*, int*, CUfunction, CUoccupancyB2DSize, size_t, int) nogil> __cuOccupancyMaxPotentialBlockSize)(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * 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:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6951
 * 
 * cdef CUresult _cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuOccupancyMaxPotentialBlockSize             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuOccupancyMaxPotentialBlockSize == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6950
 *     return err
 * 
 * cdef CUresult _cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuOccupancyMaxPotentialBlockSize
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuOccupancyMaxPotentialBlockSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6959
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuOccupancyMaxPotentialBlockSizeWithFlags
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxPotentialBlockSizeWithFlags(int *__pyx_v_minGridSize, int *__pyx_v_blockSize, CUfunction __pyx_v_func, CUoccupancyB2DSize __pyx_v_blockSizeToDynamicSMemSize, size_t __pyx_v_dynamicSMemSize, int __pyx_v_blockSizeLimit, unsigned int __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuOccupancyMaxPotentialBlockSizeWithFlags", 1);
  __Pyx_TraceCall("_cuOccupancyMaxPotentialBlockSizeWithFlags", __pyx_f[0], 6959, 1, __PYX_ERR(0, 6959, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6960
 * 
 * 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:
 *     global __cuOccupancyMaxPotentialBlockSizeWithFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuOccupancyMaxPotentialBlockSizeWithFlags == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6961
 * 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:
 *     global __cuOccupancyMaxPotentialBlockSizeWithFlags
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuOccupancyMaxPotentialBlockSizeWithFlags == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6961, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6962
 *     global __cuOccupancyMaxPotentialBlockSizeWithFlags
 *     cuPythonInit()
 *     if __cuOccupancyMaxPotentialBlockSizeWithFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSizeWithFlags" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxPotentialBlockSizeWithFlags == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6963
 *     cuPythonInit()
 *     if __cuOccupancyMaxPotentialBlockSizeWithFlags == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSizeWithFlags" not found')
 *     err = (<CUresult (*)(int*, int*, CUfunction, CUoccupancyB2DSize, size_t, int, unsigned int) nogil> __cuOccupancyMaxPotentialBlockSizeWithFlags)(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6964
 *     if __cuOccupancyMaxPotentialBlockSizeWithFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSizeWithFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, int*, CUfunction, CUoccupancyB2DSize, size_t, int, unsigned int) nogil> __cuOccupancyMaxPotentialBlockSizeWithFlags)(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__337, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6964, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6964, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6963
 *     cuPythonInit()
 *     if __cuOccupancyMaxPotentialBlockSizeWithFlags == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSizeWithFlags" not found')
 *     err = (<CUresult (*)(int*, int*, CUfunction, CUoccupancyB2DSize, size_t, int, unsigned int) nogil> __cuOccupancyMaxPotentialBlockSizeWithFlags)(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6962
 *     global __cuOccupancyMaxPotentialBlockSizeWithFlags
 *     cuPythonInit()
 *     if __cuOccupancyMaxPotentialBlockSizeWithFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSizeWithFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6965
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSizeWithFlags" not found')
 *     err = (<CUresult (*)(int*, int*, CUfunction, CUoccupancyB2DSize, size_t, int, unsigned int) nogil> __cuOccupancyMaxPotentialBlockSizeWithFlags)(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(int *, int *, CUfunction, CUoccupancyB2DSize, size_t, int, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxPotentialBlockSizeWithFlags)(__pyx_v_minGridSize, __pyx_v_blockSize, __pyx_v_func, __pyx_v_blockSizeToDynamicSMemSize, __pyx_v_dynamicSMemSize, __pyx_v_blockSizeLimit, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":6966
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSizeWithFlags" not found')
 *     err = (<CUresult (*)(int*, int*, CUfunction, CUoccupancyB2DSize, size_t, int, unsigned int) nogil> __cuOccupancyMaxPotentialBlockSizeWithFlags)(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6960
 * 
 * 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:
 *     global __cuOccupancyMaxPotentialBlockSizeWithFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuOccupancyMaxPotentialBlockSizeWithFlags == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6959
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuOccupancyMaxPotentialBlockSizeWithFlags
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuOccupancyMaxPotentialBlockSizeWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6968
 *     return err
 * 
 * cdef CUresult _cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuOccupancyAvailableDynamicSMemPerBlock
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyAvailableDynamicSMemPerBlock(size_t *__pyx_v_dynamicSmemSize, CUfunction __pyx_v_func, int __pyx_v_numBlocks, int __pyx_v_blockSize) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuOccupancyAvailableDynamicSMemPerBlock", 1);
  __Pyx_TraceCall("_cuOccupancyAvailableDynamicSMemPerBlock", __pyx_f[0], 6968, 1, __PYX_ERR(0, 6968, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6969
 * 
 * cdef CUresult _cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuOccupancyAvailableDynamicSMemPerBlock             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuOccupancyAvailableDynamicSMemPerBlock == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6970
 * cdef CUresult _cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuOccupancyAvailableDynamicSMemPerBlock
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuOccupancyAvailableDynamicSMemPerBlock == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6970, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6971
 *     global __cuOccupancyAvailableDynamicSMemPerBlock
 *     cuPythonInit()
 *     if __cuOccupancyAvailableDynamicSMemPerBlock == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyAvailableDynamicSMemPerBlock" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyAvailableDynamicSMemPerBlock == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6972
 *     cuPythonInit()
 *     if __cuOccupancyAvailableDynamicSMemPerBlock == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuOccupancyAvailableDynamicSMemPerBlock" not found')
 *     err = (<CUresult (*)(size_t*, CUfunction, int, int) nogil> __cuOccupancyAvailableDynamicSMemPerBlock)(dynamicSmemSize, func, numBlocks, blockSize)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6973
 *     if __cuOccupancyAvailableDynamicSMemPerBlock == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyAvailableDynamicSMemPerBlock" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(size_t*, CUfunction, int, int) nogil> __cuOccupancyAvailableDynamicSMemPerBlock)(dynamicSmemSize, func, numBlocks, blockSize)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__338, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6973, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6973, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6972
 *     cuPythonInit()
 *     if __cuOccupancyAvailableDynamicSMemPerBlock == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuOccupancyAvailableDynamicSMemPerBlock" not found')
 *     err = (<CUresult (*)(size_t*, CUfunction, int, int) nogil> __cuOccupancyAvailableDynamicSMemPerBlock)(dynamicSmemSize, func, numBlocks, blockSize)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6971
 *     global __cuOccupancyAvailableDynamicSMemPerBlock
 *     cuPythonInit()
 *     if __cuOccupancyAvailableDynamicSMemPerBlock == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyAvailableDynamicSMemPerBlock" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6974
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyAvailableDynamicSMemPerBlock" not found')
 *     err = (<CUresult (*)(size_t*, CUfunction, int, int) nogil> __cuOccupancyAvailableDynamicSMemPerBlock)(dynamicSmemSize, func, numBlocks, blockSize)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(size_t *, CUfunction, int, int))__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyAvailableDynamicSMemPerBlock)(__pyx_v_dynamicSmemSize, __pyx_v_func, __pyx_v_numBlocks, __pyx_v_blockSize);

    /* "cuda/_cuda/ccuda.pyx":6975
 *             raise RuntimeError('Function "cuOccupancyAvailableDynamicSMemPerBlock" not found')
 *     err = (<CUresult (*)(size_t*, CUfunction, int, int) nogil> __cuOccupancyAvailableDynamicSMemPerBlock)(dynamicSmemSize, func, numBlocks, blockSize)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6969
 * 
 * cdef CUresult _cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuOccupancyAvailableDynamicSMemPerBlock             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuOccupancyAvailableDynamicSMemPerBlock == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6968
 *     return err
 * 
 * cdef CUresult _cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuOccupancyAvailableDynamicSMemPerBlock
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuOccupancyAvailableDynamicSMemPerBlock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6977
 *     return err
 * 
 * cdef CUresult _cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuOccupancyMaxPotentialClusterSize
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxPotentialClusterSize(int *__pyx_v_clusterSize, CUfunction __pyx_v_func, CUlaunchConfig const *__pyx_v_config) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuOccupancyMaxPotentialClusterSize", 1);
  __Pyx_TraceCall("_cuOccupancyMaxPotentialClusterSize", __pyx_f[0], 6977, 1, __PYX_ERR(0, 6977, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6978
 * 
 * cdef CUresult _cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuOccupancyMaxPotentialClusterSize             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuOccupancyMaxPotentialClusterSize == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6979
 * cdef CUresult _cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuOccupancyMaxPotentialClusterSize
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuOccupancyMaxPotentialClusterSize == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6979, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6980
 *     global __cuOccupancyMaxPotentialClusterSize
 *     cuPythonInit()
 *     if __cuOccupancyMaxPotentialClusterSize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialClusterSize" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxPotentialClusterSize == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6981
 *     cuPythonInit()
 *     if __cuOccupancyMaxPotentialClusterSize == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialClusterSize" not found')
 *     err = (<CUresult (*)(int*, CUfunction, const CUlaunchConfig*) nogil> __cuOccupancyMaxPotentialClusterSize)(clusterSize, func, config)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6982
 *     if __cuOccupancyMaxPotentialClusterSize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialClusterSize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, CUfunction, const CUlaunchConfig*) nogil> __cuOccupancyMaxPotentialClusterSize)(clusterSize, func, config)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__339, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6982, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6982, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6981
 *     cuPythonInit()
 *     if __cuOccupancyMaxPotentialClusterSize == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialClusterSize" not found')
 *     err = (<CUresult (*)(int*, CUfunction, const CUlaunchConfig*) nogil> __cuOccupancyMaxPotentialClusterSize)(clusterSize, func, config)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6980
 *     global __cuOccupancyMaxPotentialClusterSize
 *     cuPythonInit()
 *     if __cuOccupancyMaxPotentialClusterSize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialClusterSize" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6983
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialClusterSize" not found')
 *     err = (<CUresult (*)(int*, CUfunction, const CUlaunchConfig*) nogil> __cuOccupancyMaxPotentialClusterSize)(clusterSize, func, config)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(int *, CUfunction, CUlaunchConfig const *))__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxPotentialClusterSize)(__pyx_v_clusterSize, __pyx_v_func, __pyx_v_config);

    /* "cuda/_cuda/ccuda.pyx":6984
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialClusterSize" not found')
 *     err = (<CUresult (*)(int*, CUfunction, const CUlaunchConfig*) nogil> __cuOccupancyMaxPotentialClusterSize)(clusterSize, func, config)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6978
 * 
 * cdef CUresult _cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuOccupancyMaxPotentialClusterSize             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuOccupancyMaxPotentialClusterSize == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6977
 *     return err
 * 
 * cdef CUresult _cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuOccupancyMaxPotentialClusterSize
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuOccupancyMaxPotentialClusterSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6986
 *     return err
 * 
 * cdef CUresult _cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuOccupancyMaxActiveClusters
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxActiveClusters(int *__pyx_v_numClusters, CUfunction __pyx_v_func, CUlaunchConfig const *__pyx_v_config) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuOccupancyMaxActiveClusters", 1);
  __Pyx_TraceCall("_cuOccupancyMaxActiveClusters", __pyx_f[0], 6986, 1, __PYX_ERR(0, 6986, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6987
 * 
 * cdef CUresult _cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuOccupancyMaxActiveClusters             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuOccupancyMaxActiveClusters == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6988
 * cdef CUresult _cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuOccupancyMaxActiveClusters
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuOccupancyMaxActiveClusters == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6988, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6989
 *     global __cuOccupancyMaxActiveClusters
 *     cuPythonInit()
 *     if __cuOccupancyMaxActiveClusters == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxActiveClusters" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxActiveClusters == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6990
 *     cuPythonInit()
 *     if __cuOccupancyMaxActiveClusters == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuOccupancyMaxActiveClusters" not found')
 *     err = (<CUresult (*)(int*, CUfunction, const CUlaunchConfig*) nogil> __cuOccupancyMaxActiveClusters)(numClusters, func, config)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6991
 *     if __cuOccupancyMaxActiveClusters == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxActiveClusters" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, CUfunction, const CUlaunchConfig*) nogil> __cuOccupancyMaxActiveClusters)(numClusters, func, config)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__340, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6991, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6991, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6990
 *     cuPythonInit()
 *     if __cuOccupancyMaxActiveClusters == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuOccupancyMaxActiveClusters" not found')
 *     err = (<CUresult (*)(int*, CUfunction, const CUlaunchConfig*) nogil> __cuOccupancyMaxActiveClusters)(numClusters, func, config)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6989
 *     global __cuOccupancyMaxActiveClusters
 *     cuPythonInit()
 *     if __cuOccupancyMaxActiveClusters == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxActiveClusters" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6992
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxActiveClusters" not found')
 *     err = (<CUresult (*)(int*, CUfunction, const CUlaunchConfig*) nogil> __cuOccupancyMaxActiveClusters)(numClusters, func, config)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(int *, CUfunction, CUlaunchConfig const *))__pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxActiveClusters)(__pyx_v_numClusters, __pyx_v_func, __pyx_v_config);

    /* "cuda/_cuda/ccuda.pyx":6993
 *             raise RuntimeError('Function "cuOccupancyMaxActiveClusters" not found')
 *     err = (<CUresult (*)(int*, CUfunction, const CUlaunchConfig*) nogil> __cuOccupancyMaxActiveClusters)(numClusters, func, config)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6987
 * 
 * cdef CUresult _cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuOccupancyMaxActiveClusters             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuOccupancyMaxActiveClusters == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6986
 *     return err
 * 
 * cdef CUresult _cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuOccupancyMaxActiveClusters
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuOccupancyMaxActiveClusters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6995
 *     return err
 * 
 * cdef CUresult _cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetArray
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetArray(CUtexref __pyx_v_hTexRef, CUarray __pyx_v_hArray, unsigned int __pyx_v_Flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexRefSetArray", 1);
  __Pyx_TraceCall("_cuTexRefSetArray", __pyx_f[0], 6995, 1, __PYX_ERR(0, 6995, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6996
 * 
 * cdef CUresult _cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetArray == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6997
 * cdef CUresult _cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetArray
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexRefSetArray == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6997, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6998
 *     global __cuTexRefSetArray
 *     cuPythonInit()
 *     if __cuTexRefSetArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetArray" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetArray == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6999
 *     cuPythonInit()
 *     if __cuTexRefSetArray == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefSetArray" not found')
 *     err = (<CUresult (*)(CUtexref, CUarray, unsigned int) nogil> __cuTexRefSetArray)(hTexRef, hArray, Flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7000
 *     if __cuTexRefSetArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, CUarray, unsigned int) nogil> __cuTexRefSetArray)(hTexRef, hArray, Flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__341, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7000, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7000, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6999
 *     cuPythonInit()
 *     if __cuTexRefSetArray == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefSetArray" not found')
 *     err = (<CUresult (*)(CUtexref, CUarray, unsigned int) nogil> __cuTexRefSetArray)(hTexRef, hArray, Flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6998
 *     global __cuTexRefSetArray
 *     cuPythonInit()
 *     if __cuTexRefSetArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7001
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetArray" not found')
 *     err = (<CUresult (*)(CUtexref, CUarray, unsigned int) nogil> __cuTexRefSetArray)(hTexRef, hArray, Flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUtexref, CUarray, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetArray)(__pyx_v_hTexRef, __pyx_v_hArray, __pyx_v_Flags);

    /* "cuda/_cuda/ccuda.pyx":7002
 *             raise RuntimeError('Function "cuTexRefSetArray" not found')
 *     err = (<CUresult (*)(CUtexref, CUarray, unsigned int) nogil> __cuTexRefSetArray)(hTexRef, hArray, Flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6996
 * 
 * cdef CUresult _cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetArray == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6995
 *     return err
 * 
 * cdef CUresult _cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetArray
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexRefSetArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7004
 *     return err
 * 
 * cdef CUresult _cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetMipmappedArray
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmappedArray(CUtexref __pyx_v_hTexRef, CUmipmappedArray __pyx_v_hMipmappedArray, unsigned int __pyx_v_Flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexRefSetMipmappedArray", 1);
  __Pyx_TraceCall("_cuTexRefSetMipmappedArray", __pyx_f[0], 7004, 1, __PYX_ERR(0, 7004, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7005
 * 
 * cdef CUresult _cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetMipmappedArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetMipmappedArray == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7006
 * cdef CUresult _cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetMipmappedArray
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexRefSetMipmappedArray == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7006, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7007
 *     global __cuTexRefSetMipmappedArray
 *     cuPythonInit()
 *     if __cuTexRefSetMipmappedArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmappedArray" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmappedArray == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7008
 *     cuPythonInit()
 *     if __cuTexRefSetMipmappedArray == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefSetMipmappedArray" not found')
 *     err = (<CUresult (*)(CUtexref, CUmipmappedArray, unsigned int) nogil> __cuTexRefSetMipmappedArray)(hTexRef, hMipmappedArray, Flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7009
 *     if __cuTexRefSetMipmappedArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmappedArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, CUmipmappedArray, unsigned int) nogil> __cuTexRefSetMipmappedArray)(hTexRef, hMipmappedArray, Flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__342, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7009, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7009, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7008
 *     cuPythonInit()
 *     if __cuTexRefSetMipmappedArray == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefSetMipmappedArray" not found')
 *     err = (<CUresult (*)(CUtexref, CUmipmappedArray, unsigned int) nogil> __cuTexRefSetMipmappedArray)(hTexRef, hMipmappedArray, Flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7007
 *     global __cuTexRefSetMipmappedArray
 *     cuPythonInit()
 *     if __cuTexRefSetMipmappedArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmappedArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7010
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmappedArray" not found')
 *     err = (<CUresult (*)(CUtexref, CUmipmappedArray, unsigned int) nogil> __cuTexRefSetMipmappedArray)(hTexRef, hMipmappedArray, Flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUtexref, CUmipmappedArray, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmappedArray)(__pyx_v_hTexRef, __pyx_v_hMipmappedArray, __pyx_v_Flags);

    /* "cuda/_cuda/ccuda.pyx":7011
 *             raise RuntimeError('Function "cuTexRefSetMipmappedArray" not found')
 *     err = (<CUresult (*)(CUtexref, CUmipmappedArray, unsigned int) nogil> __cuTexRefSetMipmappedArray)(hTexRef, hMipmappedArray, Flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefSetAddress_v2(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7005
 * 
 * cdef CUresult _cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetMipmappedArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetMipmappedArray == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7004
 *     return err
 * 
 * cdef CUresult _cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetMipmappedArray
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexRefSetMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7013
 *     return err
 * 
 * cdef CUresult _cuTexRefSetAddress_v2(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetAddress_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetAddress_v2(size_t *__pyx_v_ByteOffset, CUtexref __pyx_v_hTexRef, CUdeviceptr __pyx_v_dptr, size_t __pyx_v_numbytes) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexRefSetAddress_v2", 1);
  __Pyx_TraceCall("_cuTexRefSetAddress_v2", __pyx_f[0], 7013, 1, __PYX_ERR(0, 7013, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7014
 * 
 * cdef CUresult _cuTexRefSetAddress_v2(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetAddress_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetAddress_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7015
 * cdef CUresult _cuTexRefSetAddress_v2(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetAddress_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexRefSetAddress_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7015, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7016
 *     global __cuTexRefSetAddress_v2
 *     cuPythonInit()
 *     if __cuTexRefSetAddress_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetAddress_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetAddress_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7017
 *     cuPythonInit()
 *     if __cuTexRefSetAddress_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefSetAddress_v2" not found')
 *     err = (<CUresult (*)(size_t*, CUtexref, CUdeviceptr, size_t) nogil> __cuTexRefSetAddress_v2)(ByteOffset, hTexRef, dptr, numbytes)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7018
 *     if __cuTexRefSetAddress_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetAddress_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(size_t*, CUtexref, CUdeviceptr, size_t) nogil> __cuTexRefSetAddress_v2)(ByteOffset, hTexRef, dptr, numbytes)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__343, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7018, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7018, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7017
 *     cuPythonInit()
 *     if __cuTexRefSetAddress_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefSetAddress_v2" not found')
 *     err = (<CUresult (*)(size_t*, CUtexref, CUdeviceptr, size_t) nogil> __cuTexRefSetAddress_v2)(ByteOffset, hTexRef, dptr, numbytes)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7016
 *     global __cuTexRefSetAddress_v2
 *     cuPythonInit()
 *     if __cuTexRefSetAddress_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetAddress_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7019
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetAddress_v2" not found')
 *     err = (<CUresult (*)(size_t*, CUtexref, CUdeviceptr, size_t) nogil> __cuTexRefSetAddress_v2)(ByteOffset, hTexRef, dptr, numbytes)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(size_t *, CUtexref, CUdeviceptr, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetAddress_v2)(__pyx_v_ByteOffset, __pyx_v_hTexRef, __pyx_v_dptr, __pyx_v_numbytes);

    /* "cuda/_cuda/ccuda.pyx":7020
 *             raise RuntimeError('Function "cuTexRefSetAddress_v2" not found')
 *     err = (<CUresult (*)(size_t*, CUtexref, CUdeviceptr, size_t) nogil> __cuTexRefSetAddress_v2)(ByteOffset, hTexRef, dptr, numbytes)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefSetAddress2D_v3(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7014
 * 
 * cdef CUresult _cuTexRefSetAddress_v2(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetAddress_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetAddress_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7013
 *     return err
 * 
 * cdef CUresult _cuTexRefSetAddress_v2(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetAddress_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexRefSetAddress_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7022
 *     return err
 * 
 * cdef CUresult _cuTexRefSetAddress2D_v3(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetAddress2D_v3
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetAddress2D_v3(CUtexref __pyx_v_hTexRef, CUDA_ARRAY_DESCRIPTOR const *__pyx_v_desc, CUdeviceptr __pyx_v_dptr, size_t __pyx_v_Pitch) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexRefSetAddress2D_v3", 1);
  __Pyx_TraceCall("_cuTexRefSetAddress2D_v3", __pyx_f[0], 7022, 1, __PYX_ERR(0, 7022, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7023
 * 
 * cdef CUresult _cuTexRefSetAddress2D_v3(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetAddress2D_v3             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetAddress2D_v3 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7024
 * cdef CUresult _cuTexRefSetAddress2D_v3(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetAddress2D_v3
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexRefSetAddress2D_v3 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7024, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7025
 *     global __cuTexRefSetAddress2D_v3
 *     cuPythonInit()
 *     if __cuTexRefSetAddress2D_v3 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetAddress2D_v3" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetAddress2D_v3 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7026
 *     cuPythonInit()
 *     if __cuTexRefSetAddress2D_v3 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefSetAddress2D_v3" not found')
 *     err = (<CUresult (*)(CUtexref, const CUDA_ARRAY_DESCRIPTOR*, CUdeviceptr, size_t) nogil> __cuTexRefSetAddress2D_v3)(hTexRef, desc, dptr, Pitch)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7027
 *     if __cuTexRefSetAddress2D_v3 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetAddress2D_v3" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, const CUDA_ARRAY_DESCRIPTOR*, CUdeviceptr, size_t) nogil> __cuTexRefSetAddress2D_v3)(hTexRef, desc, dptr, Pitch)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__344, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7027, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7027, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7026
 *     cuPythonInit()
 *     if __cuTexRefSetAddress2D_v3 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefSetAddress2D_v3" not found')
 *     err = (<CUresult (*)(CUtexref, const CUDA_ARRAY_DESCRIPTOR*, CUdeviceptr, size_t) nogil> __cuTexRefSetAddress2D_v3)(hTexRef, desc, dptr, Pitch)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7025
 *     global __cuTexRefSetAddress2D_v3
 *     cuPythonInit()
 *     if __cuTexRefSetAddress2D_v3 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetAddress2D_v3" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7028
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetAddress2D_v3" not found')
 *     err = (<CUresult (*)(CUtexref, const CUDA_ARRAY_DESCRIPTOR*, CUdeviceptr, size_t) nogil> __cuTexRefSetAddress2D_v3)(hTexRef, desc, dptr, Pitch)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUtexref, CUDA_ARRAY_DESCRIPTOR const *, CUdeviceptr, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetAddress2D_v3)(__pyx_v_hTexRef, __pyx_v_desc, __pyx_v_dptr, __pyx_v_Pitch);

    /* "cuda/_cuda/ccuda.pyx":7029
 *             raise RuntimeError('Function "cuTexRefSetAddress2D_v3" not found')
 *     err = (<CUresult (*)(CUtexref, const CUDA_ARRAY_DESCRIPTOR*, CUdeviceptr, size_t) nogil> __cuTexRefSetAddress2D_v3)(hTexRef, desc, dptr, Pitch)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7023
 * 
 * cdef CUresult _cuTexRefSetAddress2D_v3(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetAddress2D_v3             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetAddress2D_v3 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7022
 *     return err
 * 
 * cdef CUresult _cuTexRefSetAddress2D_v3(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetAddress2D_v3
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexRefSetAddress2D_v3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7031
 *     return err
 * 
 * cdef CUresult _cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetFormat
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetFormat(CUtexref __pyx_v_hTexRef, CUarray_format __pyx_v_fmt, int __pyx_v_NumPackedComponents) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexRefSetFormat", 1);
  __Pyx_TraceCall("_cuTexRefSetFormat", __pyx_f[0], 7031, 1, __PYX_ERR(0, 7031, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7032
 * 
 * cdef CUresult _cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetFormat             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetFormat == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7033
 * cdef CUresult _cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetFormat
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexRefSetFormat == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7033, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7034
 *     global __cuTexRefSetFormat
 *     cuPythonInit()
 *     if __cuTexRefSetFormat == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFormat" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFormat == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7035
 *     cuPythonInit()
 *     if __cuTexRefSetFormat == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefSetFormat" not found')
 *     err = (<CUresult (*)(CUtexref, CUarray_format, int) nogil> __cuTexRefSetFormat)(hTexRef, fmt, NumPackedComponents)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7036
 *     if __cuTexRefSetFormat == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFormat" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, CUarray_format, int) nogil> __cuTexRefSetFormat)(hTexRef, fmt, NumPackedComponents)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__345, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7036, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7036, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7035
 *     cuPythonInit()
 *     if __cuTexRefSetFormat == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefSetFormat" not found')
 *     err = (<CUresult (*)(CUtexref, CUarray_format, int) nogil> __cuTexRefSetFormat)(hTexRef, fmt, NumPackedComponents)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7034
 *     global __cuTexRefSetFormat
 *     cuPythonInit()
 *     if __cuTexRefSetFormat == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFormat" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7037
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFormat" not found')
 *     err = (<CUresult (*)(CUtexref, CUarray_format, int) nogil> __cuTexRefSetFormat)(hTexRef, fmt, NumPackedComponents)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUtexref, CUarray_format, int))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFormat)(__pyx_v_hTexRef, __pyx_v_fmt, __pyx_v_NumPackedComponents);

    /* "cuda/_cuda/ccuda.pyx":7038
 *             raise RuntimeError('Function "cuTexRefSetFormat" not found')
 *     err = (<CUresult (*)(CUtexref, CUarray_format, int) nogil> __cuTexRefSetFormat)(hTexRef, fmt, NumPackedComponents)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7032
 * 
 * cdef CUresult _cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetFormat             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetFormat == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7031
 *     return err
 * 
 * cdef CUresult _cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetFormat
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexRefSetFormat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7040
 *     return err
 * 
 * cdef CUresult _cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetAddressMode
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetAddressMode(CUtexref __pyx_v_hTexRef, int __pyx_v_dim, CUaddress_mode __pyx_v_am) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexRefSetAddressMode", 1);
  __Pyx_TraceCall("_cuTexRefSetAddressMode", __pyx_f[0], 7040, 1, __PYX_ERR(0, 7040, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7041
 * 
 * cdef CUresult _cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetAddressMode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetAddressMode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7042
 * cdef CUresult _cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetAddressMode
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexRefSetAddressMode == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7042, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7043
 *     global __cuTexRefSetAddressMode
 *     cuPythonInit()
 *     if __cuTexRefSetAddressMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetAddressMode" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetAddressMode == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7044
 *     cuPythonInit()
 *     if __cuTexRefSetAddressMode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefSetAddressMode" not found')
 *     err = (<CUresult (*)(CUtexref, int, CUaddress_mode) nogil> __cuTexRefSetAddressMode)(hTexRef, dim, am)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7045
 *     if __cuTexRefSetAddressMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetAddressMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, int, CUaddress_mode) nogil> __cuTexRefSetAddressMode)(hTexRef, dim, am)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__346, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7045, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7045, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7044
 *     cuPythonInit()
 *     if __cuTexRefSetAddressMode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefSetAddressMode" not found')
 *     err = (<CUresult (*)(CUtexref, int, CUaddress_mode) nogil> __cuTexRefSetAddressMode)(hTexRef, dim, am)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7043
 *     global __cuTexRefSetAddressMode
 *     cuPythonInit()
 *     if __cuTexRefSetAddressMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetAddressMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7046
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetAddressMode" not found')
 *     err = (<CUresult (*)(CUtexref, int, CUaddress_mode) nogil> __cuTexRefSetAddressMode)(hTexRef, dim, am)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUtexref, int, CUaddress_mode))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetAddressMode)(__pyx_v_hTexRef, __pyx_v_dim, __pyx_v_am);

    /* "cuda/_cuda/ccuda.pyx":7047
 *             raise RuntimeError('Function "cuTexRefSetAddressMode" not found')
 *     err = (<CUresult (*)(CUtexref, int, CUaddress_mode) nogil> __cuTexRefSetAddressMode)(hTexRef, dim, am)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7041
 * 
 * cdef CUresult _cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetAddressMode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetAddressMode == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7040
 *     return err
 * 
 * cdef CUresult _cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetAddressMode
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexRefSetAddressMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7049
 *     return err
 * 
 * cdef CUresult _cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetFilterMode
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetFilterMode(CUtexref __pyx_v_hTexRef, CUfilter_mode __pyx_v_fm) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexRefSetFilterMode", 1);
  __Pyx_TraceCall("_cuTexRefSetFilterMode", __pyx_f[0], 7049, 1, __PYX_ERR(0, 7049, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7050
 * 
 * cdef CUresult _cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetFilterMode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetFilterMode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7051
 * cdef CUresult _cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetFilterMode
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexRefSetFilterMode == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7051, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7052
 *     global __cuTexRefSetFilterMode
 *     cuPythonInit()
 *     if __cuTexRefSetFilterMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFilterMode" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFilterMode == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7053
 *     cuPythonInit()
 *     if __cuTexRefSetFilterMode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefSetFilterMode" not found')
 *     err = (<CUresult (*)(CUtexref, CUfilter_mode) nogil> __cuTexRefSetFilterMode)(hTexRef, fm)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7054
 *     if __cuTexRefSetFilterMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFilterMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, CUfilter_mode) nogil> __cuTexRefSetFilterMode)(hTexRef, fm)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__347, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7054, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7054, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7053
 *     cuPythonInit()
 *     if __cuTexRefSetFilterMode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefSetFilterMode" not found')
 *     err = (<CUresult (*)(CUtexref, CUfilter_mode) nogil> __cuTexRefSetFilterMode)(hTexRef, fm)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7052
 *     global __cuTexRefSetFilterMode
 *     cuPythonInit()
 *     if __cuTexRefSetFilterMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFilterMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7055
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFilterMode" not found')
 *     err = (<CUresult (*)(CUtexref, CUfilter_mode) nogil> __cuTexRefSetFilterMode)(hTexRef, fm)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUtexref, CUfilter_mode))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFilterMode)(__pyx_v_hTexRef, __pyx_v_fm);

    /* "cuda/_cuda/ccuda.pyx":7056
 *             raise RuntimeError('Function "cuTexRefSetFilterMode" not found')
 *     err = (<CUresult (*)(CUtexref, CUfilter_mode) nogil> __cuTexRefSetFilterMode)(hTexRef, fm)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7050
 * 
 * cdef CUresult _cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetFilterMode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetFilterMode == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7049
 *     return err
 * 
 * cdef CUresult _cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetFilterMode
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexRefSetFilterMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7058
 *     return err
 * 
 * cdef CUresult _cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetMipmapFilterMode
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmapFilterMode(CUtexref __pyx_v_hTexRef, CUfilter_mode __pyx_v_fm) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexRefSetMipmapFilterMode", 1);
  __Pyx_TraceCall("_cuTexRefSetMipmapFilterMode", __pyx_f[0], 7058, 1, __PYX_ERR(0, 7058, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7059
 * 
 * cdef CUresult _cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetMipmapFilterMode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapFilterMode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7060
 * cdef CUresult _cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetMipmapFilterMode
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexRefSetMipmapFilterMode == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7060, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7061
 *     global __cuTexRefSetMipmapFilterMode
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapFilterMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapFilterMode" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapFilterMode == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7062
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapFilterMode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefSetMipmapFilterMode" not found')
 *     err = (<CUresult (*)(CUtexref, CUfilter_mode) nogil> __cuTexRefSetMipmapFilterMode)(hTexRef, fm)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7063
 *     if __cuTexRefSetMipmapFilterMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapFilterMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, CUfilter_mode) nogil> __cuTexRefSetMipmapFilterMode)(hTexRef, fm)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__348, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7063, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7063, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7062
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapFilterMode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefSetMipmapFilterMode" not found')
 *     err = (<CUresult (*)(CUtexref, CUfilter_mode) nogil> __cuTexRefSetMipmapFilterMode)(hTexRef, fm)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7061
 *     global __cuTexRefSetMipmapFilterMode
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapFilterMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapFilterMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7064
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapFilterMode" not found')
 *     err = (<CUresult (*)(CUtexref, CUfilter_mode) nogil> __cuTexRefSetMipmapFilterMode)(hTexRef, fm)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUtexref, CUfilter_mode))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapFilterMode)(__pyx_v_hTexRef, __pyx_v_fm);

    /* "cuda/_cuda/ccuda.pyx":7065
 *             raise RuntimeError('Function "cuTexRefSetMipmapFilterMode" not found')
 *     err = (<CUresult (*)(CUtexref, CUfilter_mode) nogil> __cuTexRefSetMipmapFilterMode)(hTexRef, fm)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7059
 * 
 * cdef CUresult _cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetMipmapFilterMode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapFilterMode == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7058
 *     return err
 * 
 * cdef CUresult _cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetMipmapFilterMode
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexRefSetMipmapFilterMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7067
 *     return err
 * 
 * cdef CUresult _cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetMipmapLevelBias
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmapLevelBias(CUtexref __pyx_v_hTexRef, float __pyx_v_bias) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexRefSetMipmapLevelBias", 1);
  __Pyx_TraceCall("_cuTexRefSetMipmapLevelBias", __pyx_f[0], 7067, 1, __PYX_ERR(0, 7067, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7068
 * 
 * cdef CUresult _cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetMipmapLevelBias             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapLevelBias == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7069
 * cdef CUresult _cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetMipmapLevelBias
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexRefSetMipmapLevelBias == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7069, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7070
 *     global __cuTexRefSetMipmapLevelBias
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapLevelBias == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapLevelBias" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapLevelBias == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7071
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapLevelBias == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefSetMipmapLevelBias" not found')
 *     err = (<CUresult (*)(CUtexref, float) nogil> __cuTexRefSetMipmapLevelBias)(hTexRef, bias)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7072
 *     if __cuTexRefSetMipmapLevelBias == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapLevelBias" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, float) nogil> __cuTexRefSetMipmapLevelBias)(hTexRef, bias)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__349, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7072, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7072, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7071
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapLevelBias == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefSetMipmapLevelBias" not found')
 *     err = (<CUresult (*)(CUtexref, float) nogil> __cuTexRefSetMipmapLevelBias)(hTexRef, bias)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7070
 *     global __cuTexRefSetMipmapLevelBias
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapLevelBias == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapLevelBias" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7073
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapLevelBias" not found')
 *     err = (<CUresult (*)(CUtexref, float) nogil> __cuTexRefSetMipmapLevelBias)(hTexRef, bias)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUtexref, float))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapLevelBias)(__pyx_v_hTexRef, __pyx_v_bias);

    /* "cuda/_cuda/ccuda.pyx":7074
 *             raise RuntimeError('Function "cuTexRefSetMipmapLevelBias" not found')
 *     err = (<CUresult (*)(CUtexref, float) nogil> __cuTexRefSetMipmapLevelBias)(hTexRef, bias)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7068
 * 
 * cdef CUresult _cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetMipmapLevelBias             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapLevelBias == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7067
 *     return err
 * 
 * cdef CUresult _cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetMipmapLevelBias
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexRefSetMipmapLevelBias", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7076
 *     return err
 * 
 * cdef CUresult _cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetMipmapLevelClamp
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmapLevelClamp(CUtexref __pyx_v_hTexRef, float __pyx_v_minMipmapLevelClamp, float __pyx_v_maxMipmapLevelClamp) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexRefSetMipmapLevelClamp", 1);
  __Pyx_TraceCall("_cuTexRefSetMipmapLevelClamp", __pyx_f[0], 7076, 1, __PYX_ERR(0, 7076, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7077
 * 
 * cdef CUresult _cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetMipmapLevelClamp             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapLevelClamp == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7078
 * cdef CUresult _cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetMipmapLevelClamp
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexRefSetMipmapLevelClamp == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7078, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7079
 *     global __cuTexRefSetMipmapLevelClamp
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapLevelClamp == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapLevelClamp" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapLevelClamp == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7080
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapLevelClamp == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefSetMipmapLevelClamp" not found')
 *     err = (<CUresult (*)(CUtexref, float, float) nogil> __cuTexRefSetMipmapLevelClamp)(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7081
 *     if __cuTexRefSetMipmapLevelClamp == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapLevelClamp" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, float, float) nogil> __cuTexRefSetMipmapLevelClamp)(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__350, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7081, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7081, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7080
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapLevelClamp == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefSetMipmapLevelClamp" not found')
 *     err = (<CUresult (*)(CUtexref, float, float) nogil> __cuTexRefSetMipmapLevelClamp)(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7079
 *     global __cuTexRefSetMipmapLevelClamp
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapLevelClamp == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapLevelClamp" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7082
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapLevelClamp" not found')
 *     err = (<CUresult (*)(CUtexref, float, float) nogil> __cuTexRefSetMipmapLevelClamp)(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUtexref, float, float))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapLevelClamp)(__pyx_v_hTexRef, __pyx_v_minMipmapLevelClamp, __pyx_v_maxMipmapLevelClamp);

    /* "cuda/_cuda/ccuda.pyx":7083
 *             raise RuntimeError('Function "cuTexRefSetMipmapLevelClamp" not found')
 *     err = (<CUresult (*)(CUtexref, float, float) nogil> __cuTexRefSetMipmapLevelClamp)(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7077
 * 
 * cdef CUresult _cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetMipmapLevelClamp             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapLevelClamp == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7076
 *     return err
 * 
 * cdef CUresult _cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetMipmapLevelClamp
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexRefSetMipmapLevelClamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7085
 *     return err
 * 
 * cdef CUresult _cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetMaxAnisotropy
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMaxAnisotropy(CUtexref __pyx_v_hTexRef, unsigned int __pyx_v_maxAniso) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexRefSetMaxAnisotropy", 1);
  __Pyx_TraceCall("_cuTexRefSetMaxAnisotropy", __pyx_f[0], 7085, 1, __PYX_ERR(0, 7085, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7086
 * 
 * cdef CUresult _cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetMaxAnisotropy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetMaxAnisotropy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7087
 * cdef CUresult _cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetMaxAnisotropy
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexRefSetMaxAnisotropy == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7087, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7088
 *     global __cuTexRefSetMaxAnisotropy
 *     cuPythonInit()
 *     if __cuTexRefSetMaxAnisotropy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMaxAnisotropy" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMaxAnisotropy == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7089
 *     cuPythonInit()
 *     if __cuTexRefSetMaxAnisotropy == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefSetMaxAnisotropy" not found')
 *     err = (<CUresult (*)(CUtexref, unsigned int) nogil> __cuTexRefSetMaxAnisotropy)(hTexRef, maxAniso)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7090
 *     if __cuTexRefSetMaxAnisotropy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMaxAnisotropy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, unsigned int) nogil> __cuTexRefSetMaxAnisotropy)(hTexRef, maxAniso)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__351, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7090, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7090, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7089
 *     cuPythonInit()
 *     if __cuTexRefSetMaxAnisotropy == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefSetMaxAnisotropy" not found')
 *     err = (<CUresult (*)(CUtexref, unsigned int) nogil> __cuTexRefSetMaxAnisotropy)(hTexRef, maxAniso)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7088
 *     global __cuTexRefSetMaxAnisotropy
 *     cuPythonInit()
 *     if __cuTexRefSetMaxAnisotropy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMaxAnisotropy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7091
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMaxAnisotropy" not found')
 *     err = (<CUresult (*)(CUtexref, unsigned int) nogil> __cuTexRefSetMaxAnisotropy)(hTexRef, maxAniso)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUtexref, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMaxAnisotropy)(__pyx_v_hTexRef, __pyx_v_maxAniso);

    /* "cuda/_cuda/ccuda.pyx":7092
 *             raise RuntimeError('Function "cuTexRefSetMaxAnisotropy" not found')
 *     err = (<CUresult (*)(CUtexref, unsigned int) nogil> __cuTexRefSetMaxAnisotropy)(hTexRef, maxAniso)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7086
 * 
 * cdef CUresult _cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetMaxAnisotropy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetMaxAnisotropy == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7085
 *     return err
 * 
 * cdef CUresult _cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetMaxAnisotropy
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexRefSetMaxAnisotropy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7094
 *     return err
 * 
 * cdef CUresult _cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetBorderColor
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetBorderColor(CUtexref __pyx_v_hTexRef, float *__pyx_v_pBorderColor) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexRefSetBorderColor", 1);
  __Pyx_TraceCall("_cuTexRefSetBorderColor", __pyx_f[0], 7094, 1, __PYX_ERR(0, 7094, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7095
 * 
 * cdef CUresult _cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetBorderColor             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetBorderColor == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7096
 * cdef CUresult _cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetBorderColor
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexRefSetBorderColor == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7096, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7097
 *     global __cuTexRefSetBorderColor
 *     cuPythonInit()
 *     if __cuTexRefSetBorderColor == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetBorderColor" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetBorderColor == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7098
 *     cuPythonInit()
 *     if __cuTexRefSetBorderColor == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefSetBorderColor" not found')
 *     err = (<CUresult (*)(CUtexref, float*) nogil> __cuTexRefSetBorderColor)(hTexRef, pBorderColor)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7099
 *     if __cuTexRefSetBorderColor == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetBorderColor" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, float*) nogil> __cuTexRefSetBorderColor)(hTexRef, pBorderColor)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__352, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7099, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7099, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7098
 *     cuPythonInit()
 *     if __cuTexRefSetBorderColor == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefSetBorderColor" not found')
 *     err = (<CUresult (*)(CUtexref, float*) nogil> __cuTexRefSetBorderColor)(hTexRef, pBorderColor)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7097
 *     global __cuTexRefSetBorderColor
 *     cuPythonInit()
 *     if __cuTexRefSetBorderColor == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetBorderColor" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7100
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetBorderColor" not found')
 *     err = (<CUresult (*)(CUtexref, float*) nogil> __cuTexRefSetBorderColor)(hTexRef, pBorderColor)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUtexref, float *))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetBorderColor)(__pyx_v_hTexRef, __pyx_v_pBorderColor);

    /* "cuda/_cuda/ccuda.pyx":7101
 *             raise RuntimeError('Function "cuTexRefSetBorderColor" not found')
 *     err = (<CUresult (*)(CUtexref, float*) nogil> __cuTexRefSetBorderColor)(hTexRef, pBorderColor)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7095
 * 
 * cdef CUresult _cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetBorderColor             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetBorderColor == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7094
 *     return err
 * 
 * cdef CUresult _cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetBorderColor
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexRefSetBorderColor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7103
 *     return err
 * 
 * cdef CUresult _cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetFlags
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetFlags(CUtexref __pyx_v_hTexRef, unsigned int __pyx_v_Flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexRefSetFlags", 1);
  __Pyx_TraceCall("_cuTexRefSetFlags", __pyx_f[0], 7103, 1, __PYX_ERR(0, 7103, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7104
 * 
 * cdef CUresult _cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetFlags == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7105
 * cdef CUresult _cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetFlags
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexRefSetFlags == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7105, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7106
 *     global __cuTexRefSetFlags
 *     cuPythonInit()
 *     if __cuTexRefSetFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFlags" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFlags == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7107
 *     cuPythonInit()
 *     if __cuTexRefSetFlags == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefSetFlags" not found')
 *     err = (<CUresult (*)(CUtexref, unsigned int) nogil> __cuTexRefSetFlags)(hTexRef, Flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7108
 *     if __cuTexRefSetFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, unsigned int) nogil> __cuTexRefSetFlags)(hTexRef, Flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__353, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7108, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7108, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7107
 *     cuPythonInit()
 *     if __cuTexRefSetFlags == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefSetFlags" not found')
 *     err = (<CUresult (*)(CUtexref, unsigned int) nogil> __cuTexRefSetFlags)(hTexRef, Flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7106
 *     global __cuTexRefSetFlags
 *     cuPythonInit()
 *     if __cuTexRefSetFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7109
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFlags" not found')
 *     err = (<CUresult (*)(CUtexref, unsigned int) nogil> __cuTexRefSetFlags)(hTexRef, Flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUtexref, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFlags)(__pyx_v_hTexRef, __pyx_v_Flags);

    /* "cuda/_cuda/ccuda.pyx":7110
 *             raise RuntimeError('Function "cuTexRefSetFlags" not found')
 *     err = (<CUresult (*)(CUtexref, unsigned int) nogil> __cuTexRefSetFlags)(hTexRef, Flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefGetAddress_v2(CUdeviceptr* pdptr, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7104
 * 
 * cdef CUresult _cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefSetFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetFlags == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7103
 *     return err
 * 
 * cdef CUresult _cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefSetFlags
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexRefSetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7112
 *     return err
 * 
 * cdef CUresult _cuTexRefGetAddress_v2(CUdeviceptr* pdptr, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetAddress_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetAddress_v2(CUdeviceptr *__pyx_v_pdptr, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexRefGetAddress_v2", 1);
  __Pyx_TraceCall("_cuTexRefGetAddress_v2", __pyx_f[0], 7112, 1, __PYX_ERR(0, 7112, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7113
 * 
 * cdef CUresult _cuTexRefGetAddress_v2(CUdeviceptr* pdptr, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetAddress_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetAddress_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7114
 * cdef CUresult _cuTexRefGetAddress_v2(CUdeviceptr* pdptr, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetAddress_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexRefGetAddress_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7114, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7115
 *     global __cuTexRefGetAddress_v2
 *     cuPythonInit()
 *     if __cuTexRefGetAddress_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetAddress_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetAddress_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7116
 *     cuPythonInit()
 *     if __cuTexRefGetAddress_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefGetAddress_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, CUtexref) nogil> __cuTexRefGetAddress_v2)(pdptr, hTexRef)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7117
 *     if __cuTexRefGetAddress_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetAddress_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, CUtexref) nogil> __cuTexRefGetAddress_v2)(pdptr, hTexRef)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__354, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7117, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7117, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7116
 *     cuPythonInit()
 *     if __cuTexRefGetAddress_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefGetAddress_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, CUtexref) nogil> __cuTexRefGetAddress_v2)(pdptr, hTexRef)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7115
 *     global __cuTexRefGetAddress_v2
 *     cuPythonInit()
 *     if __cuTexRefGetAddress_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetAddress_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7118
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetAddress_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, CUtexref) nogil> __cuTexRefGetAddress_v2)(pdptr, hTexRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr *, CUtexref))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetAddress_v2)(__pyx_v_pdptr, __pyx_v_hTexRef);

    /* "cuda/_cuda/ccuda.pyx":7119
 *             raise RuntimeError('Function "cuTexRefGetAddress_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, CUtexref) nogil> __cuTexRefGetAddress_v2)(pdptr, hTexRef)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7113
 * 
 * cdef CUresult _cuTexRefGetAddress_v2(CUdeviceptr* pdptr, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetAddress_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetAddress_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7112
 *     return err
 * 
 * cdef CUresult _cuTexRefGetAddress_v2(CUdeviceptr* pdptr, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetAddress_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexRefGetAddress_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7121
 *     return err
 * 
 * cdef CUresult _cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetArray
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetArray(CUarray *__pyx_v_phArray, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexRefGetArray", 1);
  __Pyx_TraceCall("_cuTexRefGetArray", __pyx_f[0], 7121, 1, __PYX_ERR(0, 7121, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7122
 * 
 * cdef CUresult _cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetArray == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7123
 * cdef CUresult _cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetArray
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexRefGetArray == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7123, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7124
 *     global __cuTexRefGetArray
 *     cuPythonInit()
 *     if __cuTexRefGetArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetArray" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetArray == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7125
 *     cuPythonInit()
 *     if __cuTexRefGetArray == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefGetArray" not found')
 *     err = (<CUresult (*)(CUarray*, CUtexref) nogil> __cuTexRefGetArray)(phArray, hTexRef)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7126
 *     if __cuTexRefGetArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray*, CUtexref) nogil> __cuTexRefGetArray)(phArray, hTexRef)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__355, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7126, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7126, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7125
 *     cuPythonInit()
 *     if __cuTexRefGetArray == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefGetArray" not found')
 *     err = (<CUresult (*)(CUarray*, CUtexref) nogil> __cuTexRefGetArray)(phArray, hTexRef)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7124
 *     global __cuTexRefGetArray
 *     cuPythonInit()
 *     if __cuTexRefGetArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7127
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetArray" not found')
 *     err = (<CUresult (*)(CUarray*, CUtexref) nogil> __cuTexRefGetArray)(phArray, hTexRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUarray *, CUtexref))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetArray)(__pyx_v_phArray, __pyx_v_hTexRef);

    /* "cuda/_cuda/ccuda.pyx":7128
 *             raise RuntimeError('Function "cuTexRefGetArray" not found')
 *     err = (<CUresult (*)(CUarray*, CUtexref) nogil> __cuTexRefGetArray)(phArray, hTexRef)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7122
 * 
 * cdef CUresult _cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetArray == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7121
 *     return err
 * 
 * cdef CUresult _cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetArray
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexRefGetArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7130
 *     return err
 * 
 * cdef CUresult _cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetMipmappedArray
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmappedArray(CUmipmappedArray *__pyx_v_phMipmappedArray, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexRefGetMipmappedArray", 1);
  __Pyx_TraceCall("_cuTexRefGetMipmappedArray", __pyx_f[0], 7130, 1, __PYX_ERR(0, 7130, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7131
 * 
 * cdef CUresult _cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetMipmappedArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetMipmappedArray == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7132
 * cdef CUresult _cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetMipmappedArray
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexRefGetMipmappedArray == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7132, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7133
 *     global __cuTexRefGetMipmappedArray
 *     cuPythonInit()
 *     if __cuTexRefGetMipmappedArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmappedArray" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmappedArray == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7134
 *     cuPythonInit()
 *     if __cuTexRefGetMipmappedArray == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefGetMipmappedArray" not found')
 *     err = (<CUresult (*)(CUmipmappedArray*, CUtexref) nogil> __cuTexRefGetMipmappedArray)(phMipmappedArray, hTexRef)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7135
 *     if __cuTexRefGetMipmappedArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmappedArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmipmappedArray*, CUtexref) nogil> __cuTexRefGetMipmappedArray)(phMipmappedArray, hTexRef)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__356, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7135, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7135, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7134
 *     cuPythonInit()
 *     if __cuTexRefGetMipmappedArray == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefGetMipmappedArray" not found')
 *     err = (<CUresult (*)(CUmipmappedArray*, CUtexref) nogil> __cuTexRefGetMipmappedArray)(phMipmappedArray, hTexRef)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7133
 *     global __cuTexRefGetMipmappedArray
 *     cuPythonInit()
 *     if __cuTexRefGetMipmappedArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmappedArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7136
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmappedArray" not found')
 *     err = (<CUresult (*)(CUmipmappedArray*, CUtexref) nogil> __cuTexRefGetMipmappedArray)(phMipmappedArray, hTexRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmipmappedArray *, CUtexref))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmappedArray)(__pyx_v_phMipmappedArray, __pyx_v_hTexRef);

    /* "cuda/_cuda/ccuda.pyx":7137
 *             raise RuntimeError('Function "cuTexRefGetMipmappedArray" not found')
 *     err = (<CUresult (*)(CUmipmappedArray*, CUtexref) nogil> __cuTexRefGetMipmappedArray)(phMipmappedArray, hTexRef)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7131
 * 
 * cdef CUresult _cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetMipmappedArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetMipmappedArray == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7130
 *     return err
 * 
 * cdef CUresult _cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetMipmappedArray
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexRefGetMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7139
 *     return err
 * 
 * cdef CUresult _cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetAddressMode
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetAddressMode(CUaddress_mode *__pyx_v_pam, CUtexref __pyx_v_hTexRef, int __pyx_v_dim) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexRefGetAddressMode", 1);
  __Pyx_TraceCall("_cuTexRefGetAddressMode", __pyx_f[0], 7139, 1, __PYX_ERR(0, 7139, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7140
 * 
 * cdef CUresult _cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetAddressMode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetAddressMode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7141
 * cdef CUresult _cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetAddressMode
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexRefGetAddressMode == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7141, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7142
 *     global __cuTexRefGetAddressMode
 *     cuPythonInit()
 *     if __cuTexRefGetAddressMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetAddressMode" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetAddressMode == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7143
 *     cuPythonInit()
 *     if __cuTexRefGetAddressMode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefGetAddressMode" not found')
 *     err = (<CUresult (*)(CUaddress_mode*, CUtexref, int) nogil> __cuTexRefGetAddressMode)(pam, hTexRef, dim)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7144
 *     if __cuTexRefGetAddressMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetAddressMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUaddress_mode*, CUtexref, int) nogil> __cuTexRefGetAddressMode)(pam, hTexRef, dim)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__357, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7144, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7144, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7143
 *     cuPythonInit()
 *     if __cuTexRefGetAddressMode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefGetAddressMode" not found')
 *     err = (<CUresult (*)(CUaddress_mode*, CUtexref, int) nogil> __cuTexRefGetAddressMode)(pam, hTexRef, dim)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7142
 *     global __cuTexRefGetAddressMode
 *     cuPythonInit()
 *     if __cuTexRefGetAddressMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetAddressMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7145
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetAddressMode" not found')
 *     err = (<CUresult (*)(CUaddress_mode*, CUtexref, int) nogil> __cuTexRefGetAddressMode)(pam, hTexRef, dim)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUaddress_mode *, CUtexref, int))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetAddressMode)(__pyx_v_pam, __pyx_v_hTexRef, __pyx_v_dim);

    /* "cuda/_cuda/ccuda.pyx":7146
 *             raise RuntimeError('Function "cuTexRefGetAddressMode" not found')
 *     err = (<CUresult (*)(CUaddress_mode*, CUtexref, int) nogil> __cuTexRefGetAddressMode)(pam, hTexRef, dim)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7140
 * 
 * cdef CUresult _cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetAddressMode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetAddressMode == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7139
 *     return err
 * 
 * cdef CUresult _cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetAddressMode
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexRefGetAddressMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7148
 *     return err
 * 
 * cdef CUresult _cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetFilterMode
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetFilterMode(CUfilter_mode *__pyx_v_pfm, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexRefGetFilterMode", 1);
  __Pyx_TraceCall("_cuTexRefGetFilterMode", __pyx_f[0], 7148, 1, __PYX_ERR(0, 7148, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7149
 * 
 * cdef CUresult _cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetFilterMode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetFilterMode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7150
 * cdef CUresult _cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetFilterMode
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexRefGetFilterMode == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7150, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7151
 *     global __cuTexRefGetFilterMode
 *     cuPythonInit()
 *     if __cuTexRefGetFilterMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFilterMode" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFilterMode == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7152
 *     cuPythonInit()
 *     if __cuTexRefGetFilterMode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefGetFilterMode" not found')
 *     err = (<CUresult (*)(CUfilter_mode*, CUtexref) nogil> __cuTexRefGetFilterMode)(pfm, hTexRef)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7153
 *     if __cuTexRefGetFilterMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFilterMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfilter_mode*, CUtexref) nogil> __cuTexRefGetFilterMode)(pfm, hTexRef)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__358, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7153, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7153, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7152
 *     cuPythonInit()
 *     if __cuTexRefGetFilterMode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefGetFilterMode" not found')
 *     err = (<CUresult (*)(CUfilter_mode*, CUtexref) nogil> __cuTexRefGetFilterMode)(pfm, hTexRef)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7151
 *     global __cuTexRefGetFilterMode
 *     cuPythonInit()
 *     if __cuTexRefGetFilterMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFilterMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7154
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFilterMode" not found')
 *     err = (<CUresult (*)(CUfilter_mode*, CUtexref) nogil> __cuTexRefGetFilterMode)(pfm, hTexRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUfilter_mode *, CUtexref))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFilterMode)(__pyx_v_pfm, __pyx_v_hTexRef);

    /* "cuda/_cuda/ccuda.pyx":7155
 *             raise RuntimeError('Function "cuTexRefGetFilterMode" not found')
 *     err = (<CUresult (*)(CUfilter_mode*, CUtexref) nogil> __cuTexRefGetFilterMode)(pfm, hTexRef)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7149
 * 
 * cdef CUresult _cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetFilterMode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetFilterMode == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7148
 *     return err
 * 
 * cdef CUresult _cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetFilterMode
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexRefGetFilterMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7157
 *     return err
 * 
 * cdef CUresult _cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetFormat
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetFormat(CUarray_format *__pyx_v_pFormat, int *__pyx_v_pNumChannels, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexRefGetFormat", 1);
  __Pyx_TraceCall("_cuTexRefGetFormat", __pyx_f[0], 7157, 1, __PYX_ERR(0, 7157, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7158
 * 
 * cdef CUresult _cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetFormat             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetFormat == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7159
 * cdef CUresult _cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetFormat
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexRefGetFormat == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7159, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7160
 *     global __cuTexRefGetFormat
 *     cuPythonInit()
 *     if __cuTexRefGetFormat == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFormat" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFormat == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7161
 *     cuPythonInit()
 *     if __cuTexRefGetFormat == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefGetFormat" not found')
 *     err = (<CUresult (*)(CUarray_format*, int*, CUtexref) nogil> __cuTexRefGetFormat)(pFormat, pNumChannels, hTexRef)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7162
 *     if __cuTexRefGetFormat == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFormat" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray_format*, int*, CUtexref) nogil> __cuTexRefGetFormat)(pFormat, pNumChannels, hTexRef)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__359, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7162, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7162, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7161
 *     cuPythonInit()
 *     if __cuTexRefGetFormat == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefGetFormat" not found')
 *     err = (<CUresult (*)(CUarray_format*, int*, CUtexref) nogil> __cuTexRefGetFormat)(pFormat, pNumChannels, hTexRef)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7160
 *     global __cuTexRefGetFormat
 *     cuPythonInit()
 *     if __cuTexRefGetFormat == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFormat" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7163
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFormat" not found')
 *     err = (<CUresult (*)(CUarray_format*, int*, CUtexref) nogil> __cuTexRefGetFormat)(pFormat, pNumChannels, hTexRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUarray_format *, int *, CUtexref))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFormat)(__pyx_v_pFormat, __pyx_v_pNumChannels, __pyx_v_hTexRef);

    /* "cuda/_cuda/ccuda.pyx":7164
 *             raise RuntimeError('Function "cuTexRefGetFormat" not found')
 *     err = (<CUresult (*)(CUarray_format*, int*, CUtexref) nogil> __cuTexRefGetFormat)(pFormat, pNumChannels, hTexRef)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7158
 * 
 * cdef CUresult _cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetFormat             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetFormat == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7157
 *     return err
 * 
 * cdef CUresult _cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetFormat
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexRefGetFormat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7166
 *     return err
 * 
 * cdef CUresult _cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetMipmapFilterMode
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmapFilterMode(CUfilter_mode *__pyx_v_pfm, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexRefGetMipmapFilterMode", 1);
  __Pyx_TraceCall("_cuTexRefGetMipmapFilterMode", __pyx_f[0], 7166, 1, __PYX_ERR(0, 7166, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7167
 * 
 * cdef CUresult _cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetMipmapFilterMode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapFilterMode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7168
 * cdef CUresult _cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetMipmapFilterMode
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexRefGetMipmapFilterMode == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7168, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7169
 *     global __cuTexRefGetMipmapFilterMode
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapFilterMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapFilterMode" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapFilterMode == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7170
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapFilterMode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefGetMipmapFilterMode" not found')
 *     err = (<CUresult (*)(CUfilter_mode*, CUtexref) nogil> __cuTexRefGetMipmapFilterMode)(pfm, hTexRef)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7171
 *     if __cuTexRefGetMipmapFilterMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapFilterMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfilter_mode*, CUtexref) nogil> __cuTexRefGetMipmapFilterMode)(pfm, hTexRef)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__360, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7171, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7171, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7170
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapFilterMode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefGetMipmapFilterMode" not found')
 *     err = (<CUresult (*)(CUfilter_mode*, CUtexref) nogil> __cuTexRefGetMipmapFilterMode)(pfm, hTexRef)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7169
 *     global __cuTexRefGetMipmapFilterMode
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapFilterMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapFilterMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7172
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapFilterMode" not found')
 *     err = (<CUresult (*)(CUfilter_mode*, CUtexref) nogil> __cuTexRefGetMipmapFilterMode)(pfm, hTexRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUfilter_mode *, CUtexref))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapFilterMode)(__pyx_v_pfm, __pyx_v_hTexRef);

    /* "cuda/_cuda/ccuda.pyx":7173
 *             raise RuntimeError('Function "cuTexRefGetMipmapFilterMode" not found')
 *     err = (<CUresult (*)(CUfilter_mode*, CUtexref) nogil> __cuTexRefGetMipmapFilterMode)(pfm, hTexRef)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7167
 * 
 * cdef CUresult _cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetMipmapFilterMode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapFilterMode == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7166
 *     return err
 * 
 * cdef CUresult _cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetMipmapFilterMode
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexRefGetMipmapFilterMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7175
 *     return err
 * 
 * cdef CUresult _cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetMipmapLevelBias
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmapLevelBias(float *__pyx_v_pbias, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexRefGetMipmapLevelBias", 1);
  __Pyx_TraceCall("_cuTexRefGetMipmapLevelBias", __pyx_f[0], 7175, 1, __PYX_ERR(0, 7175, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7176
 * 
 * cdef CUresult _cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetMipmapLevelBias             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapLevelBias == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7177
 * cdef CUresult _cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetMipmapLevelBias
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexRefGetMipmapLevelBias == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7177, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7178
 *     global __cuTexRefGetMipmapLevelBias
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapLevelBias == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapLevelBias" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapLevelBias == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7179
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapLevelBias == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefGetMipmapLevelBias" not found')
 *     err = (<CUresult (*)(float*, CUtexref) nogil> __cuTexRefGetMipmapLevelBias)(pbias, hTexRef)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7180
 *     if __cuTexRefGetMipmapLevelBias == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapLevelBias" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(float*, CUtexref) nogil> __cuTexRefGetMipmapLevelBias)(pbias, hTexRef)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__361, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7180, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7180, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7179
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapLevelBias == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefGetMipmapLevelBias" not found')
 *     err = (<CUresult (*)(float*, CUtexref) nogil> __cuTexRefGetMipmapLevelBias)(pbias, hTexRef)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7178
 *     global __cuTexRefGetMipmapLevelBias
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapLevelBias == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapLevelBias" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7181
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapLevelBias" not found')
 *     err = (<CUresult (*)(float*, CUtexref) nogil> __cuTexRefGetMipmapLevelBias)(pbias, hTexRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(float *, CUtexref))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapLevelBias)(__pyx_v_pbias, __pyx_v_hTexRef);

    /* "cuda/_cuda/ccuda.pyx":7182
 *             raise RuntimeError('Function "cuTexRefGetMipmapLevelBias" not found')
 *     err = (<CUresult (*)(float*, CUtexref) nogil> __cuTexRefGetMipmapLevelBias)(pbias, hTexRef)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7176
 * 
 * cdef CUresult _cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetMipmapLevelBias             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapLevelBias == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7175
 *     return err
 * 
 * cdef CUresult _cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetMipmapLevelBias
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexRefGetMipmapLevelBias", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7184
 *     return err
 * 
 * cdef CUresult _cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetMipmapLevelClamp
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmapLevelClamp(float *__pyx_v_pminMipmapLevelClamp, float *__pyx_v_pmaxMipmapLevelClamp, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexRefGetMipmapLevelClamp", 1);
  __Pyx_TraceCall("_cuTexRefGetMipmapLevelClamp", __pyx_f[0], 7184, 1, __PYX_ERR(0, 7184, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7185
 * 
 * cdef CUresult _cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetMipmapLevelClamp             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapLevelClamp == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7186
 * cdef CUresult _cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetMipmapLevelClamp
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexRefGetMipmapLevelClamp == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7186, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7187
 *     global __cuTexRefGetMipmapLevelClamp
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapLevelClamp == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapLevelClamp" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapLevelClamp == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7188
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapLevelClamp == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefGetMipmapLevelClamp" not found')
 *     err = (<CUresult (*)(float*, float*, CUtexref) nogil> __cuTexRefGetMipmapLevelClamp)(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7189
 *     if __cuTexRefGetMipmapLevelClamp == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapLevelClamp" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(float*, float*, CUtexref) nogil> __cuTexRefGetMipmapLevelClamp)(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__362, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7189, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7189, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7188
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapLevelClamp == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefGetMipmapLevelClamp" not found')
 *     err = (<CUresult (*)(float*, float*, CUtexref) nogil> __cuTexRefGetMipmapLevelClamp)(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7187
 *     global __cuTexRefGetMipmapLevelClamp
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapLevelClamp == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapLevelClamp" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7190
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapLevelClamp" not found')
 *     err = (<CUresult (*)(float*, float*, CUtexref) nogil> __cuTexRefGetMipmapLevelClamp)(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(float *, float *, CUtexref))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapLevelClamp)(__pyx_v_pminMipmapLevelClamp, __pyx_v_pmaxMipmapLevelClamp, __pyx_v_hTexRef);

    /* "cuda/_cuda/ccuda.pyx":7191
 *             raise RuntimeError('Function "cuTexRefGetMipmapLevelClamp" not found')
 *     err = (<CUresult (*)(float*, float*, CUtexref) nogil> __cuTexRefGetMipmapLevelClamp)(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7185
 * 
 * cdef CUresult _cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetMipmapLevelClamp             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapLevelClamp == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7184
 *     return err
 * 
 * cdef CUresult _cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetMipmapLevelClamp
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexRefGetMipmapLevelClamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7193
 *     return err
 * 
 * cdef CUresult _cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetMaxAnisotropy
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMaxAnisotropy(int *__pyx_v_pmaxAniso, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexRefGetMaxAnisotropy", 1);
  __Pyx_TraceCall("_cuTexRefGetMaxAnisotropy", __pyx_f[0], 7193, 1, __PYX_ERR(0, 7193, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7194
 * 
 * cdef CUresult _cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetMaxAnisotropy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetMaxAnisotropy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7195
 * cdef CUresult _cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetMaxAnisotropy
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexRefGetMaxAnisotropy == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7195, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7196
 *     global __cuTexRefGetMaxAnisotropy
 *     cuPythonInit()
 *     if __cuTexRefGetMaxAnisotropy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMaxAnisotropy" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMaxAnisotropy == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7197
 *     cuPythonInit()
 *     if __cuTexRefGetMaxAnisotropy == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefGetMaxAnisotropy" not found')
 *     err = (<CUresult (*)(int*, CUtexref) nogil> __cuTexRefGetMaxAnisotropy)(pmaxAniso, hTexRef)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7198
 *     if __cuTexRefGetMaxAnisotropy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMaxAnisotropy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, CUtexref) nogil> __cuTexRefGetMaxAnisotropy)(pmaxAniso, hTexRef)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__363, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7198, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7198, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7197
 *     cuPythonInit()
 *     if __cuTexRefGetMaxAnisotropy == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefGetMaxAnisotropy" not found')
 *     err = (<CUresult (*)(int*, CUtexref) nogil> __cuTexRefGetMaxAnisotropy)(pmaxAniso, hTexRef)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7196
 *     global __cuTexRefGetMaxAnisotropy
 *     cuPythonInit()
 *     if __cuTexRefGetMaxAnisotropy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMaxAnisotropy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7199
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMaxAnisotropy" not found')
 *     err = (<CUresult (*)(int*, CUtexref) nogil> __cuTexRefGetMaxAnisotropy)(pmaxAniso, hTexRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(int *, CUtexref))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMaxAnisotropy)(__pyx_v_pmaxAniso, __pyx_v_hTexRef);

    /* "cuda/_cuda/ccuda.pyx":7200
 *             raise RuntimeError('Function "cuTexRefGetMaxAnisotropy" not found')
 *     err = (<CUresult (*)(int*, CUtexref) nogil> __cuTexRefGetMaxAnisotropy)(pmaxAniso, hTexRef)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7194
 * 
 * cdef CUresult _cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetMaxAnisotropy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetMaxAnisotropy == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7193
 *     return err
 * 
 * cdef CUresult _cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetMaxAnisotropy
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexRefGetMaxAnisotropy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7202
 *     return err
 * 
 * cdef CUresult _cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetBorderColor
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetBorderColor(float *__pyx_v_pBorderColor, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexRefGetBorderColor", 1);
  __Pyx_TraceCall("_cuTexRefGetBorderColor", __pyx_f[0], 7202, 1, __PYX_ERR(0, 7202, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7203
 * 
 * cdef CUresult _cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetBorderColor             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetBorderColor == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7204
 * cdef CUresult _cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetBorderColor
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexRefGetBorderColor == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7204, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7205
 *     global __cuTexRefGetBorderColor
 *     cuPythonInit()
 *     if __cuTexRefGetBorderColor == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetBorderColor" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetBorderColor == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7206
 *     cuPythonInit()
 *     if __cuTexRefGetBorderColor == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefGetBorderColor" not found')
 *     err = (<CUresult (*)(float*, CUtexref) nogil> __cuTexRefGetBorderColor)(pBorderColor, hTexRef)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7207
 *     if __cuTexRefGetBorderColor == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetBorderColor" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(float*, CUtexref) nogil> __cuTexRefGetBorderColor)(pBorderColor, hTexRef)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__364, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7207, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7207, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7206
 *     cuPythonInit()
 *     if __cuTexRefGetBorderColor == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefGetBorderColor" not found')
 *     err = (<CUresult (*)(float*, CUtexref) nogil> __cuTexRefGetBorderColor)(pBorderColor, hTexRef)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7205
 *     global __cuTexRefGetBorderColor
 *     cuPythonInit()
 *     if __cuTexRefGetBorderColor == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetBorderColor" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7208
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetBorderColor" not found')
 *     err = (<CUresult (*)(float*, CUtexref) nogil> __cuTexRefGetBorderColor)(pBorderColor, hTexRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(float *, CUtexref))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetBorderColor)(__pyx_v_pBorderColor, __pyx_v_hTexRef);

    /* "cuda/_cuda/ccuda.pyx":7209
 *             raise RuntimeError('Function "cuTexRefGetBorderColor" not found')
 *     err = (<CUresult (*)(float*, CUtexref) nogil> __cuTexRefGetBorderColor)(pBorderColor, hTexRef)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7203
 * 
 * cdef CUresult _cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetBorderColor             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetBorderColor == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7202
 *     return err
 * 
 * cdef CUresult _cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetBorderColor
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexRefGetBorderColor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7211
 *     return err
 * 
 * cdef CUresult _cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetFlags
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetFlags(unsigned int *__pyx_v_pFlags, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexRefGetFlags", 1);
  __Pyx_TraceCall("_cuTexRefGetFlags", __pyx_f[0], 7211, 1, __PYX_ERR(0, 7211, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7212
 * 
 * cdef CUresult _cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetFlags == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7213
 * cdef CUresult _cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetFlags
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexRefGetFlags == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7213, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7214
 *     global __cuTexRefGetFlags
 *     cuPythonInit()
 *     if __cuTexRefGetFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFlags" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFlags == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7215
 *     cuPythonInit()
 *     if __cuTexRefGetFlags == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefGetFlags" not found')
 *     err = (<CUresult (*)(unsigned int*, CUtexref) nogil> __cuTexRefGetFlags)(pFlags, hTexRef)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7216
 *     if __cuTexRefGetFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int*, CUtexref) nogil> __cuTexRefGetFlags)(pFlags, hTexRef)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__365, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7216, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7216, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7215
 *     cuPythonInit()
 *     if __cuTexRefGetFlags == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefGetFlags" not found')
 *     err = (<CUresult (*)(unsigned int*, CUtexref) nogil> __cuTexRefGetFlags)(pFlags, hTexRef)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7214
 *     global __cuTexRefGetFlags
 *     cuPythonInit()
 *     if __cuTexRefGetFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7217
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFlags" not found')
 *     err = (<CUresult (*)(unsigned int*, CUtexref) nogil> __cuTexRefGetFlags)(pFlags, hTexRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(unsigned int *, CUtexref))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFlags)(__pyx_v_pFlags, __pyx_v_hTexRef);

    /* "cuda/_cuda/ccuda.pyx":7218
 *             raise RuntimeError('Function "cuTexRefGetFlags" not found')
 *     err = (<CUresult (*)(unsigned int*, CUtexref) nogil> __cuTexRefGetFlags)(pFlags, hTexRef)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefCreate(CUtexref* pTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7212
 * 
 * cdef CUresult _cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefGetFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetFlags == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7211
 *     return err
 * 
 * cdef CUresult _cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefGetFlags
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexRefGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7220
 *     return err
 * 
 * cdef CUresult _cuTexRefCreate(CUtexref* pTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefCreate
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefCreate(CUtexref *__pyx_v_pTexRef) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexRefCreate", 1);
  __Pyx_TraceCall("_cuTexRefCreate", __pyx_f[0], 7220, 1, __PYX_ERR(0, 7220, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7221
 * 
 * cdef CUresult _cuTexRefCreate(CUtexref* pTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefCreate == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7222
 * cdef CUresult _cuTexRefCreate(CUtexref* pTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefCreate
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexRefCreate == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7222, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7223
 *     global __cuTexRefCreate
 *     cuPythonInit()
 *     if __cuTexRefCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefCreate" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefCreate == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7224
 *     cuPythonInit()
 *     if __cuTexRefCreate == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefCreate" not found')
 *     err = (<CUresult (*)(CUtexref*) nogil> __cuTexRefCreate)(pTexRef)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7225
 *     if __cuTexRefCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref*) nogil> __cuTexRefCreate)(pTexRef)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__366, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7225, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7225, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7224
 *     cuPythonInit()
 *     if __cuTexRefCreate == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefCreate" not found')
 *     err = (<CUresult (*)(CUtexref*) nogil> __cuTexRefCreate)(pTexRef)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7223
 *     global __cuTexRefCreate
 *     cuPythonInit()
 *     if __cuTexRefCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7226
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefCreate" not found')
 *     err = (<CUresult (*)(CUtexref*) nogil> __cuTexRefCreate)(pTexRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUtexref *))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefCreate)(__pyx_v_pTexRef);

    /* "cuda/_cuda/ccuda.pyx":7227
 *             raise RuntimeError('Function "cuTexRefCreate" not found')
 *     err = (<CUresult (*)(CUtexref*) nogil> __cuTexRefCreate)(pTexRef)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefDestroy(CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7221
 * 
 * cdef CUresult _cuTexRefCreate(CUtexref* pTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefCreate == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7220
 *     return err
 * 
 * cdef CUresult _cuTexRefCreate(CUtexref* pTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefCreate
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexRefCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7229
 *     return err
 * 
 * cdef CUresult _cuTexRefDestroy(CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefDestroy
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefDestroy(CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexRefDestroy", 1);
  __Pyx_TraceCall("_cuTexRefDestroy", __pyx_f[0], 7229, 1, __PYX_ERR(0, 7229, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7230
 * 
 * cdef CUresult _cuTexRefDestroy(CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7231
 * cdef CUresult _cuTexRefDestroy(CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefDestroy
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexRefDestroy == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7231, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7232
 *     global __cuTexRefDestroy
 *     cuPythonInit()
 *     if __cuTexRefDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefDestroy" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefDestroy == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7233
 *     cuPythonInit()
 *     if __cuTexRefDestroy == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefDestroy" not found')
 *     err = (<CUresult (*)(CUtexref) nogil> __cuTexRefDestroy)(hTexRef)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7234
 *     if __cuTexRefDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref) nogil> __cuTexRefDestroy)(hTexRef)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__367, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7234, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7234, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7233
 *     cuPythonInit()
 *     if __cuTexRefDestroy == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexRefDestroy" not found')
 *     err = (<CUresult (*)(CUtexref) nogil> __cuTexRefDestroy)(hTexRef)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7232
 *     global __cuTexRefDestroy
 *     cuPythonInit()
 *     if __cuTexRefDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7235
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefDestroy" not found')
 *     err = (<CUresult (*)(CUtexref) nogil> __cuTexRefDestroy)(hTexRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUtexref))__pyx_v_4cuda_5_cuda_5ccuda___cuTexRefDestroy)(__pyx_v_hTexRef);

    /* "cuda/_cuda/ccuda.pyx":7236
 *             raise RuntimeError('Function "cuTexRefDestroy" not found')
 *     err = (<CUresult (*)(CUtexref) nogil> __cuTexRefDestroy)(hTexRef)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7230
 * 
 * cdef CUresult _cuTexRefDestroy(CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexRefDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefDestroy == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7229
 *     return err
 * 
 * cdef CUresult _cuTexRefDestroy(CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexRefDestroy
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexRefDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7238
 *     return err
 * 
 * cdef CUresult _cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuSurfRefSetArray
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuSurfRefSetArray(CUsurfref __pyx_v_hSurfRef, CUarray __pyx_v_hArray, unsigned int __pyx_v_Flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuSurfRefSetArray", 1);
  __Pyx_TraceCall("_cuSurfRefSetArray", __pyx_f[0], 7238, 1, __PYX_ERR(0, 7238, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7239
 * 
 * cdef CUresult _cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuSurfRefSetArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuSurfRefSetArray == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7240
 * cdef CUresult _cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuSurfRefSetArray
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuSurfRefSetArray == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7240, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7241
 *     global __cuSurfRefSetArray
 *     cuPythonInit()
 *     if __cuSurfRefSetArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSurfRefSetArray" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuSurfRefSetArray == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7242
 *     cuPythonInit()
 *     if __cuSurfRefSetArray == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuSurfRefSetArray" not found')
 *     err = (<CUresult (*)(CUsurfref, CUarray, unsigned int) nogil> __cuSurfRefSetArray)(hSurfRef, hArray, Flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7243
 *     if __cuSurfRefSetArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuSurfRefSetArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUsurfref, CUarray, unsigned int) nogil> __cuSurfRefSetArray)(hSurfRef, hArray, Flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__368, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7243, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7243, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7242
 *     cuPythonInit()
 *     if __cuSurfRefSetArray == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuSurfRefSetArray" not found')
 *     err = (<CUresult (*)(CUsurfref, CUarray, unsigned int) nogil> __cuSurfRefSetArray)(hSurfRef, hArray, Flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7241
 *     global __cuSurfRefSetArray
 *     cuPythonInit()
 *     if __cuSurfRefSetArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSurfRefSetArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7244
 *         with gil:
 *             raise RuntimeError('Function "cuSurfRefSetArray" not found')
 *     err = (<CUresult (*)(CUsurfref, CUarray, unsigned int) nogil> __cuSurfRefSetArray)(hSurfRef, hArray, Flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUsurfref, CUarray, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuSurfRefSetArray)(__pyx_v_hSurfRef, __pyx_v_hArray, __pyx_v_Flags);

    /* "cuda/_cuda/ccuda.pyx":7245
 *             raise RuntimeError('Function "cuSurfRefSetArray" not found')
 *     err = (<CUresult (*)(CUsurfref, CUarray, unsigned int) nogil> __cuSurfRefSetArray)(hSurfRef, hArray, Flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7239
 * 
 * cdef CUresult _cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuSurfRefSetArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuSurfRefSetArray == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7238
 *     return err
 * 
 * cdef CUresult _cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuSurfRefSetArray
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuSurfRefSetArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7247
 *     return err
 * 
 * cdef CUresult _cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuSurfRefGetArray
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuSurfRefGetArray(CUarray *__pyx_v_phArray, CUsurfref __pyx_v_hSurfRef) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuSurfRefGetArray", 1);
  __Pyx_TraceCall("_cuSurfRefGetArray", __pyx_f[0], 7247, 1, __PYX_ERR(0, 7247, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7248
 * 
 * cdef CUresult _cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuSurfRefGetArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuSurfRefGetArray == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7249
 * cdef CUresult _cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuSurfRefGetArray
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuSurfRefGetArray == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7249, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7250
 *     global __cuSurfRefGetArray
 *     cuPythonInit()
 *     if __cuSurfRefGetArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSurfRefGetArray" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuSurfRefGetArray == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7251
 *     cuPythonInit()
 *     if __cuSurfRefGetArray == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuSurfRefGetArray" not found')
 *     err = (<CUresult (*)(CUarray*, CUsurfref) nogil> __cuSurfRefGetArray)(phArray, hSurfRef)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7252
 *     if __cuSurfRefGetArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuSurfRefGetArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray*, CUsurfref) nogil> __cuSurfRefGetArray)(phArray, hSurfRef)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__369, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7252, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7252, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7251
 *     cuPythonInit()
 *     if __cuSurfRefGetArray == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuSurfRefGetArray" not found')
 *     err = (<CUresult (*)(CUarray*, CUsurfref) nogil> __cuSurfRefGetArray)(phArray, hSurfRef)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7250
 *     global __cuSurfRefGetArray
 *     cuPythonInit()
 *     if __cuSurfRefGetArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSurfRefGetArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7253
 *         with gil:
 *             raise RuntimeError('Function "cuSurfRefGetArray" not found')
 *     err = (<CUresult (*)(CUarray*, CUsurfref) nogil> __cuSurfRefGetArray)(phArray, hSurfRef)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUarray *, CUsurfref))__pyx_v_4cuda_5_cuda_5ccuda___cuSurfRefGetArray)(__pyx_v_phArray, __pyx_v_hSurfRef);

    /* "cuda/_cuda/ccuda.pyx":7254
 *             raise RuntimeError('Function "cuSurfRefGetArray" not found')
 *     err = (<CUresult (*)(CUarray*, CUsurfref) nogil> __cuSurfRefGetArray)(phArray, hSurfRef)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * 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:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7248
 * 
 * cdef CUresult _cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuSurfRefGetArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuSurfRefGetArray == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7247
 *     return err
 * 
 * cdef CUresult _cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuSurfRefGetArray
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuSurfRefGetArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7256
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuTexObjectCreate
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectCreate(CUtexObject *__pyx_v_pTexObject, CUDA_RESOURCE_DESC const *__pyx_v_pResDesc, CUDA_TEXTURE_DESC const *__pyx_v_pTexDesc, CUDA_RESOURCE_VIEW_DESC const *__pyx_v_pResViewDesc) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexObjectCreate", 1);
  __Pyx_TraceCall("_cuTexObjectCreate", __pyx_f[0], 7256, 1, __PYX_ERR(0, 7256, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7257
 * 
 * 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:
 *     global __cuTexObjectCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexObjectCreate == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7258
 * 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:
 *     global __cuTexObjectCreate
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexObjectCreate == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7258, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7259
 *     global __cuTexObjectCreate
 *     cuPythonInit()
 *     if __cuTexObjectCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectCreate" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectCreate == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7260
 *     cuPythonInit()
 *     if __cuTexObjectCreate == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexObjectCreate" not found')
 *     err = (<CUresult (*)(CUtexObject*, const CUDA_RESOURCE_DESC*, const CUDA_TEXTURE_DESC*, const CUDA_RESOURCE_VIEW_DESC*) nogil> __cuTexObjectCreate)(pTexObject, pResDesc, pTexDesc, pResViewDesc)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7261
 *     if __cuTexObjectCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexObject*, const CUDA_RESOURCE_DESC*, const CUDA_TEXTURE_DESC*, const CUDA_RESOURCE_VIEW_DESC*) nogil> __cuTexObjectCreate)(pTexObject, pResDesc, pTexDesc, pResViewDesc)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__370, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7261, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7261, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7260
 *     cuPythonInit()
 *     if __cuTexObjectCreate == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexObjectCreate" not found')
 *     err = (<CUresult (*)(CUtexObject*, const CUDA_RESOURCE_DESC*, const CUDA_TEXTURE_DESC*, const CUDA_RESOURCE_VIEW_DESC*) nogil> __cuTexObjectCreate)(pTexObject, pResDesc, pTexDesc, pResViewDesc)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7259
 *     global __cuTexObjectCreate
 *     cuPythonInit()
 *     if __cuTexObjectCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7262
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectCreate" not found')
 *     err = (<CUresult (*)(CUtexObject*, const CUDA_RESOURCE_DESC*, const CUDA_TEXTURE_DESC*, const CUDA_RESOURCE_VIEW_DESC*) nogil> __cuTexObjectCreate)(pTexObject, pResDesc, pTexDesc, pResViewDesc)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUtexObject *, CUDA_RESOURCE_DESC const *, CUDA_TEXTURE_DESC const *, CUDA_RESOURCE_VIEW_DESC const *))__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectCreate)(__pyx_v_pTexObject, __pyx_v_pResDesc, __pyx_v_pTexDesc, __pyx_v_pResViewDesc);

    /* "cuda/_cuda/ccuda.pyx":7263
 *             raise RuntimeError('Function "cuTexObjectCreate" not found')
 *     err = (<CUresult (*)(CUtexObject*, const CUDA_RESOURCE_DESC*, const CUDA_TEXTURE_DESC*, const CUDA_RESOURCE_VIEW_DESC*) nogil> __cuTexObjectCreate)(pTexObject, pResDesc, pTexDesc, pResViewDesc)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexObjectDestroy(CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7257
 * 
 * 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:
 *     global __cuTexObjectCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexObjectCreate == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7256
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuTexObjectCreate
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexObjectCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7265
 *     return err
 * 
 * cdef CUresult _cuTexObjectDestroy(CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexObjectDestroy
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectDestroy(CUtexObject __pyx_v_texObject) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexObjectDestroy", 1);
  __Pyx_TraceCall("_cuTexObjectDestroy", __pyx_f[0], 7265, 1, __PYX_ERR(0, 7265, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7266
 * 
 * cdef CUresult _cuTexObjectDestroy(CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexObjectDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexObjectDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7267
 * cdef CUresult _cuTexObjectDestroy(CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexObjectDestroy
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexObjectDestroy == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7267, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7268
 *     global __cuTexObjectDestroy
 *     cuPythonInit()
 *     if __cuTexObjectDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectDestroy" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectDestroy == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7269
 *     cuPythonInit()
 *     if __cuTexObjectDestroy == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexObjectDestroy" not found')
 *     err = (<CUresult (*)(CUtexObject) nogil> __cuTexObjectDestroy)(texObject)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7270
 *     if __cuTexObjectDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexObject) nogil> __cuTexObjectDestroy)(texObject)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__371, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7270, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7270, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7269
 *     cuPythonInit()
 *     if __cuTexObjectDestroy == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexObjectDestroy" not found')
 *     err = (<CUresult (*)(CUtexObject) nogil> __cuTexObjectDestroy)(texObject)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7268
 *     global __cuTexObjectDestroy
 *     cuPythonInit()
 *     if __cuTexObjectDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7271
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectDestroy" not found')
 *     err = (<CUresult (*)(CUtexObject) nogil> __cuTexObjectDestroy)(texObject)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUtexObject))__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectDestroy)(__pyx_v_texObject);

    /* "cuda/_cuda/ccuda.pyx":7272
 *             raise RuntimeError('Function "cuTexObjectDestroy" not found')
 *     err = (<CUresult (*)(CUtexObject) nogil> __cuTexObjectDestroy)(texObject)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7266
 * 
 * cdef CUresult _cuTexObjectDestroy(CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexObjectDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexObjectDestroy == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7265
 *     return err
 * 
 * cdef CUresult _cuTexObjectDestroy(CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexObjectDestroy
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexObjectDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7274
 *     return err
 * 
 * cdef CUresult _cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexObjectGetResourceDesc
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC *__pyx_v_pResDesc, CUtexObject __pyx_v_texObject) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexObjectGetResourceDesc", 1);
  __Pyx_TraceCall("_cuTexObjectGetResourceDesc", __pyx_f[0], 7274, 1, __PYX_ERR(0, 7274, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7275
 * 
 * cdef CUresult _cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexObjectGetResourceDesc             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexObjectGetResourceDesc == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7276
 * cdef CUresult _cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexObjectGetResourceDesc
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexObjectGetResourceDesc == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7276, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7277
 *     global __cuTexObjectGetResourceDesc
 *     cuPythonInit()
 *     if __cuTexObjectGetResourceDesc == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectGetResourceDesc" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetResourceDesc == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7278
 *     cuPythonInit()
 *     if __cuTexObjectGetResourceDesc == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexObjectGetResourceDesc" not found')
 *     err = (<CUresult (*)(CUDA_RESOURCE_DESC*, CUtexObject) nogil> __cuTexObjectGetResourceDesc)(pResDesc, texObject)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7279
 *     if __cuTexObjectGetResourceDesc == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectGetResourceDesc" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUDA_RESOURCE_DESC*, CUtexObject) nogil> __cuTexObjectGetResourceDesc)(pResDesc, texObject)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__372, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7279, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7279, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7278
 *     cuPythonInit()
 *     if __cuTexObjectGetResourceDesc == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexObjectGetResourceDesc" not found')
 *     err = (<CUresult (*)(CUDA_RESOURCE_DESC*, CUtexObject) nogil> __cuTexObjectGetResourceDesc)(pResDesc, texObject)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7277
 *     global __cuTexObjectGetResourceDesc
 *     cuPythonInit()
 *     if __cuTexObjectGetResourceDesc == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectGetResourceDesc" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7280
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectGetResourceDesc" not found')
 *     err = (<CUresult (*)(CUDA_RESOURCE_DESC*, CUtexObject) nogil> __cuTexObjectGetResourceDesc)(pResDesc, texObject)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUDA_RESOURCE_DESC *, CUtexObject))__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetResourceDesc)(__pyx_v_pResDesc, __pyx_v_texObject);

    /* "cuda/_cuda/ccuda.pyx":7281
 *             raise RuntimeError('Function "cuTexObjectGetResourceDesc" not found')
 *     err = (<CUresult (*)(CUDA_RESOURCE_DESC*, CUtexObject) nogil> __cuTexObjectGetResourceDesc)(pResDesc, texObject)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7275
 * 
 * cdef CUresult _cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexObjectGetResourceDesc             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexObjectGetResourceDesc == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7274
 *     return err
 * 
 * cdef CUresult _cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexObjectGetResourceDesc
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexObjectGetResourceDesc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7283
 *     return err
 * 
 * cdef CUresult _cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexObjectGetTextureDesc
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC *__pyx_v_pTexDesc, CUtexObject __pyx_v_texObject) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexObjectGetTextureDesc", 1);
  __Pyx_TraceCall("_cuTexObjectGetTextureDesc", __pyx_f[0], 7283, 1, __PYX_ERR(0, 7283, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7284
 * 
 * cdef CUresult _cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexObjectGetTextureDesc             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexObjectGetTextureDesc == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7285
 * cdef CUresult _cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexObjectGetTextureDesc
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexObjectGetTextureDesc == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7285, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7286
 *     global __cuTexObjectGetTextureDesc
 *     cuPythonInit()
 *     if __cuTexObjectGetTextureDesc == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectGetTextureDesc" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetTextureDesc == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7287
 *     cuPythonInit()
 *     if __cuTexObjectGetTextureDesc == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexObjectGetTextureDesc" not found')
 *     err = (<CUresult (*)(CUDA_TEXTURE_DESC*, CUtexObject) nogil> __cuTexObjectGetTextureDesc)(pTexDesc, texObject)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7288
 *     if __cuTexObjectGetTextureDesc == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectGetTextureDesc" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUDA_TEXTURE_DESC*, CUtexObject) nogil> __cuTexObjectGetTextureDesc)(pTexDesc, texObject)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__373, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7288, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7288, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7287
 *     cuPythonInit()
 *     if __cuTexObjectGetTextureDesc == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexObjectGetTextureDesc" not found')
 *     err = (<CUresult (*)(CUDA_TEXTURE_DESC*, CUtexObject) nogil> __cuTexObjectGetTextureDesc)(pTexDesc, texObject)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7286
 *     global __cuTexObjectGetTextureDesc
 *     cuPythonInit()
 *     if __cuTexObjectGetTextureDesc == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectGetTextureDesc" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7289
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectGetTextureDesc" not found')
 *     err = (<CUresult (*)(CUDA_TEXTURE_DESC*, CUtexObject) nogil> __cuTexObjectGetTextureDesc)(pTexDesc, texObject)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUDA_TEXTURE_DESC *, CUtexObject))__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetTextureDesc)(__pyx_v_pTexDesc, __pyx_v_texObject);

    /* "cuda/_cuda/ccuda.pyx":7290
 *             raise RuntimeError('Function "cuTexObjectGetTextureDesc" not found')
 *     err = (<CUresult (*)(CUDA_TEXTURE_DESC*, CUtexObject) nogil> __cuTexObjectGetTextureDesc)(pTexDesc, texObject)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7284
 * 
 * cdef CUresult _cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexObjectGetTextureDesc             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexObjectGetTextureDesc == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7283
 *     return err
 * 
 * cdef CUresult _cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexObjectGetTextureDesc
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexObjectGetTextureDesc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7292
 *     return err
 * 
 * cdef CUresult _cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexObjectGetResourceViewDesc
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC *__pyx_v_pResViewDesc, CUtexObject __pyx_v_texObject) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTexObjectGetResourceViewDesc", 1);
  __Pyx_TraceCall("_cuTexObjectGetResourceViewDesc", __pyx_f[0], 7292, 1, __PYX_ERR(0, 7292, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7293
 * 
 * cdef CUresult _cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexObjectGetResourceViewDesc             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexObjectGetResourceViewDesc == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7294
 * cdef CUresult _cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexObjectGetResourceViewDesc
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTexObjectGetResourceViewDesc == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7294, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7295
 *     global __cuTexObjectGetResourceViewDesc
 *     cuPythonInit()
 *     if __cuTexObjectGetResourceViewDesc == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectGetResourceViewDesc" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetResourceViewDesc == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7296
 *     cuPythonInit()
 *     if __cuTexObjectGetResourceViewDesc == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexObjectGetResourceViewDesc" not found')
 *     err = (<CUresult (*)(CUDA_RESOURCE_VIEW_DESC*, CUtexObject) nogil> __cuTexObjectGetResourceViewDesc)(pResViewDesc, texObject)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7297
 *     if __cuTexObjectGetResourceViewDesc == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectGetResourceViewDesc" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUDA_RESOURCE_VIEW_DESC*, CUtexObject) nogil> __cuTexObjectGetResourceViewDesc)(pResViewDesc, texObject)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__374, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7297, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7297, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7296
 *     cuPythonInit()
 *     if __cuTexObjectGetResourceViewDesc == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTexObjectGetResourceViewDesc" not found')
 *     err = (<CUresult (*)(CUDA_RESOURCE_VIEW_DESC*, CUtexObject) nogil> __cuTexObjectGetResourceViewDesc)(pResViewDesc, texObject)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7295
 *     global __cuTexObjectGetResourceViewDesc
 *     cuPythonInit()
 *     if __cuTexObjectGetResourceViewDesc == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectGetResourceViewDesc" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7298
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectGetResourceViewDesc" not found')
 *     err = (<CUresult (*)(CUDA_RESOURCE_VIEW_DESC*, CUtexObject) nogil> __cuTexObjectGetResourceViewDesc)(pResViewDesc, texObject)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUDA_RESOURCE_VIEW_DESC *, CUtexObject))__pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetResourceViewDesc)(__pyx_v_pResViewDesc, __pyx_v_texObject);

    /* "cuda/_cuda/ccuda.pyx":7299
 *             raise RuntimeError('Function "cuTexObjectGetResourceViewDesc" not found')
 *     err = (<CUresult (*)(CUDA_RESOURCE_VIEW_DESC*, CUtexObject) nogil> __cuTexObjectGetResourceViewDesc)(pResViewDesc, texObject)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7293
 * 
 * cdef CUresult _cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTexObjectGetResourceViewDesc             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexObjectGetResourceViewDesc == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7292
 *     return err
 * 
 * cdef CUresult _cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTexObjectGetResourceViewDesc
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTexObjectGetResourceViewDesc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7301
 *     return err
 * 
 * cdef CUresult _cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuSurfObjectCreate
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuSurfObjectCreate(CUsurfObject *__pyx_v_pSurfObject, CUDA_RESOURCE_DESC const *__pyx_v_pResDesc) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuSurfObjectCreate", 1);
  __Pyx_TraceCall("_cuSurfObjectCreate", __pyx_f[0], 7301, 1, __PYX_ERR(0, 7301, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7302
 * 
 * cdef CUresult _cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuSurfObjectCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuSurfObjectCreate == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7303
 * cdef CUresult _cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuSurfObjectCreate
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuSurfObjectCreate == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7303, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7304
 *     global __cuSurfObjectCreate
 *     cuPythonInit()
 *     if __cuSurfObjectCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectCreate" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectCreate == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7305
 *     cuPythonInit()
 *     if __cuSurfObjectCreate == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuSurfObjectCreate" not found')
 *     err = (<CUresult (*)(CUsurfObject*, const CUDA_RESOURCE_DESC*) nogil> __cuSurfObjectCreate)(pSurfObject, pResDesc)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7306
 *     if __cuSurfObjectCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUsurfObject*, const CUDA_RESOURCE_DESC*) nogil> __cuSurfObjectCreate)(pSurfObject, pResDesc)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__375, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7306, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7306, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7305
 *     cuPythonInit()
 *     if __cuSurfObjectCreate == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuSurfObjectCreate" not found')
 *     err = (<CUresult (*)(CUsurfObject*, const CUDA_RESOURCE_DESC*) nogil> __cuSurfObjectCreate)(pSurfObject, pResDesc)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7304
 *     global __cuSurfObjectCreate
 *     cuPythonInit()
 *     if __cuSurfObjectCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7307
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectCreate" not found')
 *     err = (<CUresult (*)(CUsurfObject*, const CUDA_RESOURCE_DESC*) nogil> __cuSurfObjectCreate)(pSurfObject, pResDesc)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUsurfObject *, CUDA_RESOURCE_DESC const *))__pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectCreate)(__pyx_v_pSurfObject, __pyx_v_pResDesc);

    /* "cuda/_cuda/ccuda.pyx":7308
 *             raise RuntimeError('Function "cuSurfObjectCreate" not found')
 *     err = (<CUresult (*)(CUsurfObject*, const CUDA_RESOURCE_DESC*) nogil> __cuSurfObjectCreate)(pSurfObject, pResDesc)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuSurfObjectDestroy(CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7302
 * 
 * cdef CUresult _cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuSurfObjectCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuSurfObjectCreate == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7301
 *     return err
 * 
 * cdef CUresult _cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuSurfObjectCreate
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuSurfObjectCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7310
 *     return err
 * 
 * cdef CUresult _cuSurfObjectDestroy(CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuSurfObjectDestroy
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuSurfObjectDestroy(CUsurfObject __pyx_v_surfObject) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuSurfObjectDestroy", 1);
  __Pyx_TraceCall("_cuSurfObjectDestroy", __pyx_f[0], 7310, 1, __PYX_ERR(0, 7310, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7311
 * 
 * cdef CUresult _cuSurfObjectDestroy(CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuSurfObjectDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuSurfObjectDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7312
 * cdef CUresult _cuSurfObjectDestroy(CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuSurfObjectDestroy
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuSurfObjectDestroy == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7312, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7313
 *     global __cuSurfObjectDestroy
 *     cuPythonInit()
 *     if __cuSurfObjectDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectDestroy" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectDestroy == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7314
 *     cuPythonInit()
 *     if __cuSurfObjectDestroy == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuSurfObjectDestroy" not found')
 *     err = (<CUresult (*)(CUsurfObject) nogil> __cuSurfObjectDestroy)(surfObject)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7315
 *     if __cuSurfObjectDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUsurfObject) nogil> __cuSurfObjectDestroy)(surfObject)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__376, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7315, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7315, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7314
 *     cuPythonInit()
 *     if __cuSurfObjectDestroy == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuSurfObjectDestroy" not found')
 *     err = (<CUresult (*)(CUsurfObject) nogil> __cuSurfObjectDestroy)(surfObject)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7313
 *     global __cuSurfObjectDestroy
 *     cuPythonInit()
 *     if __cuSurfObjectDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7316
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectDestroy" not found')
 *     err = (<CUresult (*)(CUsurfObject) nogil> __cuSurfObjectDestroy)(surfObject)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUsurfObject))__pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectDestroy)(__pyx_v_surfObject);

    /* "cuda/_cuda/ccuda.pyx":7317
 *             raise RuntimeError('Function "cuSurfObjectDestroy" not found')
 *     err = (<CUresult (*)(CUsurfObject) nogil> __cuSurfObjectDestroy)(surfObject)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7311
 * 
 * cdef CUresult _cuSurfObjectDestroy(CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuSurfObjectDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuSurfObjectDestroy == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7310
 *     return err
 * 
 * cdef CUresult _cuSurfObjectDestroy(CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuSurfObjectDestroy
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuSurfObjectDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7319
 *     return err
 * 
 * cdef CUresult _cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuSurfObjectGetResourceDesc
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC *__pyx_v_pResDesc, CUsurfObject __pyx_v_surfObject) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuSurfObjectGetResourceDesc", 1);
  __Pyx_TraceCall("_cuSurfObjectGetResourceDesc", __pyx_f[0], 7319, 1, __PYX_ERR(0, 7319, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7320
 * 
 * cdef CUresult _cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuSurfObjectGetResourceDesc             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuSurfObjectGetResourceDesc == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7321
 * cdef CUresult _cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuSurfObjectGetResourceDesc
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuSurfObjectGetResourceDesc == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7321, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7322
 *     global __cuSurfObjectGetResourceDesc
 *     cuPythonInit()
 *     if __cuSurfObjectGetResourceDesc == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectGetResourceDesc" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectGetResourceDesc == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7323
 *     cuPythonInit()
 *     if __cuSurfObjectGetResourceDesc == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuSurfObjectGetResourceDesc" not found')
 *     err = (<CUresult (*)(CUDA_RESOURCE_DESC*, CUsurfObject) nogil> __cuSurfObjectGetResourceDesc)(pResDesc, surfObject)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7324
 *     if __cuSurfObjectGetResourceDesc == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectGetResourceDesc" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUDA_RESOURCE_DESC*, CUsurfObject) nogil> __cuSurfObjectGetResourceDesc)(pResDesc, surfObject)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__377, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7324, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7324, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7323
 *     cuPythonInit()
 *     if __cuSurfObjectGetResourceDesc == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuSurfObjectGetResourceDesc" not found')
 *     err = (<CUresult (*)(CUDA_RESOURCE_DESC*, CUsurfObject) nogil> __cuSurfObjectGetResourceDesc)(pResDesc, surfObject)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7322
 *     global __cuSurfObjectGetResourceDesc
 *     cuPythonInit()
 *     if __cuSurfObjectGetResourceDesc == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectGetResourceDesc" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7325
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectGetResourceDesc" not found')
 *     err = (<CUresult (*)(CUDA_RESOURCE_DESC*, CUsurfObject) nogil> __cuSurfObjectGetResourceDesc)(pResDesc, surfObject)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUDA_RESOURCE_DESC *, CUsurfObject))__pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectGetResourceDesc)(__pyx_v_pResDesc, __pyx_v_surfObject);

    /* "cuda/_cuda/ccuda.pyx":7326
 *             raise RuntimeError('Function "cuSurfObjectGetResourceDesc" not found')
 *     err = (<CUresult (*)(CUDA_RESOURCE_DESC*, CUsurfObject) nogil> __cuSurfObjectGetResourceDesc)(pResDesc, surfObject)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * 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:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7320
 * 
 * cdef CUresult _cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuSurfObjectGetResourceDesc             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuSurfObjectGetResourceDesc == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7319
 *     return err
 * 
 * cdef CUresult _cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuSurfObjectGetResourceDesc
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuSurfObjectGetResourceDesc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7328
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuTensorMapEncodeTiled
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTensorMapEncodeTiled(CUtensorMap *__pyx_v_tensorMap, CUtensorMapDataType __pyx_v_tensorDataType, cuuint32_t __pyx_v_tensorRank, void *__pyx_v_globalAddress, cuuint64_t const *__pyx_v_globalDim, cuuint64_t const *__pyx_v_globalStrides, cuuint32_t const *__pyx_v_boxDim, cuuint32_t const *__pyx_v_elementStrides, CUtensorMapInterleave __pyx_v_interleave, CUtensorMapSwizzle __pyx_v_swizzle, CUtensorMapL2promotion __pyx_v_l2Promotion, CUtensorMapFloatOOBfill __pyx_v_oobFill) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTensorMapEncodeTiled", 1);
  __Pyx_TraceCall("_cuTensorMapEncodeTiled", __pyx_f[0], 7328, 1, __PYX_ERR(0, 7328, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7329
 * 
 * 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:
 *     global __cuTensorMapEncodeTiled             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTensorMapEncodeTiled == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7330
 * 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:
 *     global __cuTensorMapEncodeTiled
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTensorMapEncodeTiled == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7330, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7331
 *     global __cuTensorMapEncodeTiled
 *     cuPythonInit()
 *     if __cuTensorMapEncodeTiled == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTensorMapEncodeTiled" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTensorMapEncodeTiled == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7332
 *     cuPythonInit()
 *     if __cuTensorMapEncodeTiled == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTensorMapEncodeTiled" not found')
 *     err = (<CUresult (*)(CUtensorMap*, CUtensorMapDataType, cuuint32_t, void*, const cuuint64_t*, const cuuint64_t*, const cuuint32_t*, const cuuint32_t*, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill) nogil> __cuTensorMapEncodeTiled)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, boxDim, elementStrides, interleave, swizzle, l2Promotion, oobFill)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7333
 *     if __cuTensorMapEncodeTiled == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTensorMapEncodeTiled" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtensorMap*, CUtensorMapDataType, cuuint32_t, void*, const cuuint64_t*, const cuuint64_t*, const cuuint32_t*, const cuuint32_t*, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill) nogil> __cuTensorMapEncodeTiled)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, boxDim, elementStrides, interleave, swizzle, l2Promotion, oobFill)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__378, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7333, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7333, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7332
 *     cuPythonInit()
 *     if __cuTensorMapEncodeTiled == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTensorMapEncodeTiled" not found')
 *     err = (<CUresult (*)(CUtensorMap*, CUtensorMapDataType, cuuint32_t, void*, const cuuint64_t*, const cuuint64_t*, const cuuint32_t*, const cuuint32_t*, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill) nogil> __cuTensorMapEncodeTiled)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, boxDim, elementStrides, interleave, swizzle, l2Promotion, oobFill)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7331
 *     global __cuTensorMapEncodeTiled
 *     cuPythonInit()
 *     if __cuTensorMapEncodeTiled == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTensorMapEncodeTiled" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7334
 *         with gil:
 *             raise RuntimeError('Function "cuTensorMapEncodeTiled" not found')
 *     err = (<CUresult (*)(CUtensorMap*, CUtensorMapDataType, cuuint32_t, void*, const cuuint64_t*, const cuuint64_t*, const cuuint32_t*, const cuuint32_t*, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill) nogil> __cuTensorMapEncodeTiled)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, boxDim, elementStrides, interleave, swizzle, l2Promotion, oobFill)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUtensorMap *, CUtensorMapDataType, cuuint32_t, void *, cuuint64_t const *, cuuint64_t const *, cuuint32_t const *, cuuint32_t const *, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill))__pyx_v_4cuda_5_cuda_5ccuda___cuTensorMapEncodeTiled)(__pyx_v_tensorMap, __pyx_v_tensorDataType, __pyx_v_tensorRank, __pyx_v_globalAddress, __pyx_v_globalDim, __pyx_v_globalStrides, __pyx_v_boxDim, __pyx_v_elementStrides, __pyx_v_interleave, __pyx_v_swizzle, __pyx_v_l2Promotion, __pyx_v_oobFill);

    /* "cuda/_cuda/ccuda.pyx":7335
 *             raise RuntimeError('Function "cuTensorMapEncodeTiled" not found')
 *     err = (<CUresult (*)(CUtensorMap*, CUtensorMapDataType, cuuint32_t, void*, const cuuint64_t*, const cuuint64_t*, const cuuint32_t*, const cuuint32_t*, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill) nogil> __cuTensorMapEncodeTiled)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, boxDim, elementStrides, interleave, swizzle, l2Promotion, oobFill)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * 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:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7329
 * 
 * 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:
 *     global __cuTensorMapEncodeTiled             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTensorMapEncodeTiled == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7328
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuTensorMapEncodeTiled
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTensorMapEncodeTiled", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7337
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuTensorMapEncodeIm2col
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTensorMapEncodeIm2col(CUtensorMap *__pyx_v_tensorMap, CUtensorMapDataType __pyx_v_tensorDataType, cuuint32_t __pyx_v_tensorRank, void *__pyx_v_globalAddress, cuuint64_t const *__pyx_v_globalDim, cuuint64_t const *__pyx_v_globalStrides, int const *__pyx_v_pixelBoxLowerCorner, int const *__pyx_v_pixelBoxUpperCorner, cuuint32_t __pyx_v_channelsPerPixel, cuuint32_t __pyx_v_pixelsPerColumn, cuuint32_t const *__pyx_v_elementStrides, CUtensorMapInterleave __pyx_v_interleave, CUtensorMapSwizzle __pyx_v_swizzle, CUtensorMapL2promotion __pyx_v_l2Promotion, CUtensorMapFloatOOBfill __pyx_v_oobFill) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTensorMapEncodeIm2col", 1);
  __Pyx_TraceCall("_cuTensorMapEncodeIm2col", __pyx_f[0], 7337, 1, __PYX_ERR(0, 7337, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7338
 * 
 * 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:
 *     global __cuTensorMapEncodeIm2col             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTensorMapEncodeIm2col == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7339
 * 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:
 *     global __cuTensorMapEncodeIm2col
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTensorMapEncodeIm2col == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7339, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7340
 *     global __cuTensorMapEncodeIm2col
 *     cuPythonInit()
 *     if __cuTensorMapEncodeIm2col == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTensorMapEncodeIm2col" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTensorMapEncodeIm2col == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7341
 *     cuPythonInit()
 *     if __cuTensorMapEncodeIm2col == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTensorMapEncodeIm2col" not found')
 *     err = (<CUresult (*)(CUtensorMap*, CUtensorMapDataType, cuuint32_t, void*, const cuuint64_t*, const cuuint64_t*, const int*, const int*, cuuint32_t, cuuint32_t, const cuuint32_t*, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill) nogil> __cuTensorMapEncodeIm2col)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCorner, pixelBoxUpperCorner, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, swizzle, l2Promotion, oobFill)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7342
 *     if __cuTensorMapEncodeIm2col == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTensorMapEncodeIm2col" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtensorMap*, CUtensorMapDataType, cuuint32_t, void*, const cuuint64_t*, const cuuint64_t*, const int*, const int*, cuuint32_t, cuuint32_t, const cuuint32_t*, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill) nogil> __cuTensorMapEncodeIm2col)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCorner, pixelBoxUpperCorner, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, swizzle, l2Promotion, oobFill)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__379, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7342, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7342, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7341
 *     cuPythonInit()
 *     if __cuTensorMapEncodeIm2col == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTensorMapEncodeIm2col" not found')
 *     err = (<CUresult (*)(CUtensorMap*, CUtensorMapDataType, cuuint32_t, void*, const cuuint64_t*, const cuuint64_t*, const int*, const int*, cuuint32_t, cuuint32_t, const cuuint32_t*, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill) nogil> __cuTensorMapEncodeIm2col)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCorner, pixelBoxUpperCorner, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, swizzle, l2Promotion, oobFill)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7340
 *     global __cuTensorMapEncodeIm2col
 *     cuPythonInit()
 *     if __cuTensorMapEncodeIm2col == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTensorMapEncodeIm2col" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7343
 *         with gil:
 *             raise RuntimeError('Function "cuTensorMapEncodeIm2col" not found')
 *     err = (<CUresult (*)(CUtensorMap*, CUtensorMapDataType, cuuint32_t, void*, const cuuint64_t*, const cuuint64_t*, const int*, const int*, cuuint32_t, cuuint32_t, const cuuint32_t*, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill) nogil> __cuTensorMapEncodeIm2col)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCorner, pixelBoxUpperCorner, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, swizzle, l2Promotion, oobFill)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUtensorMap *, CUtensorMapDataType, cuuint32_t, void *, cuuint64_t const *, cuuint64_t const *, int const *, int const *, cuuint32_t, cuuint32_t, cuuint32_t const *, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill))__pyx_v_4cuda_5_cuda_5ccuda___cuTensorMapEncodeIm2col)(__pyx_v_tensorMap, __pyx_v_tensorDataType, __pyx_v_tensorRank, __pyx_v_globalAddress, __pyx_v_globalDim, __pyx_v_globalStrides, __pyx_v_pixelBoxLowerCorner, __pyx_v_pixelBoxUpperCorner, __pyx_v_channelsPerPixel, __pyx_v_pixelsPerColumn, __pyx_v_elementStrides, __pyx_v_interleave, __pyx_v_swizzle, __pyx_v_l2Promotion, __pyx_v_oobFill);

    /* "cuda/_cuda/ccuda.pyx":7344
 *             raise RuntimeError('Function "cuTensorMapEncodeIm2col" not found')
 *     err = (<CUresult (*)(CUtensorMap*, CUtensorMapDataType, cuuint32_t, void*, const cuuint64_t*, const cuuint64_t*, const int*, const int*, cuuint32_t, cuuint32_t, const cuuint32_t*, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill) nogil> __cuTensorMapEncodeIm2col)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCorner, pixelBoxUpperCorner, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, swizzle, l2Promotion, oobFill)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTensorMapReplaceAddress(CUtensorMap* tensorMap, void* globalAddress) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7338
 * 
 * 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:
 *     global __cuTensorMapEncodeIm2col             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTensorMapEncodeIm2col == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7337
 *     return err
 * 
 * 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:             # <<<<<<<<<<<<<<
 *     global __cuTensorMapEncodeIm2col
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTensorMapEncodeIm2col", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7346
 *     return err
 * 
 * cdef CUresult _cuTensorMapReplaceAddress(CUtensorMap* tensorMap, void* globalAddress) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTensorMapReplaceAddress
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuTensorMapReplaceAddress(CUtensorMap *__pyx_v_tensorMap, void *__pyx_v_globalAddress) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuTensorMapReplaceAddress", 1);
  __Pyx_TraceCall("_cuTensorMapReplaceAddress", __pyx_f[0], 7346, 1, __PYX_ERR(0, 7346, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7347
 * 
 * cdef CUresult _cuTensorMapReplaceAddress(CUtensorMap* tensorMap, void* globalAddress) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTensorMapReplaceAddress             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTensorMapReplaceAddress == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7348
 * cdef CUresult _cuTensorMapReplaceAddress(CUtensorMap* tensorMap, void* globalAddress) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTensorMapReplaceAddress
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuTensorMapReplaceAddress == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7348, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7349
 *     global __cuTensorMapReplaceAddress
 *     cuPythonInit()
 *     if __cuTensorMapReplaceAddress == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTensorMapReplaceAddress" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuTensorMapReplaceAddress == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7350
 *     cuPythonInit()
 *     if __cuTensorMapReplaceAddress == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTensorMapReplaceAddress" not found')
 *     err = (<CUresult (*)(CUtensorMap*, void*) nogil> __cuTensorMapReplaceAddress)(tensorMap, globalAddress)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7351
 *     if __cuTensorMapReplaceAddress == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTensorMapReplaceAddress" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtensorMap*, void*) nogil> __cuTensorMapReplaceAddress)(tensorMap, globalAddress)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__380, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7351, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7351, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7350
 *     cuPythonInit()
 *     if __cuTensorMapReplaceAddress == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuTensorMapReplaceAddress" not found')
 *     err = (<CUresult (*)(CUtensorMap*, void*) nogil> __cuTensorMapReplaceAddress)(tensorMap, globalAddress)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7349
 *     global __cuTensorMapReplaceAddress
 *     cuPythonInit()
 *     if __cuTensorMapReplaceAddress == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTensorMapReplaceAddress" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7352
 *         with gil:
 *             raise RuntimeError('Function "cuTensorMapReplaceAddress" not found')
 *     err = (<CUresult (*)(CUtensorMap*, void*) nogil> __cuTensorMapReplaceAddress)(tensorMap, globalAddress)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUtensorMap *, void *))__pyx_v_4cuda_5_cuda_5ccuda___cuTensorMapReplaceAddress)(__pyx_v_tensorMap, __pyx_v_globalAddress);

    /* "cuda/_cuda/ccuda.pyx":7353
 *             raise RuntimeError('Function "cuTensorMapReplaceAddress" not found')
 *     err = (<CUresult (*)(CUtensorMap*, void*) nogil> __cuTensorMapReplaceAddress)(tensorMap, globalAddress)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7347
 * 
 * cdef CUresult _cuTensorMapReplaceAddress(CUtensorMap* tensorMap, void* globalAddress) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuTensorMapReplaceAddress             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTensorMapReplaceAddress == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7346
 *     return err
 * 
 * cdef CUresult _cuTensorMapReplaceAddress(CUtensorMap* tensorMap, void* globalAddress) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuTensorMapReplaceAddress
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuTensorMapReplaceAddress", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7355
 *     return err
 * 
 * cdef CUresult _cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceCanAccessPeer
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceCanAccessPeer(int *__pyx_v_canAccessPeer, CUdevice __pyx_v_dev, CUdevice __pyx_v_peerDev) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDeviceCanAccessPeer", 1);
  __Pyx_TraceCall("_cuDeviceCanAccessPeer", __pyx_f[0], 7355, 1, __PYX_ERR(0, 7355, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7356
 * 
 * cdef CUresult _cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceCanAccessPeer             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceCanAccessPeer == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7357
 * cdef CUresult _cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceCanAccessPeer
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDeviceCanAccessPeer == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7357, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7358
 *     global __cuDeviceCanAccessPeer
 *     cuPythonInit()
 *     if __cuDeviceCanAccessPeer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceCanAccessPeer" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceCanAccessPeer == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7359
 *     cuPythonInit()
 *     if __cuDeviceCanAccessPeer == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceCanAccessPeer" not found')
 *     err = (<CUresult (*)(int*, CUdevice, CUdevice) nogil> __cuDeviceCanAccessPeer)(canAccessPeer, dev, peerDev)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7360
 *     if __cuDeviceCanAccessPeer == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceCanAccessPeer" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, CUdevice, CUdevice) nogil> __cuDeviceCanAccessPeer)(canAccessPeer, dev, peerDev)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__381, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7360, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7360, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7359
 *     cuPythonInit()
 *     if __cuDeviceCanAccessPeer == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceCanAccessPeer" not found')
 *     err = (<CUresult (*)(int*, CUdevice, CUdevice) nogil> __cuDeviceCanAccessPeer)(canAccessPeer, dev, peerDev)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7358
 *     global __cuDeviceCanAccessPeer
 *     cuPythonInit()
 *     if __cuDeviceCanAccessPeer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceCanAccessPeer" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7361
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceCanAccessPeer" not found')
 *     err = (<CUresult (*)(int*, CUdevice, CUdevice) nogil> __cuDeviceCanAccessPeer)(canAccessPeer, dev, peerDev)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(int *, CUdevice, CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceCanAccessPeer)(__pyx_v_canAccessPeer, __pyx_v_dev, __pyx_v_peerDev);

    /* "cuda/_cuda/ccuda.pyx":7362
 *             raise RuntimeError('Function "cuDeviceCanAccessPeer" not found')
 *     err = (<CUresult (*)(int*, CUdevice, CUdevice) nogil> __cuDeviceCanAccessPeer)(canAccessPeer, dev, peerDev)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7356
 * 
 * cdef CUresult _cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceCanAccessPeer             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceCanAccessPeer == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7355
 *     return err
 * 
 * cdef CUresult _cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceCanAccessPeer
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDeviceCanAccessPeer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7364
 *     return err
 * 
 * cdef CUresult _cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxEnablePeerAccess
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxEnablePeerAccess(CUcontext __pyx_v_peerContext, unsigned int __pyx_v_Flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCtxEnablePeerAccess", 1);
  __Pyx_TraceCall("_cuCtxEnablePeerAccess", __pyx_f[0], 7364, 1, __PYX_ERR(0, 7364, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7365
 * 
 * cdef CUresult _cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxEnablePeerAccess             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxEnablePeerAccess == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7366
 * cdef CUresult _cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxEnablePeerAccess
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCtxEnablePeerAccess == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7366, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7367
 *     global __cuCtxEnablePeerAccess
 *     cuPythonInit()
 *     if __cuCtxEnablePeerAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxEnablePeerAccess" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCtxEnablePeerAccess == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7368
 *     cuPythonInit()
 *     if __cuCtxEnablePeerAccess == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxEnablePeerAccess" not found')
 *     err = (<CUresult (*)(CUcontext, unsigned int) nogil> __cuCtxEnablePeerAccess)(peerContext, Flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7369
 *     if __cuCtxEnablePeerAccess == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxEnablePeerAccess" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext, unsigned int) nogil> __cuCtxEnablePeerAccess)(peerContext, Flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__382, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7369, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7369, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7368
 *     cuPythonInit()
 *     if __cuCtxEnablePeerAccess == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxEnablePeerAccess" not found')
 *     err = (<CUresult (*)(CUcontext, unsigned int) nogil> __cuCtxEnablePeerAccess)(peerContext, Flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7367
 *     global __cuCtxEnablePeerAccess
 *     cuPythonInit()
 *     if __cuCtxEnablePeerAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxEnablePeerAccess" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7370
 *         with gil:
 *             raise RuntimeError('Function "cuCtxEnablePeerAccess" not found')
 *     err = (<CUresult (*)(CUcontext, unsigned int) nogil> __cuCtxEnablePeerAccess)(peerContext, Flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUcontext, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxEnablePeerAccess)(__pyx_v_peerContext, __pyx_v_Flags);

    /* "cuda/_cuda/ccuda.pyx":7371
 *             raise RuntimeError('Function "cuCtxEnablePeerAccess" not found')
 *     err = (<CUresult (*)(CUcontext, unsigned int) nogil> __cuCtxEnablePeerAccess)(peerContext, Flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxDisablePeerAccess(CUcontext peerContext) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7365
 * 
 * cdef CUresult _cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxEnablePeerAccess             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxEnablePeerAccess == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7364
 *     return err
 * 
 * cdef CUresult _cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxEnablePeerAccess
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCtxEnablePeerAccess", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7373
 *     return err
 * 
 * cdef CUresult _cuCtxDisablePeerAccess(CUcontext peerContext) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxDisablePeerAccess
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCtxDisablePeerAccess(CUcontext __pyx_v_peerContext) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCtxDisablePeerAccess", 1);
  __Pyx_TraceCall("_cuCtxDisablePeerAccess", __pyx_f[0], 7373, 1, __PYX_ERR(0, 7373, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7374
 * 
 * cdef CUresult _cuCtxDisablePeerAccess(CUcontext peerContext) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxDisablePeerAccess             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxDisablePeerAccess == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7375
 * cdef CUresult _cuCtxDisablePeerAccess(CUcontext peerContext) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxDisablePeerAccess
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCtxDisablePeerAccess == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7375, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7376
 *     global __cuCtxDisablePeerAccess
 *     cuPythonInit()
 *     if __cuCtxDisablePeerAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDisablePeerAccess" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCtxDisablePeerAccess == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7377
 *     cuPythonInit()
 *     if __cuCtxDisablePeerAccess == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxDisablePeerAccess" not found')
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDisablePeerAccess)(peerContext)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7378
 *     if __cuCtxDisablePeerAccess == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDisablePeerAccess" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDisablePeerAccess)(peerContext)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__383, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7378, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7378, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7377
 *     cuPythonInit()
 *     if __cuCtxDisablePeerAccess == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCtxDisablePeerAccess" not found')
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDisablePeerAccess)(peerContext)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7376
 *     global __cuCtxDisablePeerAccess
 *     cuPythonInit()
 *     if __cuCtxDisablePeerAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDisablePeerAccess" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7379
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDisablePeerAccess" not found')
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDisablePeerAccess)(peerContext)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUcontext))__pyx_v_4cuda_5_cuda_5ccuda___cuCtxDisablePeerAccess)(__pyx_v_peerContext);

    /* "cuda/_cuda/ccuda.pyx":7380
 *             raise RuntimeError('Function "cuCtxDisablePeerAccess" not found')
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDisablePeerAccess)(peerContext)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7374
 * 
 * cdef CUresult _cuCtxDisablePeerAccess(CUcontext peerContext) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCtxDisablePeerAccess             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxDisablePeerAccess == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7373
 *     return err
 * 
 * cdef CUresult _cuCtxDisablePeerAccess(CUcontext peerContext) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCtxDisablePeerAccess
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCtxDisablePeerAccess", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7382
 *     return err
 * 
 * cdef CUresult _cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetP2PAttribute
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetP2PAttribute(int *__pyx_v_value, CUdevice_P2PAttribute __pyx_v_attrib, CUdevice __pyx_v_srcDevice, CUdevice __pyx_v_dstDevice) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuDeviceGetP2PAttribute", 1);
  __Pyx_TraceCall("_cuDeviceGetP2PAttribute", __pyx_f[0], 7382, 1, __PYX_ERR(0, 7382, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7383
 * 
 * cdef CUresult _cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetP2PAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetP2PAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7384
 * cdef CUresult _cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetP2PAttribute
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuDeviceGetP2PAttribute == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7384, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7385
 *     global __cuDeviceGetP2PAttribute
 *     cuPythonInit()
 *     if __cuDeviceGetP2PAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetP2PAttribute" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetP2PAttribute == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7386
 *     cuPythonInit()
 *     if __cuDeviceGetP2PAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetP2PAttribute" not found')
 *     err = (<CUresult (*)(int*, CUdevice_P2PAttribute, CUdevice, CUdevice) nogil> __cuDeviceGetP2PAttribute)(value, attrib, srcDevice, dstDevice)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7387
 *     if __cuDeviceGetP2PAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetP2PAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, CUdevice_P2PAttribute, CUdevice, CUdevice) nogil> __cuDeviceGetP2PAttribute)(value, attrib, srcDevice, dstDevice)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__384, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7387, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7387, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7386
 *     cuPythonInit()
 *     if __cuDeviceGetP2PAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuDeviceGetP2PAttribute" not found')
 *     err = (<CUresult (*)(int*, CUdevice_P2PAttribute, CUdevice, CUdevice) nogil> __cuDeviceGetP2PAttribute)(value, attrib, srcDevice, dstDevice)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7385
 *     global __cuDeviceGetP2PAttribute
 *     cuPythonInit()
 *     if __cuDeviceGetP2PAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetP2PAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7388
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetP2PAttribute" not found')
 *     err = (<CUresult (*)(int*, CUdevice_P2PAttribute, CUdevice, CUdevice) nogil> __cuDeviceGetP2PAttribute)(value, attrib, srcDevice, dstDevice)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(int *, CUdevice_P2PAttribute, CUdevice, CUdevice))__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetP2PAttribute)(__pyx_v_value, __pyx_v_attrib, __pyx_v_srcDevice, __pyx_v_dstDevice);

    /* "cuda/_cuda/ccuda.pyx":7389
 *             raise RuntimeError('Function "cuDeviceGetP2PAttribute" not found')
 *     err = (<CUresult (*)(int*, CUdevice_P2PAttribute, CUdevice, CUdevice) nogil> __cuDeviceGetP2PAttribute)(value, attrib, srcDevice, dstDevice)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphicsUnregisterResource(CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7383
 * 
 * cdef CUresult _cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuDeviceGetP2PAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetP2PAttribute == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7382
 *     return err
 * 
 * cdef CUresult _cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuDeviceGetP2PAttribute
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuDeviceGetP2PAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7391
 *     return err
 * 
 * cdef CUresult _cuGraphicsUnregisterResource(CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsUnregisterResource
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsUnregisterResource(CUgraphicsResource __pyx_v_resource) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphicsUnregisterResource", 1);
  __Pyx_TraceCall("_cuGraphicsUnregisterResource", __pyx_f[0], 7391, 1, __PYX_ERR(0, 7391, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7392
 * 
 * cdef CUresult _cuGraphicsUnregisterResource(CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsUnregisterResource             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsUnregisterResource == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7393
 * cdef CUresult _cuGraphicsUnregisterResource(CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsUnregisterResource
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphicsUnregisterResource == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7393, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7394
 *     global __cuGraphicsUnregisterResource
 *     cuPythonInit()
 *     if __cuGraphicsUnregisterResource == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsUnregisterResource" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsUnregisterResource == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7395
 *     cuPythonInit()
 *     if __cuGraphicsUnregisterResource == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphicsUnregisterResource" not found')
 *     err = (<CUresult (*)(CUgraphicsResource) nogil> __cuGraphicsUnregisterResource)(resource)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7396
 *     if __cuGraphicsUnregisterResource == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsUnregisterResource" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphicsResource) nogil> __cuGraphicsUnregisterResource)(resource)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__385, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7396, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7396, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7395
 *     cuPythonInit()
 *     if __cuGraphicsUnregisterResource == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphicsUnregisterResource" not found')
 *     err = (<CUresult (*)(CUgraphicsResource) nogil> __cuGraphicsUnregisterResource)(resource)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7394
 *     global __cuGraphicsUnregisterResource
 *     cuPythonInit()
 *     if __cuGraphicsUnregisterResource == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsUnregisterResource" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7397
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsUnregisterResource" not found')
 *     err = (<CUresult (*)(CUgraphicsResource) nogil> __cuGraphicsUnregisterResource)(resource)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphicsResource))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsUnregisterResource)(__pyx_v_resource);

    /* "cuda/_cuda/ccuda.pyx":7398
 *             raise RuntimeError('Function "cuGraphicsUnregisterResource" not found')
 *     err = (<CUresult (*)(CUgraphicsResource) nogil> __cuGraphicsUnregisterResource)(resource)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7392
 * 
 * cdef CUresult _cuGraphicsUnregisterResource(CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsUnregisterResource             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsUnregisterResource == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7391
 *     return err
 * 
 * cdef CUresult _cuGraphicsUnregisterResource(CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsUnregisterResource
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphicsUnregisterResource", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7400
 *     return err
 * 
 * cdef CUresult _cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsSubResourceGetMappedArray
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsSubResourceGetMappedArray(CUarray *__pyx_v_pArray, CUgraphicsResource __pyx_v_resource, unsigned int __pyx_v_arrayIndex, unsigned int __pyx_v_mipLevel) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphicsSubResourceGetMappedArray", 1);
  __Pyx_TraceCall("_cuGraphicsSubResourceGetMappedArray", __pyx_f[0], 7400, 1, __PYX_ERR(0, 7400, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7401
 * 
 * cdef CUresult _cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsSubResourceGetMappedArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsSubResourceGetMappedArray == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7402
 * cdef CUresult _cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsSubResourceGetMappedArray
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphicsSubResourceGetMappedArray == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7402, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7403
 *     global __cuGraphicsSubResourceGetMappedArray
 *     cuPythonInit()
 *     if __cuGraphicsSubResourceGetMappedArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsSubResourceGetMappedArray" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsSubResourceGetMappedArray == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7404
 *     cuPythonInit()
 *     if __cuGraphicsSubResourceGetMappedArray == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphicsSubResourceGetMappedArray" not found')
 *     err = (<CUresult (*)(CUarray*, CUgraphicsResource, unsigned int, unsigned int) nogil> __cuGraphicsSubResourceGetMappedArray)(pArray, resource, arrayIndex, mipLevel)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7405
 *     if __cuGraphicsSubResourceGetMappedArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsSubResourceGetMappedArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray*, CUgraphicsResource, unsigned int, unsigned int) nogil> __cuGraphicsSubResourceGetMappedArray)(pArray, resource, arrayIndex, mipLevel)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__386, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7405, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7405, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7404
 *     cuPythonInit()
 *     if __cuGraphicsSubResourceGetMappedArray == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphicsSubResourceGetMappedArray" not found')
 *     err = (<CUresult (*)(CUarray*, CUgraphicsResource, unsigned int, unsigned int) nogil> __cuGraphicsSubResourceGetMappedArray)(pArray, resource, arrayIndex, mipLevel)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7403
 *     global __cuGraphicsSubResourceGetMappedArray
 *     cuPythonInit()
 *     if __cuGraphicsSubResourceGetMappedArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsSubResourceGetMappedArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7406
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsSubResourceGetMappedArray" not found')
 *     err = (<CUresult (*)(CUarray*, CUgraphicsResource, unsigned int, unsigned int) nogil> __cuGraphicsSubResourceGetMappedArray)(pArray, resource, arrayIndex, mipLevel)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUarray *, CUgraphicsResource, unsigned int, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsSubResourceGetMappedArray)(__pyx_v_pArray, __pyx_v_resource, __pyx_v_arrayIndex, __pyx_v_mipLevel);

    /* "cuda/_cuda/ccuda.pyx":7407
 *             raise RuntimeError('Function "cuGraphicsSubResourceGetMappedArray" not found')
 *     err = (<CUresult (*)(CUarray*, CUgraphicsResource, unsigned int, unsigned int) nogil> __cuGraphicsSubResourceGetMappedArray)(pArray, resource, arrayIndex, mipLevel)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7401
 * 
 * cdef CUresult _cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsSubResourceGetMappedArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsSubResourceGetMappedArray == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7400
 *     return err
 * 
 * cdef CUresult _cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsSubResourceGetMappedArray
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphicsSubResourceGetMappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7409
 *     return err
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsResourceGetMappedMipmappedArray
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray *__pyx_v_pMipmappedArray, CUgraphicsResource __pyx_v_resource) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphicsResourceGetMappedMipmappedArray", 1);
  __Pyx_TraceCall("_cuGraphicsResourceGetMappedMipmappedArray", __pyx_f[0], 7409, 1, __PYX_ERR(0, 7409, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7410
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsResourceGetMappedMipmappedArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedMipmappedArray == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7411
 * cdef CUresult _cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsResourceGetMappedMipmappedArray
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphicsResourceGetMappedMipmappedArray == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7411, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7412
 *     global __cuGraphicsResourceGetMappedMipmappedArray
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedMipmappedArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedMipmappedArray" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceGetMappedMipmappedArray == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7413
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedMipmappedArray == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedMipmappedArray" not found')
 *     err = (<CUresult (*)(CUmipmappedArray*, CUgraphicsResource) nogil> __cuGraphicsResourceGetMappedMipmappedArray)(pMipmappedArray, resource)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7414
 *     if __cuGraphicsResourceGetMappedMipmappedArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedMipmappedArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmipmappedArray*, CUgraphicsResource) nogil> __cuGraphicsResourceGetMappedMipmappedArray)(pMipmappedArray, resource)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__387, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7414, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7414, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7413
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedMipmappedArray == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedMipmappedArray" not found')
 *     err = (<CUresult (*)(CUmipmappedArray*, CUgraphicsResource) nogil> __cuGraphicsResourceGetMappedMipmappedArray)(pMipmappedArray, resource)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7412
 *     global __cuGraphicsResourceGetMappedMipmappedArray
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedMipmappedArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedMipmappedArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7415
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedMipmappedArray" not found')
 *     err = (<CUresult (*)(CUmipmappedArray*, CUgraphicsResource) nogil> __cuGraphicsResourceGetMappedMipmappedArray)(pMipmappedArray, resource)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUmipmappedArray *, CUgraphicsResource))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceGetMappedMipmappedArray)(__pyx_v_pMipmappedArray, __pyx_v_resource);

    /* "cuda/_cuda/ccuda.pyx":7416
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedMipmappedArray" not found')
 *     err = (<CUresult (*)(CUmipmappedArray*, CUgraphicsResource) nogil> __cuGraphicsResourceGetMappedMipmappedArray)(pMipmappedArray, resource)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedPointer_v2(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7410
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsResourceGetMappedMipmappedArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedMipmappedArray == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7409
 *     return err
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsResourceGetMappedMipmappedArray
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphicsResourceGetMappedMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7418
 *     return err
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedPointer_v2(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsResourceGetMappedPointer_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceGetMappedPointer_v2(CUdeviceptr *__pyx_v_pDevPtr, size_t *__pyx_v_pSize, CUgraphicsResource __pyx_v_resource) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphicsResourceGetMappedPointer_v2", 1);
  __Pyx_TraceCall("_cuGraphicsResourceGetMappedPointer_v2", __pyx_f[0], 7418, 1, __PYX_ERR(0, 7418, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7419
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedPointer_v2(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsResourceGetMappedPointer_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedPointer_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7420
 * cdef CUresult _cuGraphicsResourceGetMappedPointer_v2(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsResourceGetMappedPointer_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphicsResourceGetMappedPointer_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7420, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7421
 *     global __cuGraphicsResourceGetMappedPointer_v2
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedPointer_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedPointer_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceGetMappedPointer_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7422
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedPointer_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedPointer_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUgraphicsResource) nogil> __cuGraphicsResourceGetMappedPointer_v2)(pDevPtr, pSize, resource)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7423
 *     if __cuGraphicsResourceGetMappedPointer_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedPointer_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUgraphicsResource) nogil> __cuGraphicsResourceGetMappedPointer_v2)(pDevPtr, pSize, resource)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__388, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7423, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7423, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7422
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedPointer_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedPointer_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUgraphicsResource) nogil> __cuGraphicsResourceGetMappedPointer_v2)(pDevPtr, pSize, resource)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7421
 *     global __cuGraphicsResourceGetMappedPointer_v2
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedPointer_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedPointer_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7424
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedPointer_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUgraphicsResource) nogil> __cuGraphicsResourceGetMappedPointer_v2)(pDevPtr, pSize, resource)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdeviceptr *, size_t *, CUgraphicsResource))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceGetMappedPointer_v2)(__pyx_v_pDevPtr, __pyx_v_pSize, __pyx_v_resource);

    /* "cuda/_cuda/ccuda.pyx":7425
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedPointer_v2" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUgraphicsResource) nogil> __cuGraphicsResourceGetMappedPointer_v2)(pDevPtr, pSize, resource)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphicsResourceSetMapFlags_v2(CUgraphicsResource resource, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7419
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedPointer_v2(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsResourceGetMappedPointer_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedPointer_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7418
 *     return err
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedPointer_v2(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsResourceGetMappedPointer_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphicsResourceGetMappedPointer_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7427
 *     return err
 * 
 * cdef CUresult _cuGraphicsResourceSetMapFlags_v2(CUgraphicsResource resource, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsResourceSetMapFlags_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceSetMapFlags_v2(CUgraphicsResource __pyx_v_resource, unsigned int __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphicsResourceSetMapFlags_v2", 1);
  __Pyx_TraceCall("_cuGraphicsResourceSetMapFlags_v2", __pyx_f[0], 7427, 1, __PYX_ERR(0, 7427, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7428
 * 
 * cdef CUresult _cuGraphicsResourceSetMapFlags_v2(CUgraphicsResource resource, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsResourceSetMapFlags_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsResourceSetMapFlags_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7429
 * cdef CUresult _cuGraphicsResourceSetMapFlags_v2(CUgraphicsResource resource, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsResourceSetMapFlags_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphicsResourceSetMapFlags_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7429, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7430
 *     global __cuGraphicsResourceSetMapFlags_v2
 *     cuPythonInit()
 *     if __cuGraphicsResourceSetMapFlags_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceSetMapFlags_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceSetMapFlags_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7431
 *     cuPythonInit()
 *     if __cuGraphicsResourceSetMapFlags_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphicsResourceSetMapFlags_v2" not found')
 *     err = (<CUresult (*)(CUgraphicsResource, unsigned int) nogil> __cuGraphicsResourceSetMapFlags_v2)(resource, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7432
 *     if __cuGraphicsResourceSetMapFlags_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceSetMapFlags_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphicsResource, unsigned int) nogil> __cuGraphicsResourceSetMapFlags_v2)(resource, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__389, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7432, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7432, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7431
 *     cuPythonInit()
 *     if __cuGraphicsResourceSetMapFlags_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphicsResourceSetMapFlags_v2" not found')
 *     err = (<CUresult (*)(CUgraphicsResource, unsigned int) nogil> __cuGraphicsResourceSetMapFlags_v2)(resource, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7430
 *     global __cuGraphicsResourceSetMapFlags_v2
 *     cuPythonInit()
 *     if __cuGraphicsResourceSetMapFlags_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceSetMapFlags_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7433
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceSetMapFlags_v2" not found')
 *     err = (<CUresult (*)(CUgraphicsResource, unsigned int) nogil> __cuGraphicsResourceSetMapFlags_v2)(resource, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphicsResource, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceSetMapFlags_v2)(__pyx_v_resource, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":7434
 *             raise RuntimeError('Function "cuGraphicsResourceSetMapFlags_v2" not found')
 *     err = (<CUresult (*)(CUgraphicsResource, unsigned int) nogil> __cuGraphicsResourceSetMapFlags_v2)(resource, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7428
 * 
 * cdef CUresult _cuGraphicsResourceSetMapFlags_v2(CUgraphicsResource resource, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsResourceSetMapFlags_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsResourceSetMapFlags_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7427
 *     return err
 * 
 * cdef CUresult _cuGraphicsResourceSetMapFlags_v2(CUgraphicsResource resource, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsResourceSetMapFlags_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphicsResourceSetMapFlags_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7436
 *     return err
 * 
 * cdef CUresult _cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsMapResources
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsMapResources(unsigned int __pyx_v_count, CUgraphicsResource *__pyx_v_resources, CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphicsMapResources", 1);
  __Pyx_TraceCall("_cuGraphicsMapResources", __pyx_f[0], 7436, 1, __PYX_ERR(0, 7436, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7437
 * 
 * cdef CUresult _cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsMapResources             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsMapResources == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7438
 * cdef CUresult _cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsMapResources
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphicsMapResources == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7438, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7439
 *     global __cuGraphicsMapResources
 *     cuPythonInit()
 *     if __cuGraphicsMapResources == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsMapResources" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsMapResources == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7440
 *     cuPythonInit()
 *     if __cuGraphicsMapResources == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphicsMapResources" not found')
 *     err = (<CUresult (*)(unsigned int, CUgraphicsResource*, CUstream) nogil> __cuGraphicsMapResources)(count, resources, hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7441
 *     if __cuGraphicsMapResources == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsMapResources" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int, CUgraphicsResource*, CUstream) nogil> __cuGraphicsMapResources)(count, resources, hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__390, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7441, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7441, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7440
 *     cuPythonInit()
 *     if __cuGraphicsMapResources == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphicsMapResources" not found')
 *     err = (<CUresult (*)(unsigned int, CUgraphicsResource*, CUstream) nogil> __cuGraphicsMapResources)(count, resources, hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7439
 *     global __cuGraphicsMapResources
 *     cuPythonInit()
 *     if __cuGraphicsMapResources == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsMapResources" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7442
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsMapResources" not found')
 *     err = (<CUresult (*)(unsigned int, CUgraphicsResource*, CUstream) nogil> __cuGraphicsMapResources)(count, resources, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(unsigned int, CUgraphicsResource *, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsMapResources)(__pyx_v_count, __pyx_v_resources, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":7443
 *             raise RuntimeError('Function "cuGraphicsMapResources" not found')
 *     err = (<CUresult (*)(unsigned int, CUgraphicsResource*, CUstream) nogil> __cuGraphicsMapResources)(count, resources, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7437
 * 
 * cdef CUresult _cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsMapResources             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsMapResources == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7436
 *     return err
 * 
 * cdef CUresult _cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsMapResources
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphicsMapResources", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7445
 *     return err
 * 
 * cdef CUresult _cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsUnmapResources
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsUnmapResources(unsigned int __pyx_v_count, CUgraphicsResource *__pyx_v_resources, CUstream __pyx_v_hStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphicsUnmapResources", 1);
  __Pyx_TraceCall("_cuGraphicsUnmapResources", __pyx_f[0], 7445, 1, __PYX_ERR(0, 7445, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7446
 * 
 * cdef CUresult _cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsUnmapResources             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsUnmapResources == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7447
 * cdef CUresult _cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsUnmapResources
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphicsUnmapResources == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7447, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7448
 *     global __cuGraphicsUnmapResources
 *     cuPythonInit()
 *     if __cuGraphicsUnmapResources == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsUnmapResources" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsUnmapResources == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7449
 *     cuPythonInit()
 *     if __cuGraphicsUnmapResources == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphicsUnmapResources" not found')
 *     err = (<CUresult (*)(unsigned int, CUgraphicsResource*, CUstream) nogil> __cuGraphicsUnmapResources)(count, resources, hStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7450
 *     if __cuGraphicsUnmapResources == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsUnmapResources" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int, CUgraphicsResource*, CUstream) nogil> __cuGraphicsUnmapResources)(count, resources, hStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__391, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7450, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7450, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7449
 *     cuPythonInit()
 *     if __cuGraphicsUnmapResources == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphicsUnmapResources" not found')
 *     err = (<CUresult (*)(unsigned int, CUgraphicsResource*, CUstream) nogil> __cuGraphicsUnmapResources)(count, resources, hStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7448
 *     global __cuGraphicsUnmapResources
 *     cuPythonInit()
 *     if __cuGraphicsUnmapResources == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsUnmapResources" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7451
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsUnmapResources" not found')
 *     err = (<CUresult (*)(unsigned int, CUgraphicsResource*, CUstream) nogil> __cuGraphicsUnmapResources)(count, resources, hStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(unsigned int, CUgraphicsResource *, CUstream))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsUnmapResources)(__pyx_v_count, __pyx_v_resources, __pyx_v_hStream);

    /* "cuda/_cuda/ccuda.pyx":7452
 *             raise RuntimeError('Function "cuGraphicsUnmapResources" not found')
 *     err = (<CUresult (*)(unsigned int, CUgraphicsResource*, CUstream) nogil> __cuGraphicsUnmapResources)(count, resources, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGetProcAddress_v2(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags, CUdriverProcAddressQueryResult* symbolStatus) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7446
 * 
 * cdef CUresult _cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsUnmapResources             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsUnmapResources == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7445
 *     return err
 * 
 * cdef CUresult _cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsUnmapResources
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphicsUnmapResources", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7454
 *     return err
 * 
 * cdef CUresult _cuGetProcAddress_v2(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags, CUdriverProcAddressQueryResult* symbolStatus) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGetProcAddress_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress_v2(char const *__pyx_v_symbol, void **__pyx_v_pfn, int __pyx_v_cudaVersion, cuuint64_t __pyx_v_flags, CUdriverProcAddressQueryResult *__pyx_v_symbolStatus) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGetProcAddress_v2", 1);
  __Pyx_TraceCall("_cuGetProcAddress_v2", __pyx_f[0], 7454, 1, __PYX_ERR(0, 7454, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7455
 * 
 * cdef CUresult _cuGetProcAddress_v2(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags, CUdriverProcAddressQueryResult* symbolStatus) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGetProcAddress_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGetProcAddress_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7456
 * cdef CUresult _cuGetProcAddress_v2(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags, CUdriverProcAddressQueryResult* symbolStatus) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGetProcAddress_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGetProcAddress_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7456, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7457
 *     global __cuGetProcAddress_v2
 *     cuPythonInit()
 *     if __cuGetProcAddress_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGetProcAddress_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGetProcAddress_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7458
 *     cuPythonInit()
 *     if __cuGetProcAddress_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGetProcAddress_v2" not found')
 *     err = (<CUresult (*)(const char*, void**, int, cuuint64_t, CUdriverProcAddressQueryResult*) nogil> __cuGetProcAddress_v2)(symbol, pfn, cudaVersion, flags, symbolStatus)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7459
 *     if __cuGetProcAddress_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGetProcAddress_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const char*, void**, int, cuuint64_t, CUdriverProcAddressQueryResult*) nogil> __cuGetProcAddress_v2)(symbol, pfn, cudaVersion, flags, symbolStatus)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__392, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7459, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7459, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7458
 *     cuPythonInit()
 *     if __cuGetProcAddress_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGetProcAddress_v2" not found')
 *     err = (<CUresult (*)(const char*, void**, int, cuuint64_t, CUdriverProcAddressQueryResult*) nogil> __cuGetProcAddress_v2)(symbol, pfn, cudaVersion, flags, symbolStatus)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7457
 *     global __cuGetProcAddress_v2
 *     cuPythonInit()
 *     if __cuGetProcAddress_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGetProcAddress_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7460
 *         with gil:
 *             raise RuntimeError('Function "cuGetProcAddress_v2" not found')
 *     err = (<CUresult (*)(const char*, void**, int, cuuint64_t, CUdriverProcAddressQueryResult*) nogil> __cuGetProcAddress_v2)(symbol, pfn, cudaVersion, flags, symbolStatus)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(char const *, void **, int, cuuint64_t, CUdriverProcAddressQueryResult *))__pyx_v_4cuda_5_cuda_5ccuda___cuGetProcAddress_v2)(__pyx_v_symbol, __pyx_v_pfn, __pyx_v_cudaVersion, __pyx_v_flags, __pyx_v_symbolStatus);

    /* "cuda/_cuda/ccuda.pyx":7461
 *             raise RuntimeError('Function "cuGetProcAddress_v2" not found')
 *     err = (<CUresult (*)(const char*, void**, int, cuuint64_t, CUdriverProcAddressQueryResult*) nogil> __cuGetProcAddress_v2)(symbol, pfn, cudaVersion, flags, symbolStatus)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCoredumpGetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7455
 * 
 * cdef CUresult _cuGetProcAddress_v2(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags, CUdriverProcAddressQueryResult* symbolStatus) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGetProcAddress_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGetProcAddress_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7454
 *     return err
 * 
 * cdef CUresult _cuGetProcAddress_v2(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags, CUdriverProcAddressQueryResult* symbolStatus) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGetProcAddress_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGetProcAddress_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7463
 *     return err
 * 
 * cdef CUresult _cuCoredumpGetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCoredumpGetAttribute
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCoredumpGetAttribute(CUcoredumpSettings __pyx_v_attrib, void *__pyx_v_value, size_t *__pyx_v_size) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCoredumpGetAttribute", 1);
  __Pyx_TraceCall("_cuCoredumpGetAttribute", __pyx_f[0], 7463, 1, __PYX_ERR(0, 7463, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7464
 * 
 * cdef CUresult _cuCoredumpGetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCoredumpGetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCoredumpGetAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7465
 * cdef CUresult _cuCoredumpGetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCoredumpGetAttribute
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCoredumpGetAttribute == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7465, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7466
 *     global __cuCoredumpGetAttribute
 *     cuPythonInit()
 *     if __cuCoredumpGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCoredumpGetAttribute" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCoredumpGetAttribute == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7467
 *     cuPythonInit()
 *     if __cuCoredumpGetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCoredumpGetAttribute" not found')
 *     err = (<CUresult (*)(CUcoredumpSettings, void*, size_t*) nogil> __cuCoredumpGetAttribute)(attrib, value, size)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7468
 *     if __cuCoredumpGetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCoredumpGetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcoredumpSettings, void*, size_t*) nogil> __cuCoredumpGetAttribute)(attrib, value, size)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__393, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7468, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7468, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7467
 *     cuPythonInit()
 *     if __cuCoredumpGetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCoredumpGetAttribute" not found')
 *     err = (<CUresult (*)(CUcoredumpSettings, void*, size_t*) nogil> __cuCoredumpGetAttribute)(attrib, value, size)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7466
 *     global __cuCoredumpGetAttribute
 *     cuPythonInit()
 *     if __cuCoredumpGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCoredumpGetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7469
 *         with gil:
 *             raise RuntimeError('Function "cuCoredumpGetAttribute" not found')
 *     err = (<CUresult (*)(CUcoredumpSettings, void*, size_t*) nogil> __cuCoredumpGetAttribute)(attrib, value, size)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUcoredumpSettings, void *, size_t *))__pyx_v_4cuda_5_cuda_5ccuda___cuCoredumpGetAttribute)(__pyx_v_attrib, __pyx_v_value, __pyx_v_size);

    /* "cuda/_cuda/ccuda.pyx":7470
 *             raise RuntimeError('Function "cuCoredumpGetAttribute" not found')
 *     err = (<CUresult (*)(CUcoredumpSettings, void*, size_t*) nogil> __cuCoredumpGetAttribute)(attrib, value, size)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCoredumpGetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7464
 * 
 * cdef CUresult _cuCoredumpGetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCoredumpGetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCoredumpGetAttribute == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7463
 *     return err
 * 
 * cdef CUresult _cuCoredumpGetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCoredumpGetAttribute
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCoredumpGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7472
 *     return err
 * 
 * cdef CUresult _cuCoredumpGetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCoredumpGetAttributeGlobal
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCoredumpGetAttributeGlobal(CUcoredumpSettings __pyx_v_attrib, void *__pyx_v_value, size_t *__pyx_v_size) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCoredumpGetAttributeGlobal", 1);
  __Pyx_TraceCall("_cuCoredumpGetAttributeGlobal", __pyx_f[0], 7472, 1, __PYX_ERR(0, 7472, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7473
 * 
 * cdef CUresult _cuCoredumpGetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCoredumpGetAttributeGlobal             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCoredumpGetAttributeGlobal == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7474
 * cdef CUresult _cuCoredumpGetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCoredumpGetAttributeGlobal
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCoredumpGetAttributeGlobal == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7474, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7475
 *     global __cuCoredumpGetAttributeGlobal
 *     cuPythonInit()
 *     if __cuCoredumpGetAttributeGlobal == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCoredumpGetAttributeGlobal" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCoredumpGetAttributeGlobal == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7476
 *     cuPythonInit()
 *     if __cuCoredumpGetAttributeGlobal == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCoredumpGetAttributeGlobal" not found')
 *     err = (<CUresult (*)(CUcoredumpSettings, void*, size_t*) nogil> __cuCoredumpGetAttributeGlobal)(attrib, value, size)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7477
 *     if __cuCoredumpGetAttributeGlobal == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCoredumpGetAttributeGlobal" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcoredumpSettings, void*, size_t*) nogil> __cuCoredumpGetAttributeGlobal)(attrib, value, size)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__394, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7477, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7477, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7476
 *     cuPythonInit()
 *     if __cuCoredumpGetAttributeGlobal == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCoredumpGetAttributeGlobal" not found')
 *     err = (<CUresult (*)(CUcoredumpSettings, void*, size_t*) nogil> __cuCoredumpGetAttributeGlobal)(attrib, value, size)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7475
 *     global __cuCoredumpGetAttributeGlobal
 *     cuPythonInit()
 *     if __cuCoredumpGetAttributeGlobal == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCoredumpGetAttributeGlobal" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7478
 *         with gil:
 *             raise RuntimeError('Function "cuCoredumpGetAttributeGlobal" not found')
 *     err = (<CUresult (*)(CUcoredumpSettings, void*, size_t*) nogil> __cuCoredumpGetAttributeGlobal)(attrib, value, size)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUcoredumpSettings, void *, size_t *))__pyx_v_4cuda_5_cuda_5ccuda___cuCoredumpGetAttributeGlobal)(__pyx_v_attrib, __pyx_v_value, __pyx_v_size);

    /* "cuda/_cuda/ccuda.pyx":7479
 *             raise RuntimeError('Function "cuCoredumpGetAttributeGlobal" not found')
 *     err = (<CUresult (*)(CUcoredumpSettings, void*, size_t*) nogil> __cuCoredumpGetAttributeGlobal)(attrib, value, size)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCoredumpSetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7473
 * 
 * cdef CUresult _cuCoredumpGetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCoredumpGetAttributeGlobal             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCoredumpGetAttributeGlobal == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7472
 *     return err
 * 
 * cdef CUresult _cuCoredumpGetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCoredumpGetAttributeGlobal
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCoredumpGetAttributeGlobal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7481
 *     return err
 * 
 * cdef CUresult _cuCoredumpSetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCoredumpSetAttribute
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCoredumpSetAttribute(CUcoredumpSettings __pyx_v_attrib, void *__pyx_v_value, size_t *__pyx_v_size) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCoredumpSetAttribute", 1);
  __Pyx_TraceCall("_cuCoredumpSetAttribute", __pyx_f[0], 7481, 1, __PYX_ERR(0, 7481, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7482
 * 
 * cdef CUresult _cuCoredumpSetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCoredumpSetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCoredumpSetAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7483
 * cdef CUresult _cuCoredumpSetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCoredumpSetAttribute
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCoredumpSetAttribute == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7483, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7484
 *     global __cuCoredumpSetAttribute
 *     cuPythonInit()
 *     if __cuCoredumpSetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCoredumpSetAttribute" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCoredumpSetAttribute == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7485
 *     cuPythonInit()
 *     if __cuCoredumpSetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCoredumpSetAttribute" not found')
 *     err = (<CUresult (*)(CUcoredumpSettings, void*, size_t*) nogil> __cuCoredumpSetAttribute)(attrib, value, size)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7486
 *     if __cuCoredumpSetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCoredumpSetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcoredumpSettings, void*, size_t*) nogil> __cuCoredumpSetAttribute)(attrib, value, size)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__395, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7486, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7486, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7485
 *     cuPythonInit()
 *     if __cuCoredumpSetAttribute == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCoredumpSetAttribute" not found')
 *     err = (<CUresult (*)(CUcoredumpSettings, void*, size_t*) nogil> __cuCoredumpSetAttribute)(attrib, value, size)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7484
 *     global __cuCoredumpSetAttribute
 *     cuPythonInit()
 *     if __cuCoredumpSetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCoredumpSetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7487
 *         with gil:
 *             raise RuntimeError('Function "cuCoredumpSetAttribute" not found')
 *     err = (<CUresult (*)(CUcoredumpSettings, void*, size_t*) nogil> __cuCoredumpSetAttribute)(attrib, value, size)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUcoredumpSettings, void *, size_t *))__pyx_v_4cuda_5_cuda_5ccuda___cuCoredumpSetAttribute)(__pyx_v_attrib, __pyx_v_value, __pyx_v_size);

    /* "cuda/_cuda/ccuda.pyx":7488
 *             raise RuntimeError('Function "cuCoredumpSetAttribute" not found')
 *     err = (<CUresult (*)(CUcoredumpSettings, void*, size_t*) nogil> __cuCoredumpSetAttribute)(attrib, value, size)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCoredumpSetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7482
 * 
 * cdef CUresult _cuCoredumpSetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCoredumpSetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCoredumpSetAttribute == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7481
 *     return err
 * 
 * cdef CUresult _cuCoredumpSetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCoredumpSetAttribute
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCoredumpSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7490
 *     return err
 * 
 * cdef CUresult _cuCoredumpSetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCoredumpSetAttributeGlobal
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuCoredumpSetAttributeGlobal(CUcoredumpSettings __pyx_v_attrib, void *__pyx_v_value, size_t *__pyx_v_size) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuCoredumpSetAttributeGlobal", 1);
  __Pyx_TraceCall("_cuCoredumpSetAttributeGlobal", __pyx_f[0], 7490, 1, __PYX_ERR(0, 7490, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7491
 * 
 * cdef CUresult _cuCoredumpSetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCoredumpSetAttributeGlobal             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCoredumpSetAttributeGlobal == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7492
 * cdef CUresult _cuCoredumpSetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCoredumpSetAttributeGlobal
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuCoredumpSetAttributeGlobal == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7492, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7493
 *     global __cuCoredumpSetAttributeGlobal
 *     cuPythonInit()
 *     if __cuCoredumpSetAttributeGlobal == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCoredumpSetAttributeGlobal" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuCoredumpSetAttributeGlobal == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7494
 *     cuPythonInit()
 *     if __cuCoredumpSetAttributeGlobal == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCoredumpSetAttributeGlobal" not found')
 *     err = (<CUresult (*)(CUcoredumpSettings, void*, size_t*) nogil> __cuCoredumpSetAttributeGlobal)(attrib, value, size)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7495
 *     if __cuCoredumpSetAttributeGlobal == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCoredumpSetAttributeGlobal" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcoredumpSettings, void*, size_t*) nogil> __cuCoredumpSetAttributeGlobal)(attrib, value, size)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__396, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7495, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7495, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7494
 *     cuPythonInit()
 *     if __cuCoredumpSetAttributeGlobal == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuCoredumpSetAttributeGlobal" not found')
 *     err = (<CUresult (*)(CUcoredumpSettings, void*, size_t*) nogil> __cuCoredumpSetAttributeGlobal)(attrib, value, size)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7493
 *     global __cuCoredumpSetAttributeGlobal
 *     cuPythonInit()
 *     if __cuCoredumpSetAttributeGlobal == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCoredumpSetAttributeGlobal" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7496
 *         with gil:
 *             raise RuntimeError('Function "cuCoredumpSetAttributeGlobal" not found')
 *     err = (<CUresult (*)(CUcoredumpSettings, void*, size_t*) nogil> __cuCoredumpSetAttributeGlobal)(attrib, value, size)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUcoredumpSettings, void *, size_t *))__pyx_v_4cuda_5_cuda_5ccuda___cuCoredumpSetAttributeGlobal)(__pyx_v_attrib, __pyx_v_value, __pyx_v_size);

    /* "cuda/_cuda/ccuda.pyx":7497
 *             raise RuntimeError('Function "cuCoredumpSetAttributeGlobal" not found')
 *     err = (<CUresult (*)(CUcoredumpSettings, void*, size_t*) nogil> __cuCoredumpSetAttributeGlobal)(attrib, value, size)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7491
 * 
 * cdef CUresult _cuCoredumpSetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuCoredumpSetAttributeGlobal             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCoredumpSetAttributeGlobal == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7490
 *     return err
 * 
 * cdef CUresult _cuCoredumpSetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuCoredumpSetAttributeGlobal
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuCoredumpSetAttributeGlobal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7499
 *     return err
 * 
 * cdef CUresult _cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGetExportTable
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGetExportTable(void const **__pyx_v_ppExportTable, CUuuid const *__pyx_v_pExportTableId) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGetExportTable", 1);
  __Pyx_TraceCall("_cuGetExportTable", __pyx_f[0], 7499, 1, __PYX_ERR(0, 7499, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7500
 * 
 * cdef CUresult _cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGetExportTable             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGetExportTable == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7501
 * cdef CUresult _cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGetExportTable
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGetExportTable == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7501, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7502
 *     global __cuGetExportTable
 *     cuPythonInit()
 *     if __cuGetExportTable == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGetExportTable" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGetExportTable == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7503
 *     cuPythonInit()
 *     if __cuGetExportTable == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGetExportTable" not found')
 *     err = (<CUresult (*)(const void**, const CUuuid*) nogil> __cuGetExportTable)(ppExportTable, pExportTableId)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7504
 *     if __cuGetExportTable == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGetExportTable" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const void**, const CUuuid*) nogil> __cuGetExportTable)(ppExportTable, pExportTableId)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__397, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7504, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7504, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7503
 *     cuPythonInit()
 *     if __cuGetExportTable == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGetExportTable" not found')
 *     err = (<CUresult (*)(const void**, const CUuuid*) nogil> __cuGetExportTable)(ppExportTable, pExportTableId)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7502
 *     global __cuGetExportTable
 *     cuPythonInit()
 *     if __cuGetExportTable == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGetExportTable" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7505
 *         with gil:
 *             raise RuntimeError('Function "cuGetExportTable" not found')
 *     err = (<CUresult (*)(const void**, const CUuuid*) nogil> __cuGetExportTable)(ppExportTable, pExportTableId)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(void const **, CUuuid const *))__pyx_v_4cuda_5_cuda_5ccuda___cuGetExportTable)(__pyx_v_ppExportTable, __pyx_v_pExportTableId);

    /* "cuda/_cuda/ccuda.pyx":7506
 *             raise RuntimeError('Function "cuGetExportTable" not found')
 *     err = (<CUresult (*)(const void**, const CUuuid*) nogil> __cuGetExportTable)(ppExportTable, pExportTableId)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7500
 * 
 * cdef CUresult _cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGetExportTable             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGetExportTable == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7499
 *     return err
 * 
 * cdef CUresult _cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGetExportTable
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGetExportTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7508
 *     return err
 * 
 * cdef CUresult _cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuProfilerStart
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuProfilerStart(void) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuProfilerStart", 1);
  __Pyx_TraceCall("_cuProfilerStart", __pyx_f[0], 7508, 1, __PYX_ERR(0, 7508, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7509
 * 
 * cdef CUresult _cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuProfilerStart             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuProfilerStart == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7510
 * cdef CUresult _cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuProfilerStart
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuProfilerStart == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7510, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7511
 *     global __cuProfilerStart
 *     cuPythonInit()
 *     if __cuProfilerStart == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuProfilerStart" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuProfilerStart == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7512
 *     cuPythonInit()
 *     if __cuProfilerStart == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuProfilerStart" not found')
 *     err = (<CUresult (*)() nogil> __cuProfilerStart)()
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7513
 *     if __cuProfilerStart == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuProfilerStart" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)() nogil> __cuProfilerStart)()
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__398, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7513, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7513, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7512
 *     cuPythonInit()
 *     if __cuProfilerStart == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuProfilerStart" not found')
 *     err = (<CUresult (*)() nogil> __cuProfilerStart)()
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7511
 *     global __cuProfilerStart
 *     cuPythonInit()
 *     if __cuProfilerStart == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuProfilerStart" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7514
 *         with gil:
 *             raise RuntimeError('Function "cuProfilerStart" not found')
 *     err = (<CUresult (*)() nogil> __cuProfilerStart)()             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(void))__pyx_v_4cuda_5_cuda_5ccuda___cuProfilerStart)();

    /* "cuda/_cuda/ccuda.pyx":7515
 *             raise RuntimeError('Function "cuProfilerStart" not found')
 *     err = (<CUresult (*)() nogil> __cuProfilerStart)()
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuProfilerStop() except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7509
 * 
 * cdef CUresult _cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuProfilerStart             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuProfilerStart == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7508
 *     return err
 * 
 * cdef CUresult _cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuProfilerStart
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuProfilerStart", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7517
 *     return err
 * 
 * cdef CUresult _cuProfilerStop() except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuProfilerStop
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuProfilerStop(void) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuProfilerStop", 1);
  __Pyx_TraceCall("_cuProfilerStop", __pyx_f[0], 7517, 1, __PYX_ERR(0, 7517, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7518
 * 
 * cdef CUresult _cuProfilerStop() except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuProfilerStop             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuProfilerStop == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7519
 * cdef CUresult _cuProfilerStop() except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuProfilerStop
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuProfilerStop == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7519, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7520
 *     global __cuProfilerStop
 *     cuPythonInit()
 *     if __cuProfilerStop == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuProfilerStop" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuProfilerStop == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7521
 *     cuPythonInit()
 *     if __cuProfilerStop == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuProfilerStop" not found')
 *     err = (<CUresult (*)() nogil> __cuProfilerStop)()
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7522
 *     if __cuProfilerStop == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuProfilerStop" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)() nogil> __cuProfilerStop)()
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__399, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7522, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7522, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7521
 *     cuPythonInit()
 *     if __cuProfilerStop == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuProfilerStop" not found')
 *     err = (<CUresult (*)() nogil> __cuProfilerStop)()
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7520
 *     global __cuProfilerStop
 *     cuPythonInit()
 *     if __cuProfilerStop == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuProfilerStop" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7523
 *         with gil:
 *             raise RuntimeError('Function "cuProfilerStop" not found')
 *     err = (<CUresult (*)() nogil> __cuProfilerStop)()             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(void))__pyx_v_4cuda_5_cuda_5ccuda___cuProfilerStop)();

    /* "cuda/_cuda/ccuda.pyx":7524
 *             raise RuntimeError('Function "cuProfilerStop" not found')
 *     err = (<CUresult (*)() nogil> __cuProfilerStop)()
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7518
 * 
 * cdef CUresult _cuProfilerStop() except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuProfilerStop             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuProfilerStop == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7517
 *     return err
 * 
 * cdef CUresult _cuProfilerStop() except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuProfilerStop
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuProfilerStop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7526
 *     return err
 * 
 * cdef CUresult _cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsEGLRegisterImage
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsEGLRegisterImage(CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_5ccuda_EGLImageKHR __pyx_v_image, unsigned int __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphicsEGLRegisterImage", 1);
  __Pyx_TraceCall("_cuGraphicsEGLRegisterImage", __pyx_f[0], 7526, 1, __PYX_ERR(0, 7526, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7527
 * 
 * cdef CUresult _cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsEGLRegisterImage             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsEGLRegisterImage == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7528
 * cdef CUresult _cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsEGLRegisterImage
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphicsEGLRegisterImage == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7528, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7529
 *     global __cuGraphicsEGLRegisterImage
 *     cuPythonInit()
 *     if __cuGraphicsEGLRegisterImage == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsEGLRegisterImage" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsEGLRegisterImage == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7530
 *     cuPythonInit()
 *     if __cuGraphicsEGLRegisterImage == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphicsEGLRegisterImage" not found')
 *     err = (<CUresult (*)(CUgraphicsResource*, EGLImageKHR, unsigned int) nogil> __cuGraphicsEGLRegisterImage)(pCudaResource, image, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7531
 *     if __cuGraphicsEGLRegisterImage == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsEGLRegisterImage" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphicsResource*, EGLImageKHR, unsigned int) nogil> __cuGraphicsEGLRegisterImage)(pCudaResource, image, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__400, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7531, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7531, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7530
 *     cuPythonInit()
 *     if __cuGraphicsEGLRegisterImage == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphicsEGLRegisterImage" not found')
 *     err = (<CUresult (*)(CUgraphicsResource*, EGLImageKHR, unsigned int) nogil> __cuGraphicsEGLRegisterImage)(pCudaResource, image, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7529
 *     global __cuGraphicsEGLRegisterImage
 *     cuPythonInit()
 *     if __cuGraphicsEGLRegisterImage == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsEGLRegisterImage" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7532
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsEGLRegisterImage" not found')
 *     err = (<CUresult (*)(CUgraphicsResource*, EGLImageKHR, unsigned int) nogil> __cuGraphicsEGLRegisterImage)(pCudaResource, image, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphicsResource *, __pyx_t_4cuda_5ccuda_EGLImageKHR, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsEGLRegisterImage)(__pyx_v_pCudaResource, __pyx_v_image, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":7533
 *             raise RuntimeError('Function "cuGraphicsEGLRegisterImage" not found')
 *     err = (<CUresult (*)(CUgraphicsResource*, EGLImageKHR, unsigned int) nogil> __cuGraphicsEGLRegisterImage)(pCudaResource, image, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7527
 * 
 * cdef CUresult _cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsEGLRegisterImage             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsEGLRegisterImage == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7526
 *     return err
 * 
 * cdef CUresult _cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsEGLRegisterImage
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphicsEGLRegisterImage", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7535
 *     return err
 * 
 * cdef CUresult _cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamConsumerConnect
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerConnect(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_5ccuda_EGLStreamKHR __pyx_v_stream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuEGLStreamConsumerConnect", 1);
  __Pyx_TraceCall("_cuEGLStreamConsumerConnect", __pyx_f[0], 7535, 1, __PYX_ERR(0, 7535, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7536
 * 
 * cdef CUresult _cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEGLStreamConsumerConnect             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerConnect == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7537
 * cdef CUresult _cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEGLStreamConsumerConnect
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuEGLStreamConsumerConnect == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7537, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7538
 *     global __cuEGLStreamConsumerConnect
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerConnect == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerConnect" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerConnect == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7539
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerConnect == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEGLStreamConsumerConnect" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, EGLStreamKHR) nogil> __cuEGLStreamConsumerConnect)(conn, stream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7540
 *     if __cuEGLStreamConsumerConnect == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerConnect" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUeglStreamConnection*, EGLStreamKHR) nogil> __cuEGLStreamConsumerConnect)(conn, stream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__401, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7540, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7540, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7539
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerConnect == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEGLStreamConsumerConnect" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, EGLStreamKHR) nogil> __cuEGLStreamConsumerConnect)(conn, stream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7538
 *     global __cuEGLStreamConsumerConnect
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerConnect == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerConnect" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7541
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerConnect" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, EGLStreamKHR) nogil> __cuEGLStreamConsumerConnect)(conn, stream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_EGLStreamKHR))__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerConnect)(__pyx_v_conn, __pyx_v_stream);

    /* "cuda/_cuda/ccuda.pyx":7542
 *             raise RuntimeError('Function "cuEGLStreamConsumerConnect" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, EGLStreamKHR) nogil> __cuEGLStreamConsumerConnect)(conn, stream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7536
 * 
 * cdef CUresult _cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEGLStreamConsumerConnect             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerConnect == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7535
 *     return err
 * 
 * cdef CUresult _cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamConsumerConnect
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuEGLStreamConsumerConnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7544
 *     return err
 * 
 * cdef CUresult _cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamConsumerConnectWithFlags
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerConnectWithFlags(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_5ccuda_EGLStreamKHR __pyx_v_stream, unsigned int __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuEGLStreamConsumerConnectWithFlags", 1);
  __Pyx_TraceCall("_cuEGLStreamConsumerConnectWithFlags", __pyx_f[0], 7544, 1, __PYX_ERR(0, 7544, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7545
 * 
 * cdef CUresult _cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEGLStreamConsumerConnectWithFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerConnectWithFlags == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7546
 * cdef CUresult _cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEGLStreamConsumerConnectWithFlags
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuEGLStreamConsumerConnectWithFlags == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7546, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7547
 *     global __cuEGLStreamConsumerConnectWithFlags
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerConnectWithFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerConnectWithFlags" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerConnectWithFlags == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7548
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerConnectWithFlags == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEGLStreamConsumerConnectWithFlags" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, EGLStreamKHR, unsigned int) nogil> __cuEGLStreamConsumerConnectWithFlags)(conn, stream, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7549
 *     if __cuEGLStreamConsumerConnectWithFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerConnectWithFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUeglStreamConnection*, EGLStreamKHR, unsigned int) nogil> __cuEGLStreamConsumerConnectWithFlags)(conn, stream, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__402, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7549, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7549, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7548
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerConnectWithFlags == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEGLStreamConsumerConnectWithFlags" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, EGLStreamKHR, unsigned int) nogil> __cuEGLStreamConsumerConnectWithFlags)(conn, stream, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7547
 *     global __cuEGLStreamConsumerConnectWithFlags
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerConnectWithFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerConnectWithFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7550
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerConnectWithFlags" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, EGLStreamKHR, unsigned int) nogil> __cuEGLStreamConsumerConnectWithFlags)(conn, stream, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_EGLStreamKHR, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerConnectWithFlags)(__pyx_v_conn, __pyx_v_stream, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":7551
 *             raise RuntimeError('Function "cuEGLStreamConsumerConnectWithFlags" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, EGLStreamKHR, unsigned int) nogil> __cuEGLStreamConsumerConnectWithFlags)(conn, stream, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7545
 * 
 * cdef CUresult _cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEGLStreamConsumerConnectWithFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerConnectWithFlags == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7544
 *     return err
 * 
 * cdef CUresult _cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamConsumerConnectWithFlags
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuEGLStreamConsumerConnectWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7553
 *     return err
 * 
 * cdef CUresult _cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamConsumerDisconnect
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerDisconnect(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuEGLStreamConsumerDisconnect", 1);
  __Pyx_TraceCall("_cuEGLStreamConsumerDisconnect", __pyx_f[0], 7553, 1, __PYX_ERR(0, 7553, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7554
 * 
 * cdef CUresult _cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEGLStreamConsumerDisconnect             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerDisconnect == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7555
 * cdef CUresult _cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEGLStreamConsumerDisconnect
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuEGLStreamConsumerDisconnect == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7555, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7556
 *     global __cuEGLStreamConsumerDisconnect
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerDisconnect == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerDisconnect" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerDisconnect == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7557
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerDisconnect == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEGLStreamConsumerDisconnect" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*) nogil> __cuEGLStreamConsumerDisconnect)(conn)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7558
 *     if __cuEGLStreamConsumerDisconnect == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerDisconnect" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUeglStreamConnection*) nogil> __cuEGLStreamConsumerDisconnect)(conn)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__403, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7558, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7558, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7557
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerDisconnect == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEGLStreamConsumerDisconnect" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*) nogil> __cuEGLStreamConsumerDisconnect)(conn)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7556
 *     global __cuEGLStreamConsumerDisconnect
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerDisconnect == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerDisconnect" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7559
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerDisconnect" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*) nogil> __cuEGLStreamConsumerDisconnect)(conn)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *))__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerDisconnect)(__pyx_v_conn);

    /* "cuda/_cuda/ccuda.pyx":7560
 *             raise RuntimeError('Function "cuEGLStreamConsumerDisconnect" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*) nogil> __cuEGLStreamConsumerDisconnect)(conn)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7554
 * 
 * cdef CUresult _cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEGLStreamConsumerDisconnect             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerDisconnect == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7553
 *     return err
 * 
 * cdef CUresult _cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamConsumerDisconnect
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuEGLStreamConsumerDisconnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7562
 *     return err
 * 
 * cdef CUresult _cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamConsumerAcquireFrame
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerAcquireFrame(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn, CUgraphicsResource *__pyx_v_pCudaResource, CUstream *__pyx_v_pStream, unsigned int __pyx_v_timeout) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuEGLStreamConsumerAcquireFrame", 1);
  __Pyx_TraceCall("_cuEGLStreamConsumerAcquireFrame", __pyx_f[0], 7562, 1, __PYX_ERR(0, 7562, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7563
 * 
 * cdef CUresult _cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEGLStreamConsumerAcquireFrame             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerAcquireFrame == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7564
 * cdef CUresult _cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEGLStreamConsumerAcquireFrame
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuEGLStreamConsumerAcquireFrame == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7564, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7565
 *     global __cuEGLStreamConsumerAcquireFrame
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerAcquireFrame == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerAcquireFrame" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerAcquireFrame == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7566
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerAcquireFrame == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEGLStreamConsumerAcquireFrame" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, CUgraphicsResource*, CUstream*, unsigned int) nogil> __cuEGLStreamConsumerAcquireFrame)(conn, pCudaResource, pStream, timeout)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7567
 *     if __cuEGLStreamConsumerAcquireFrame == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerAcquireFrame" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUeglStreamConnection*, CUgraphicsResource*, CUstream*, unsigned int) nogil> __cuEGLStreamConsumerAcquireFrame)(conn, pCudaResource, pStream, timeout)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__404, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7567, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7567, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7566
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerAcquireFrame == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEGLStreamConsumerAcquireFrame" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, CUgraphicsResource*, CUstream*, unsigned int) nogil> __cuEGLStreamConsumerAcquireFrame)(conn, pCudaResource, pStream, timeout)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7565
 *     global __cuEGLStreamConsumerAcquireFrame
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerAcquireFrame == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerAcquireFrame" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7568
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerAcquireFrame" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, CUgraphicsResource*, CUstream*, unsigned int) nogil> __cuEGLStreamConsumerAcquireFrame)(conn, pCudaResource, pStream, timeout)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, CUgraphicsResource *, CUstream *, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerAcquireFrame)(__pyx_v_conn, __pyx_v_pCudaResource, __pyx_v_pStream, __pyx_v_timeout);

    /* "cuda/_cuda/ccuda.pyx":7569
 *             raise RuntimeError('Function "cuEGLStreamConsumerAcquireFrame" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, CUgraphicsResource*, CUstream*, unsigned int) nogil> __cuEGLStreamConsumerAcquireFrame)(conn, pCudaResource, pStream, timeout)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7563
 * 
 * cdef CUresult _cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEGLStreamConsumerAcquireFrame             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerAcquireFrame == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7562
 *     return err
 * 
 * cdef CUresult _cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamConsumerAcquireFrame
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuEGLStreamConsumerAcquireFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7571
 *     return err
 * 
 * cdef CUresult _cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamConsumerReleaseFrame
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerReleaseFrame(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn, CUgraphicsResource __pyx_v_pCudaResource, CUstream *__pyx_v_pStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuEGLStreamConsumerReleaseFrame", 1);
  __Pyx_TraceCall("_cuEGLStreamConsumerReleaseFrame", __pyx_f[0], 7571, 1, __PYX_ERR(0, 7571, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7572
 * 
 * cdef CUresult _cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEGLStreamConsumerReleaseFrame             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerReleaseFrame == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7573
 * cdef CUresult _cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEGLStreamConsumerReleaseFrame
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuEGLStreamConsumerReleaseFrame == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7573, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7574
 *     global __cuEGLStreamConsumerReleaseFrame
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerReleaseFrame == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerReleaseFrame" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerReleaseFrame == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7575
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerReleaseFrame == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEGLStreamConsumerReleaseFrame" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, CUgraphicsResource, CUstream*) nogil> __cuEGLStreamConsumerReleaseFrame)(conn, pCudaResource, pStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7576
 *     if __cuEGLStreamConsumerReleaseFrame == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerReleaseFrame" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUeglStreamConnection*, CUgraphicsResource, CUstream*) nogil> __cuEGLStreamConsumerReleaseFrame)(conn, pCudaResource, pStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__405, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7576, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7576, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7575
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerReleaseFrame == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEGLStreamConsumerReleaseFrame" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, CUgraphicsResource, CUstream*) nogil> __cuEGLStreamConsumerReleaseFrame)(conn, pCudaResource, pStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7574
 *     global __cuEGLStreamConsumerReleaseFrame
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerReleaseFrame == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerReleaseFrame" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7577
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerReleaseFrame" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, CUgraphicsResource, CUstream*) nogil> __cuEGLStreamConsumerReleaseFrame)(conn, pCudaResource, pStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, CUgraphicsResource, CUstream *))__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerReleaseFrame)(__pyx_v_conn, __pyx_v_pCudaResource, __pyx_v_pStream);

    /* "cuda/_cuda/ccuda.pyx":7578
 *             raise RuntimeError('Function "cuEGLStreamConsumerReleaseFrame" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, CUgraphicsResource, CUstream*) nogil> __cuEGLStreamConsumerReleaseFrame)(conn, pCudaResource, pStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7572
 * 
 * cdef CUresult _cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEGLStreamConsumerReleaseFrame             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerReleaseFrame == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7571
 *     return err
 * 
 * cdef CUresult _cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamConsumerReleaseFrame
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuEGLStreamConsumerReleaseFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7580
 *     return err
 * 
 * cdef CUresult _cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamProducerConnect
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerConnect(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_5ccuda_EGLStreamKHR __pyx_v_stream, __pyx_t_4cuda_5ccuda_EGLint __pyx_v_width, __pyx_t_4cuda_5ccuda_EGLint __pyx_v_height) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuEGLStreamProducerConnect", 1);
  __Pyx_TraceCall("_cuEGLStreamProducerConnect", __pyx_f[0], 7580, 1, __PYX_ERR(0, 7580, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7581
 * 
 * cdef CUresult _cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEGLStreamProducerConnect             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamProducerConnect == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7582
 * cdef CUresult _cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEGLStreamProducerConnect
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuEGLStreamProducerConnect == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7582, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7583
 *     global __cuEGLStreamProducerConnect
 *     cuPythonInit()
 *     if __cuEGLStreamProducerConnect == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerConnect" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerConnect == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7584
 *     cuPythonInit()
 *     if __cuEGLStreamProducerConnect == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEGLStreamProducerConnect" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, EGLStreamKHR, EGLint, EGLint) nogil> __cuEGLStreamProducerConnect)(conn, stream, width, height)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7585
 *     if __cuEGLStreamProducerConnect == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerConnect" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUeglStreamConnection*, EGLStreamKHR, EGLint, EGLint) nogil> __cuEGLStreamProducerConnect)(conn, stream, width, height)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__406, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7585, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7585, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7584
 *     cuPythonInit()
 *     if __cuEGLStreamProducerConnect == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEGLStreamProducerConnect" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, EGLStreamKHR, EGLint, EGLint) nogil> __cuEGLStreamProducerConnect)(conn, stream, width, height)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7583
 *     global __cuEGLStreamProducerConnect
 *     cuPythonInit()
 *     if __cuEGLStreamProducerConnect == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerConnect" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7586
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerConnect" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, EGLStreamKHR, EGLint, EGLint) nogil> __cuEGLStreamProducerConnect)(conn, stream, width, height)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_EGLStreamKHR, __pyx_t_4cuda_5ccuda_EGLint, __pyx_t_4cuda_5ccuda_EGLint))__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerConnect)(__pyx_v_conn, __pyx_v_stream, __pyx_v_width, __pyx_v_height);

    /* "cuda/_cuda/ccuda.pyx":7587
 *             raise RuntimeError('Function "cuEGLStreamProducerConnect" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, EGLStreamKHR, EGLint, EGLint) nogil> __cuEGLStreamProducerConnect)(conn, stream, width, height)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7581
 * 
 * cdef CUresult _cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEGLStreamProducerConnect             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamProducerConnect == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7580
 *     return err
 * 
 * cdef CUresult _cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamProducerConnect
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuEGLStreamProducerConnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7589
 *     return err
 * 
 * cdef CUresult _cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamProducerDisconnect
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerDisconnect(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuEGLStreamProducerDisconnect", 1);
  __Pyx_TraceCall("_cuEGLStreamProducerDisconnect", __pyx_f[0], 7589, 1, __PYX_ERR(0, 7589, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7590
 * 
 * cdef CUresult _cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEGLStreamProducerDisconnect             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamProducerDisconnect == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7591
 * cdef CUresult _cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEGLStreamProducerDisconnect
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuEGLStreamProducerDisconnect == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7591, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7592
 *     global __cuEGLStreamProducerDisconnect
 *     cuPythonInit()
 *     if __cuEGLStreamProducerDisconnect == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerDisconnect" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerDisconnect == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7593
 *     cuPythonInit()
 *     if __cuEGLStreamProducerDisconnect == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEGLStreamProducerDisconnect" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*) nogil> __cuEGLStreamProducerDisconnect)(conn)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7594
 *     if __cuEGLStreamProducerDisconnect == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerDisconnect" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUeglStreamConnection*) nogil> __cuEGLStreamProducerDisconnect)(conn)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__407, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7594, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7594, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7593
 *     cuPythonInit()
 *     if __cuEGLStreamProducerDisconnect == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEGLStreamProducerDisconnect" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*) nogil> __cuEGLStreamProducerDisconnect)(conn)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7592
 *     global __cuEGLStreamProducerDisconnect
 *     cuPythonInit()
 *     if __cuEGLStreamProducerDisconnect == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerDisconnect" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7595
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerDisconnect" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*) nogil> __cuEGLStreamProducerDisconnect)(conn)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *))__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerDisconnect)(__pyx_v_conn);

    /* "cuda/_cuda/ccuda.pyx":7596
 *             raise RuntimeError('Function "cuEGLStreamProducerDisconnect" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*) nogil> __cuEGLStreamProducerDisconnect)(conn)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7590
 * 
 * cdef CUresult _cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEGLStreamProducerDisconnect             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamProducerDisconnect == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7589
 *     return err
 * 
 * cdef CUresult _cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamProducerDisconnect
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuEGLStreamProducerDisconnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7598
 *     return err
 * 
 * cdef CUresult _cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamProducerPresentFrame
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerPresentFrame(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_5ccuda_CUeglFrame __pyx_v_eglframe, CUstream *__pyx_v_pStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuEGLStreamProducerPresentFrame", 1);
  __Pyx_TraceCall("_cuEGLStreamProducerPresentFrame", __pyx_f[0], 7598, 1, __PYX_ERR(0, 7598, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7599
 * 
 * cdef CUresult _cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEGLStreamProducerPresentFrame             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamProducerPresentFrame == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7600
 * cdef CUresult _cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEGLStreamProducerPresentFrame
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuEGLStreamProducerPresentFrame == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7600, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7601
 *     global __cuEGLStreamProducerPresentFrame
 *     cuPythonInit()
 *     if __cuEGLStreamProducerPresentFrame == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerPresentFrame" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerPresentFrame == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7602
 *     cuPythonInit()
 *     if __cuEGLStreamProducerPresentFrame == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEGLStreamProducerPresentFrame" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, CUeglFrame, CUstream*) nogil> __cuEGLStreamProducerPresentFrame)(conn, eglframe, pStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7603
 *     if __cuEGLStreamProducerPresentFrame == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerPresentFrame" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUeglStreamConnection*, CUeglFrame, CUstream*) nogil> __cuEGLStreamProducerPresentFrame)(conn, eglframe, pStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__408, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7603, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7603, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7602
 *     cuPythonInit()
 *     if __cuEGLStreamProducerPresentFrame == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEGLStreamProducerPresentFrame" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, CUeglFrame, CUstream*) nogil> __cuEGLStreamProducerPresentFrame)(conn, eglframe, pStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7601
 *     global __cuEGLStreamProducerPresentFrame
 *     cuPythonInit()
 *     if __cuEGLStreamProducerPresentFrame == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerPresentFrame" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7604
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerPresentFrame" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, CUeglFrame, CUstream*) nogil> __cuEGLStreamProducerPresentFrame)(conn, eglframe, pStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_CUeglFrame, CUstream *))__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerPresentFrame)(__pyx_v_conn, __pyx_v_eglframe, __pyx_v_pStream);

    /* "cuda/_cuda/ccuda.pyx":7605
 *             raise RuntimeError('Function "cuEGLStreamProducerPresentFrame" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, CUeglFrame, CUstream*) nogil> __cuEGLStreamProducerPresentFrame)(conn, eglframe, pStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7599
 * 
 * cdef CUresult _cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEGLStreamProducerPresentFrame             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamProducerPresentFrame == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7598
 *     return err
 * 
 * cdef CUresult _cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamProducerPresentFrame
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuEGLStreamProducerPresentFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7607
 *     return err
 * 
 * cdef CUresult _cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamProducerReturnFrame
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerReturnFrame(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_5ccuda_CUeglFrame *__pyx_v_eglframe, CUstream *__pyx_v_pStream) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuEGLStreamProducerReturnFrame", 1);
  __Pyx_TraceCall("_cuEGLStreamProducerReturnFrame", __pyx_f[0], 7607, 1, __PYX_ERR(0, 7607, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7608
 * 
 * cdef CUresult _cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEGLStreamProducerReturnFrame             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamProducerReturnFrame == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7609
 * cdef CUresult _cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEGLStreamProducerReturnFrame
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuEGLStreamProducerReturnFrame == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7609, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7610
 *     global __cuEGLStreamProducerReturnFrame
 *     cuPythonInit()
 *     if __cuEGLStreamProducerReturnFrame == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerReturnFrame" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerReturnFrame == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7611
 *     cuPythonInit()
 *     if __cuEGLStreamProducerReturnFrame == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEGLStreamProducerReturnFrame" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, CUeglFrame*, CUstream*) nogil> __cuEGLStreamProducerReturnFrame)(conn, eglframe, pStream)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7612
 *     if __cuEGLStreamProducerReturnFrame == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerReturnFrame" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUeglStreamConnection*, CUeglFrame*, CUstream*) nogil> __cuEGLStreamProducerReturnFrame)(conn, eglframe, pStream)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__409, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7612, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7612, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7611
 *     cuPythonInit()
 *     if __cuEGLStreamProducerReturnFrame == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEGLStreamProducerReturnFrame" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, CUeglFrame*, CUstream*) nogil> __cuEGLStreamProducerReturnFrame)(conn, eglframe, pStream)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7610
 *     global __cuEGLStreamProducerReturnFrame
 *     cuPythonInit()
 *     if __cuEGLStreamProducerReturnFrame == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerReturnFrame" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7613
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerReturnFrame" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, CUeglFrame*, CUstream*) nogil> __cuEGLStreamProducerReturnFrame)(conn, eglframe, pStream)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_CUeglFrame *, CUstream *))__pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerReturnFrame)(__pyx_v_conn, __pyx_v_eglframe, __pyx_v_pStream);

    /* "cuda/_cuda/ccuda.pyx":7614
 *             raise RuntimeError('Function "cuEGLStreamProducerReturnFrame" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, CUeglFrame*, CUstream*) nogil> __cuEGLStreamProducerReturnFrame)(conn, eglframe, pStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7608
 * 
 * cdef CUresult _cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEGLStreamProducerReturnFrame             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamProducerReturnFrame == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7607
 *     return err
 * 
 * cdef CUresult _cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEGLStreamProducerReturnFrame
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuEGLStreamProducerReturnFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7616
 *     return err
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsResourceGetMappedEglFrame
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceGetMappedEglFrame(__pyx_t_4cuda_5ccuda_CUeglFrame *__pyx_v_eglFrame, CUgraphicsResource __pyx_v_resource, unsigned int __pyx_v_index, unsigned int __pyx_v_mipLevel) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphicsResourceGetMappedEglFrame", 1);
  __Pyx_TraceCall("_cuGraphicsResourceGetMappedEglFrame", __pyx_f[0], 7616, 1, __PYX_ERR(0, 7616, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7617
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsResourceGetMappedEglFrame             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedEglFrame == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7618
 * cdef CUresult _cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsResourceGetMappedEglFrame
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphicsResourceGetMappedEglFrame == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7618, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7619
 *     global __cuGraphicsResourceGetMappedEglFrame
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedEglFrame == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedEglFrame" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceGetMappedEglFrame == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7620
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedEglFrame == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedEglFrame" not found')
 *     err = (<CUresult (*)(CUeglFrame*, CUgraphicsResource, unsigned int, unsigned int) nogil> __cuGraphicsResourceGetMappedEglFrame)(eglFrame, resource, index, mipLevel)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7621
 *     if __cuGraphicsResourceGetMappedEglFrame == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedEglFrame" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUeglFrame*, CUgraphicsResource, unsigned int, unsigned int) nogil> __cuGraphicsResourceGetMappedEglFrame)(eglFrame, resource, index, mipLevel)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__410, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7621, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7621, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7620
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedEglFrame == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedEglFrame" not found')
 *     err = (<CUresult (*)(CUeglFrame*, CUgraphicsResource, unsigned int, unsigned int) nogil> __cuGraphicsResourceGetMappedEglFrame)(eglFrame, resource, index, mipLevel)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7619
 *     global __cuGraphicsResourceGetMappedEglFrame
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedEglFrame == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedEglFrame" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7622
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedEglFrame" not found')
 *     err = (<CUresult (*)(CUeglFrame*, CUgraphicsResource, unsigned int, unsigned int) nogil> __cuGraphicsResourceGetMappedEglFrame)(eglFrame, resource, index, mipLevel)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(__pyx_t_4cuda_5ccuda_CUeglFrame *, CUgraphicsResource, unsigned int, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceGetMappedEglFrame)(__pyx_v_eglFrame, __pyx_v_resource, __pyx_v_index, __pyx_v_mipLevel);

    /* "cuda/_cuda/ccuda.pyx":7623
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedEglFrame" not found')
 *     err = (<CUresult (*)(CUeglFrame*, CUgraphicsResource, unsigned int, unsigned int) nogil> __cuGraphicsResourceGetMappedEglFrame)(eglFrame, resource, index, mipLevel)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7617
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsResourceGetMappedEglFrame             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedEglFrame == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7616
 *     return err
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsResourceGetMappedEglFrame
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphicsResourceGetMappedEglFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7625
 *     return err
 * 
 * cdef CUresult _cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEventCreateFromEGLSync
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuEventCreateFromEGLSync(CUevent *__pyx_v_phEvent, __pyx_t_4cuda_5ccuda_EGLSyncKHR __pyx_v_eglSync, unsigned int __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuEventCreateFromEGLSync", 1);
  __Pyx_TraceCall("_cuEventCreateFromEGLSync", __pyx_f[0], 7625, 1, __PYX_ERR(0, 7625, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7626
 * 
 * cdef CUresult _cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEventCreateFromEGLSync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventCreateFromEGLSync == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7627
 * cdef CUresult _cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEventCreateFromEGLSync
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuEventCreateFromEGLSync == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7627, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7628
 *     global __cuEventCreateFromEGLSync
 *     cuPythonInit()
 *     if __cuEventCreateFromEGLSync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventCreateFromEGLSync" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuEventCreateFromEGLSync == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7629
 *     cuPythonInit()
 *     if __cuEventCreateFromEGLSync == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEventCreateFromEGLSync" not found')
 *     err = (<CUresult (*)(CUevent*, EGLSyncKHR, unsigned int) nogil> __cuEventCreateFromEGLSync)(phEvent, eglSync, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7630
 *     if __cuEventCreateFromEGLSync == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventCreateFromEGLSync" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent*, EGLSyncKHR, unsigned int) nogil> __cuEventCreateFromEGLSync)(phEvent, eglSync, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__411, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7630, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7630, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7629
 *     cuPythonInit()
 *     if __cuEventCreateFromEGLSync == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuEventCreateFromEGLSync" not found')
 *     err = (<CUresult (*)(CUevent*, EGLSyncKHR, unsigned int) nogil> __cuEventCreateFromEGLSync)(phEvent, eglSync, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7628
 *     global __cuEventCreateFromEGLSync
 *     cuPythonInit()
 *     if __cuEventCreateFromEGLSync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventCreateFromEGLSync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7631
 *         with gil:
 *             raise RuntimeError('Function "cuEventCreateFromEGLSync" not found')
 *     err = (<CUresult (*)(CUevent*, EGLSyncKHR, unsigned int) nogil> __cuEventCreateFromEGLSync)(phEvent, eglSync, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUevent *, __pyx_t_4cuda_5ccuda_EGLSyncKHR, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuEventCreateFromEGLSync)(__pyx_v_phEvent, __pyx_v_eglSync, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":7632
 *             raise RuntimeError('Function "cuEventCreateFromEGLSync" not found')
 *     err = (<CUresult (*)(CUevent*, EGLSyncKHR, unsigned int) nogil> __cuEventCreateFromEGLSync)(phEvent, eglSync, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7626
 * 
 * cdef CUresult _cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuEventCreateFromEGLSync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventCreateFromEGLSync == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7625
 *     return err
 * 
 * cdef CUresult _cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuEventCreateFromEGLSync
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuEventCreateFromEGLSync", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7634
 *     return err
 * 
 * cdef CUresult _cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsGLRegisterBuffer
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsGLRegisterBuffer(CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_5ccuda_GLuint __pyx_v_buffer, unsigned int __pyx_v_Flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphicsGLRegisterBuffer", 1);
  __Pyx_TraceCall("_cuGraphicsGLRegisterBuffer", __pyx_f[0], 7634, 1, __PYX_ERR(0, 7634, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7635
 * 
 * cdef CUresult _cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsGLRegisterBuffer             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsGLRegisterBuffer == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7636
 * cdef CUresult _cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsGLRegisterBuffer
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphicsGLRegisterBuffer == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7636, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7637
 *     global __cuGraphicsGLRegisterBuffer
 *     cuPythonInit()
 *     if __cuGraphicsGLRegisterBuffer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsGLRegisterBuffer" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsGLRegisterBuffer == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7638
 *     cuPythonInit()
 *     if __cuGraphicsGLRegisterBuffer == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphicsGLRegisterBuffer" not found')
 *     err = (<CUresult (*)(CUgraphicsResource*, GLuint, unsigned int) nogil> __cuGraphicsGLRegisterBuffer)(pCudaResource, buffer, Flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7639
 *     if __cuGraphicsGLRegisterBuffer == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsGLRegisterBuffer" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphicsResource*, GLuint, unsigned int) nogil> __cuGraphicsGLRegisterBuffer)(pCudaResource, buffer, Flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__412, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7639, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7639, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7638
 *     cuPythonInit()
 *     if __cuGraphicsGLRegisterBuffer == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphicsGLRegisterBuffer" not found')
 *     err = (<CUresult (*)(CUgraphicsResource*, GLuint, unsigned int) nogil> __cuGraphicsGLRegisterBuffer)(pCudaResource, buffer, Flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7637
 *     global __cuGraphicsGLRegisterBuffer
 *     cuPythonInit()
 *     if __cuGraphicsGLRegisterBuffer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsGLRegisterBuffer" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7640
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsGLRegisterBuffer" not found')
 *     err = (<CUresult (*)(CUgraphicsResource*, GLuint, unsigned int) nogil> __cuGraphicsGLRegisterBuffer)(pCudaResource, buffer, Flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphicsResource *, __pyx_t_4cuda_5ccuda_GLuint, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsGLRegisterBuffer)(__pyx_v_pCudaResource, __pyx_v_buffer, __pyx_v_Flags);

    /* "cuda/_cuda/ccuda.pyx":7641
 *             raise RuntimeError('Function "cuGraphicsGLRegisterBuffer" not found')
 *     err = (<CUresult (*)(CUgraphicsResource*, GLuint, unsigned int) nogil> __cuGraphicsGLRegisterBuffer)(pCudaResource, buffer, Flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7635
 * 
 * cdef CUresult _cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsGLRegisterBuffer             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsGLRegisterBuffer == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7634
 *     return err
 * 
 * cdef CUresult _cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsGLRegisterBuffer
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphicsGLRegisterBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7643
 *     return err
 * 
 * cdef CUresult _cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsGLRegisterImage
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsGLRegisterImage(CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_5ccuda_GLuint __pyx_v_image, __pyx_t_4cuda_5ccuda_GLenum __pyx_v_target, unsigned int __pyx_v_Flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphicsGLRegisterImage", 1);
  __Pyx_TraceCall("_cuGraphicsGLRegisterImage", __pyx_f[0], 7643, 1, __PYX_ERR(0, 7643, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7644
 * 
 * cdef CUresult _cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsGLRegisterImage             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsGLRegisterImage == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7645
 * cdef CUresult _cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsGLRegisterImage
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphicsGLRegisterImage == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7645, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7646
 *     global __cuGraphicsGLRegisterImage
 *     cuPythonInit()
 *     if __cuGraphicsGLRegisterImage == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsGLRegisterImage" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsGLRegisterImage == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7647
 *     cuPythonInit()
 *     if __cuGraphicsGLRegisterImage == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphicsGLRegisterImage" not found')
 *     err = (<CUresult (*)(CUgraphicsResource*, GLuint, GLenum, unsigned int) nogil> __cuGraphicsGLRegisterImage)(pCudaResource, image, target, Flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7648
 *     if __cuGraphicsGLRegisterImage == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsGLRegisterImage" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphicsResource*, GLuint, GLenum, unsigned int) nogil> __cuGraphicsGLRegisterImage)(pCudaResource, image, target, Flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__413, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7648, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7648, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7647
 *     cuPythonInit()
 *     if __cuGraphicsGLRegisterImage == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphicsGLRegisterImage" not found')
 *     err = (<CUresult (*)(CUgraphicsResource*, GLuint, GLenum, unsigned int) nogil> __cuGraphicsGLRegisterImage)(pCudaResource, image, target, Flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7646
 *     global __cuGraphicsGLRegisterImage
 *     cuPythonInit()
 *     if __cuGraphicsGLRegisterImage == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsGLRegisterImage" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7649
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsGLRegisterImage" not found')
 *     err = (<CUresult (*)(CUgraphicsResource*, GLuint, GLenum, unsigned int) nogil> __cuGraphicsGLRegisterImage)(pCudaResource, image, target, Flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphicsResource *, __pyx_t_4cuda_5ccuda_GLuint, __pyx_t_4cuda_5ccuda_GLenum, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsGLRegisterImage)(__pyx_v_pCudaResource, __pyx_v_image, __pyx_v_target, __pyx_v_Flags);

    /* "cuda/_cuda/ccuda.pyx":7650
 *             raise RuntimeError('Function "cuGraphicsGLRegisterImage" not found')
 *     err = (<CUresult (*)(CUgraphicsResource*, GLuint, GLenum, unsigned int) nogil> __cuGraphicsGLRegisterImage)(pCudaResource, image, target, Flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGLGetDevices_v2(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7644
 * 
 * cdef CUresult _cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsGLRegisterImage             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsGLRegisterImage == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7643
 *     return err
 * 
 * cdef CUresult _cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsGLRegisterImage
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphicsGLRegisterImage", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7652
 *     return err
 * 
 * cdef CUresult _cuGLGetDevices_v2(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGLGetDevices_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGLGetDevices_v2(unsigned int *__pyx_v_pCudaDeviceCount, CUdevice *__pyx_v_pCudaDevices, unsigned int __pyx_v_cudaDeviceCount, __pyx_t_4cuda_5ccuda_CUGLDeviceList __pyx_v_deviceList) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGLGetDevices_v2", 1);
  __Pyx_TraceCall("_cuGLGetDevices_v2", __pyx_f[0], 7652, 1, __PYX_ERR(0, 7652, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7653
 * 
 * cdef CUresult _cuGLGetDevices_v2(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGLGetDevices_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGLGetDevices_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7654
 * cdef CUresult _cuGLGetDevices_v2(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGLGetDevices_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGLGetDevices_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7654, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7655
 *     global __cuGLGetDevices_v2
 *     cuPythonInit()
 *     if __cuGLGetDevices_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGLGetDevices_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGLGetDevices_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7656
 *     cuPythonInit()
 *     if __cuGLGetDevices_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGLGetDevices_v2" not found')
 *     err = (<CUresult (*)(unsigned int*, CUdevice*, unsigned int, CUGLDeviceList) nogil> __cuGLGetDevices_v2)(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7657
 *     if __cuGLGetDevices_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGLGetDevices_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int*, CUdevice*, unsigned int, CUGLDeviceList) nogil> __cuGLGetDevices_v2)(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__414, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7657, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7657, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7656
 *     cuPythonInit()
 *     if __cuGLGetDevices_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGLGetDevices_v2" not found')
 *     err = (<CUresult (*)(unsigned int*, CUdevice*, unsigned int, CUGLDeviceList) nogil> __cuGLGetDevices_v2)(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7655
 *     global __cuGLGetDevices_v2
 *     cuPythonInit()
 *     if __cuGLGetDevices_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGLGetDevices_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7658
 *         with gil:
 *             raise RuntimeError('Function "cuGLGetDevices_v2" not found')
 *     err = (<CUresult (*)(unsigned int*, CUdevice*, unsigned int, CUGLDeviceList) nogil> __cuGLGetDevices_v2)(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(unsigned int *, CUdevice *, unsigned int, __pyx_t_4cuda_5ccuda_CUGLDeviceList))__pyx_v_4cuda_5_cuda_5ccuda___cuGLGetDevices_v2)(__pyx_v_pCudaDeviceCount, __pyx_v_pCudaDevices, __pyx_v_cudaDeviceCount, __pyx_v_deviceList);

    /* "cuda/_cuda/ccuda.pyx":7659
 *             raise RuntimeError('Function "cuGLGetDevices_v2" not found')
 *     err = (<CUresult (*)(unsigned int*, CUdevice*, unsigned int, CUGLDeviceList) nogil> __cuGLGetDevices_v2)(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7653
 * 
 * cdef CUresult _cuGLGetDevices_v2(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGLGetDevices_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGLGetDevices_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7652
 *     return err
 * 
 * cdef CUresult _cuGLGetDevices_v2(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGLGetDevices_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGLGetDevices_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7661
 *     return err
 * 
 * cdef CUresult _cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuVDPAUGetDevice
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuVDPAUGetDevice(CUdevice *__pyx_v_pDevice, __pyx_t_4cuda_5ccuda_VdpDevice __pyx_v_vdpDevice, __pyx_t_4cuda_5ccuda_VdpGetProcAddress *__pyx_v_vdpGetProcAddress) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuVDPAUGetDevice", 1);
  __Pyx_TraceCall("_cuVDPAUGetDevice", __pyx_f[0], 7661, 1, __PYX_ERR(0, 7661, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7662
 * 
 * cdef CUresult _cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuVDPAUGetDevice             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuVDPAUGetDevice == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7663
 * cdef CUresult _cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuVDPAUGetDevice
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuVDPAUGetDevice == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7663, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7664
 *     global __cuVDPAUGetDevice
 *     cuPythonInit()
 *     if __cuVDPAUGetDevice == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuVDPAUGetDevice" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuVDPAUGetDevice == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7665
 *     cuPythonInit()
 *     if __cuVDPAUGetDevice == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuVDPAUGetDevice" not found')
 *     err = (<CUresult (*)(CUdevice*, VdpDevice, VdpGetProcAddress*) nogil> __cuVDPAUGetDevice)(pDevice, vdpDevice, vdpGetProcAddress)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7666
 *     if __cuVDPAUGetDevice == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuVDPAUGetDevice" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice*, VdpDevice, VdpGetProcAddress*) nogil> __cuVDPAUGetDevice)(pDevice, vdpDevice, vdpGetProcAddress)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__415, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7666, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7666, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7665
 *     cuPythonInit()
 *     if __cuVDPAUGetDevice == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuVDPAUGetDevice" not found')
 *     err = (<CUresult (*)(CUdevice*, VdpDevice, VdpGetProcAddress*) nogil> __cuVDPAUGetDevice)(pDevice, vdpDevice, vdpGetProcAddress)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7664
 *     global __cuVDPAUGetDevice
 *     cuPythonInit()
 *     if __cuVDPAUGetDevice == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuVDPAUGetDevice" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7667
 *         with gil:
 *             raise RuntimeError('Function "cuVDPAUGetDevice" not found')
 *     err = (<CUresult (*)(CUdevice*, VdpDevice, VdpGetProcAddress*) nogil> __cuVDPAUGetDevice)(pDevice, vdpDevice, vdpGetProcAddress)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUdevice *, __pyx_t_4cuda_5ccuda_VdpDevice, __pyx_t_4cuda_5ccuda_VdpGetProcAddress *))__pyx_v_4cuda_5_cuda_5ccuda___cuVDPAUGetDevice)(__pyx_v_pDevice, __pyx_v_vdpDevice, __pyx_v_vdpGetProcAddress);

    /* "cuda/_cuda/ccuda.pyx":7668
 *             raise RuntimeError('Function "cuVDPAUGetDevice" not found')
 *     err = (<CUresult (*)(CUdevice*, VdpDevice, VdpGetProcAddress*) nogil> __cuVDPAUGetDevice)(pDevice, vdpDevice, vdpGetProcAddress)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuVDPAUCtxCreate_v2(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7662
 * 
 * cdef CUresult _cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuVDPAUGetDevice             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuVDPAUGetDevice == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7661
 *     return err
 * 
 * cdef CUresult _cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuVDPAUGetDevice
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuVDPAUGetDevice", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7670
 *     return err
 * 
 * cdef CUresult _cuVDPAUCtxCreate_v2(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuVDPAUCtxCreate_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuVDPAUCtxCreate_v2(CUcontext *__pyx_v_pCtx, unsigned int __pyx_v_flags, CUdevice __pyx_v_device, __pyx_t_4cuda_5ccuda_VdpDevice __pyx_v_vdpDevice, __pyx_t_4cuda_5ccuda_VdpGetProcAddress *__pyx_v_vdpGetProcAddress) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuVDPAUCtxCreate_v2", 1);
  __Pyx_TraceCall("_cuVDPAUCtxCreate_v2", __pyx_f[0], 7670, 1, __PYX_ERR(0, 7670, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7671
 * 
 * cdef CUresult _cuVDPAUCtxCreate_v2(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuVDPAUCtxCreate_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuVDPAUCtxCreate_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7672
 * cdef CUresult _cuVDPAUCtxCreate_v2(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuVDPAUCtxCreate_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuVDPAUCtxCreate_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7672, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7673
 *     global __cuVDPAUCtxCreate_v2
 *     cuPythonInit()
 *     if __cuVDPAUCtxCreate_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuVDPAUCtxCreate_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuVDPAUCtxCreate_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7674
 *     cuPythonInit()
 *     if __cuVDPAUCtxCreate_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuVDPAUCtxCreate_v2" not found')
 *     err = (<CUresult (*)(CUcontext*, unsigned int, CUdevice, VdpDevice, VdpGetProcAddress*) nogil> __cuVDPAUCtxCreate_v2)(pCtx, flags, device, vdpDevice, vdpGetProcAddress)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7675
 *     if __cuVDPAUCtxCreate_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuVDPAUCtxCreate_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*, unsigned int, CUdevice, VdpDevice, VdpGetProcAddress*) nogil> __cuVDPAUCtxCreate_v2)(pCtx, flags, device, vdpDevice, vdpGetProcAddress)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__416, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7675, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7675, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7674
 *     cuPythonInit()
 *     if __cuVDPAUCtxCreate_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuVDPAUCtxCreate_v2" not found')
 *     err = (<CUresult (*)(CUcontext*, unsigned int, CUdevice, VdpDevice, VdpGetProcAddress*) nogil> __cuVDPAUCtxCreate_v2)(pCtx, flags, device, vdpDevice, vdpGetProcAddress)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7673
 *     global __cuVDPAUCtxCreate_v2
 *     cuPythonInit()
 *     if __cuVDPAUCtxCreate_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuVDPAUCtxCreate_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7676
 *         with gil:
 *             raise RuntimeError('Function "cuVDPAUCtxCreate_v2" not found')
 *     err = (<CUresult (*)(CUcontext*, unsigned int, CUdevice, VdpDevice, VdpGetProcAddress*) nogil> __cuVDPAUCtxCreate_v2)(pCtx, flags, device, vdpDevice, vdpGetProcAddress)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUcontext *, unsigned int, CUdevice, __pyx_t_4cuda_5ccuda_VdpDevice, __pyx_t_4cuda_5ccuda_VdpGetProcAddress *))__pyx_v_4cuda_5_cuda_5ccuda___cuVDPAUCtxCreate_v2)(__pyx_v_pCtx, __pyx_v_flags, __pyx_v_device, __pyx_v_vdpDevice, __pyx_v_vdpGetProcAddress);

    /* "cuda/_cuda/ccuda.pyx":7677
 *             raise RuntimeError('Function "cuVDPAUCtxCreate_v2" not found')
 *     err = (<CUresult (*)(CUcontext*, unsigned int, CUdevice, VdpDevice, VdpGetProcAddress*) nogil> __cuVDPAUCtxCreate_v2)(pCtx, flags, device, vdpDevice, vdpGetProcAddress)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7671
 * 
 * cdef CUresult _cuVDPAUCtxCreate_v2(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuVDPAUCtxCreate_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuVDPAUCtxCreate_v2 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7670
 *     return err
 * 
 * cdef CUresult _cuVDPAUCtxCreate_v2(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuVDPAUCtxCreate_v2
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuVDPAUCtxCreate_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7679
 *     return err
 * 
 * cdef CUresult _cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsVDPAURegisterVideoSurface
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_5ccuda_VdpVideoSurface __pyx_v_vdpSurface, unsigned int __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphicsVDPAURegisterVideoSurface", 1);
  __Pyx_TraceCall("_cuGraphicsVDPAURegisterVideoSurface", __pyx_f[0], 7679, 1, __PYX_ERR(0, 7679, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7680
 * 
 * cdef CUresult _cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsVDPAURegisterVideoSurface             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsVDPAURegisterVideoSurface == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7681
 * cdef CUresult _cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsVDPAURegisterVideoSurface
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphicsVDPAURegisterVideoSurface == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7681, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7682
 *     global __cuGraphicsVDPAURegisterVideoSurface
 *     cuPythonInit()
 *     if __cuGraphicsVDPAURegisterVideoSurface == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsVDPAURegisterVideoSurface" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsVDPAURegisterVideoSurface == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7683
 *     cuPythonInit()
 *     if __cuGraphicsVDPAURegisterVideoSurface == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphicsVDPAURegisterVideoSurface" not found')
 *     err = (<CUresult (*)(CUgraphicsResource*, VdpVideoSurface, unsigned int) nogil> __cuGraphicsVDPAURegisterVideoSurface)(pCudaResource, vdpSurface, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7684
 *     if __cuGraphicsVDPAURegisterVideoSurface == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsVDPAURegisterVideoSurface" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphicsResource*, VdpVideoSurface, unsigned int) nogil> __cuGraphicsVDPAURegisterVideoSurface)(pCudaResource, vdpSurface, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__417, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7684, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7684, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7683
 *     cuPythonInit()
 *     if __cuGraphicsVDPAURegisterVideoSurface == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphicsVDPAURegisterVideoSurface" not found')
 *     err = (<CUresult (*)(CUgraphicsResource*, VdpVideoSurface, unsigned int) nogil> __cuGraphicsVDPAURegisterVideoSurface)(pCudaResource, vdpSurface, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7682
 *     global __cuGraphicsVDPAURegisterVideoSurface
 *     cuPythonInit()
 *     if __cuGraphicsVDPAURegisterVideoSurface == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsVDPAURegisterVideoSurface" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7685
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsVDPAURegisterVideoSurface" not found')
 *     err = (<CUresult (*)(CUgraphicsResource*, VdpVideoSurface, unsigned int) nogil> __cuGraphicsVDPAURegisterVideoSurface)(pCudaResource, vdpSurface, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphicsResource *, __pyx_t_4cuda_5ccuda_VdpVideoSurface, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsVDPAURegisterVideoSurface)(__pyx_v_pCudaResource, __pyx_v_vdpSurface, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":7686
 *             raise RuntimeError('Function "cuGraphicsVDPAURegisterVideoSurface" not found')
 *     err = (<CUresult (*)(CUgraphicsResource*, VdpVideoSurface, unsigned int) nogil> __cuGraphicsVDPAURegisterVideoSurface)(pCudaResource, vdpSurface, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7680
 * 
 * cdef CUresult _cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsVDPAURegisterVideoSurface             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsVDPAURegisterVideoSurface == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7679
 *     return err
 * 
 * cdef CUresult _cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsVDPAURegisterVideoSurface
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphicsVDPAURegisterVideoSurface", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7688
 *     return err
 * 
 * cdef CUresult _cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsVDPAURegisterOutputSurface
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_5ccuda_VdpOutputSurface __pyx_v_vdpSurface, unsigned int __pyx_v_flags) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphicsVDPAURegisterOutputSurface", 1);
  __Pyx_TraceCall("_cuGraphicsVDPAURegisterOutputSurface", __pyx_f[0], 7688, 1, __PYX_ERR(0, 7688, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7689
 * 
 * cdef CUresult _cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsVDPAURegisterOutputSurface             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsVDPAURegisterOutputSurface == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7690
 * cdef CUresult _cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsVDPAURegisterOutputSurface
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphicsVDPAURegisterOutputSurface == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7690, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7691
 *     global __cuGraphicsVDPAURegisterOutputSurface
 *     cuPythonInit()
 *     if __cuGraphicsVDPAURegisterOutputSurface == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsVDPAURegisterOutputSurface" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsVDPAURegisterOutputSurface == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7692
 *     cuPythonInit()
 *     if __cuGraphicsVDPAURegisterOutputSurface == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphicsVDPAURegisterOutputSurface" not found')
 *     err = (<CUresult (*)(CUgraphicsResource*, VdpOutputSurface, unsigned int) nogil> __cuGraphicsVDPAURegisterOutputSurface)(pCudaResource, vdpSurface, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7693
 *     if __cuGraphicsVDPAURegisterOutputSurface == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsVDPAURegisterOutputSurface" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphicsResource*, VdpOutputSurface, unsigned int) nogil> __cuGraphicsVDPAURegisterOutputSurface)(pCudaResource, vdpSurface, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__418, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7693, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7693, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7692
 *     cuPythonInit()
 *     if __cuGraphicsVDPAURegisterOutputSurface == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphicsVDPAURegisterOutputSurface" not found')
 *     err = (<CUresult (*)(CUgraphicsResource*, VdpOutputSurface, unsigned int) nogil> __cuGraphicsVDPAURegisterOutputSurface)(pCudaResource, vdpSurface, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7691
 *     global __cuGraphicsVDPAURegisterOutputSurface
 *     cuPythonInit()
 *     if __cuGraphicsVDPAURegisterOutputSurface == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsVDPAURegisterOutputSurface" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7694
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsVDPAURegisterOutputSurface" not found')
 *     err = (<CUresult (*)(CUgraphicsResource*, VdpOutputSurface, unsigned int) nogil> __cuGraphicsVDPAURegisterOutputSurface)(pCudaResource, vdpSurface, flags)             # <<<<<<<<<<<<<<
 *     return err
 */
    __pyx_v_err = ((CUresult (*)(CUgraphicsResource *, __pyx_t_4cuda_5ccuda_VdpOutputSurface, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsVDPAURegisterOutputSurface)(__pyx_v_pCudaResource, __pyx_v_vdpSurface, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":7695
 *             raise RuntimeError('Function "cuGraphicsVDPAURegisterOutputSurface" not found')
 *     err = (<CUresult (*)(CUgraphicsResource*, VdpOutputSurface, unsigned int) nogil> __cuGraphicsVDPAURegisterOutputSurface)(pCudaResource, vdpSurface, flags)
 *     return err             # <<<<<<<<<<<<<<
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7689
 * 
 * cdef CUresult _cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
 *     global __cuGraphicsVDPAURegisterOutputSurface             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsVDPAURegisterOutputSurface == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7688
 *     return err
 * 
 * cdef CUresult _cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:             # <<<<<<<<<<<<<<
 *     global __cuGraphicsVDPAURegisterOutputSurface
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuGraphicsVDPAURegisterOutputSurface", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_ccuda(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_ccuda},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "ccuda",
    0, /* m_doc */
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    0, /* m_size */
  #else
    -1, /* m_size */
  #endif
    __pyx_methods /* m_methods */,
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    __pyx_moduledef_slots, /* m_slots */
  #else
    NULL, /* m_reload */
  #endif
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_n_u_CUDA_PYTHON_CUDA_PER_THREAD_DEFA, __pyx_k_CUDA_PYTHON_CUDA_PER_THREAD_DEFA, sizeof(__pyx_k_CUDA_PYTHON_CUDA_PER_THREAD_DEFA), 0, 1, 0, 1},
  {&__pyx_kp_u_Failed_to_LoadLibraryEx, __pyx_k_Failed_to_LoadLibraryEx, sizeof(__pyx_k_Failed_to_LoadLibraryEx), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuArray3DCreate_v2_not, __pyx_k_Function_cuArray3DCreate_v2_not, sizeof(__pyx_k_Function_cuArray3DCreate_v2_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuArray3DGetDescriptor, __pyx_k_Function_cuArray3DGetDescriptor, sizeof(__pyx_k_Function_cuArray3DGetDescriptor), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuArrayCreate_v2_not_fo, __pyx_k_Function_cuArrayCreate_v2_not_fo, sizeof(__pyx_k_Function_cuArrayCreate_v2_not_fo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuArrayDestroy_not_foun, __pyx_k_Function_cuArrayDestroy_not_foun, sizeof(__pyx_k_Function_cuArrayDestroy_not_foun), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuArrayGetDescriptor_v2, __pyx_k_Function_cuArrayGetDescriptor_v2, sizeof(__pyx_k_Function_cuArrayGetDescriptor_v2), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuArrayGetMemoryRequire, __pyx_k_Function_cuArrayGetMemoryRequire, sizeof(__pyx_k_Function_cuArrayGetMemoryRequire), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuArrayGetPlane_not_fou, __pyx_k_Function_cuArrayGetPlane_not_fou, sizeof(__pyx_k_Function_cuArrayGetPlane_not_fou), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuArrayGetSparsePropert, __pyx_k_Function_cuArrayGetSparsePropert, sizeof(__pyx_k_Function_cuArrayGetSparsePropert), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCoredumpGetAttribute, __pyx_k_Function_cuCoredumpGetAttribute, sizeof(__pyx_k_Function_cuCoredumpGetAttribute), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCoredumpGetAttributeG, __pyx_k_Function_cuCoredumpGetAttributeG, sizeof(__pyx_k_Function_cuCoredumpGetAttributeG), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCoredumpSetAttribute, __pyx_k_Function_cuCoredumpSetAttribute, sizeof(__pyx_k_Function_cuCoredumpSetAttribute), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCoredumpSetAttributeG, __pyx_k_Function_cuCoredumpSetAttributeG, sizeof(__pyx_k_Function_cuCoredumpSetAttributeG), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCtxAttach_not_found, __pyx_k_Function_cuCtxAttach_not_found, sizeof(__pyx_k_Function_cuCtxAttach_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCtxCreate_v2_not_foun, __pyx_k_Function_cuCtxCreate_v2_not_foun, sizeof(__pyx_k_Function_cuCtxCreate_v2_not_foun), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCtxCreate_v3_not_foun, __pyx_k_Function_cuCtxCreate_v3_not_foun, sizeof(__pyx_k_Function_cuCtxCreate_v3_not_foun), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCtxDestroy_v2_not_fou, __pyx_k_Function_cuCtxDestroy_v2_not_fou, sizeof(__pyx_k_Function_cuCtxDestroy_v2_not_fou), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCtxDetach_not_found, __pyx_k_Function_cuCtxDetach_not_found, sizeof(__pyx_k_Function_cuCtxDetach_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCtxDisablePeerAccess, __pyx_k_Function_cuCtxDisablePeerAccess, sizeof(__pyx_k_Function_cuCtxDisablePeerAccess), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCtxEnablePeerAccess_n, __pyx_k_Function_cuCtxEnablePeerAccess_n, sizeof(__pyx_k_Function_cuCtxEnablePeerAccess_n), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCtxGetApiVersion_not, __pyx_k_Function_cuCtxGetApiVersion_not, sizeof(__pyx_k_Function_cuCtxGetApiVersion_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCtxGetCacheConfig_not, __pyx_k_Function_cuCtxGetCacheConfig_not, sizeof(__pyx_k_Function_cuCtxGetCacheConfig_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCtxGetCurrent_not_fou, __pyx_k_Function_cuCtxGetCurrent_not_fou, sizeof(__pyx_k_Function_cuCtxGetCurrent_not_fou), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCtxGetDevice_not_foun, __pyx_k_Function_cuCtxGetDevice_not_foun, sizeof(__pyx_k_Function_cuCtxGetDevice_not_foun), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCtxGetExecAffinity_no, __pyx_k_Function_cuCtxGetExecAffinity_no, sizeof(__pyx_k_Function_cuCtxGetExecAffinity_no), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCtxGetFlags_not_found, __pyx_k_Function_cuCtxGetFlags_not_found, sizeof(__pyx_k_Function_cuCtxGetFlags_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCtxGetId_not_found, __pyx_k_Function_cuCtxGetId_not_found, sizeof(__pyx_k_Function_cuCtxGetId_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCtxGetLimit_not_found, __pyx_k_Function_cuCtxGetLimit_not_found, sizeof(__pyx_k_Function_cuCtxGetLimit_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCtxGetSharedMemConfig, __pyx_k_Function_cuCtxGetSharedMemConfig, sizeof(__pyx_k_Function_cuCtxGetSharedMemConfig), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCtxGetStreamPriorityR, __pyx_k_Function_cuCtxGetStreamPriorityR, sizeof(__pyx_k_Function_cuCtxGetStreamPriorityR), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCtxPopCurrent_v2_not, __pyx_k_Function_cuCtxPopCurrent_v2_not, sizeof(__pyx_k_Function_cuCtxPopCurrent_v2_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCtxPushCurrent_v2_not, __pyx_k_Function_cuCtxPushCurrent_v2_not, sizeof(__pyx_k_Function_cuCtxPushCurrent_v2_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCtxResetPersistingL2C, __pyx_k_Function_cuCtxResetPersistingL2C, sizeof(__pyx_k_Function_cuCtxResetPersistingL2C), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCtxSetCacheConfig_not, __pyx_k_Function_cuCtxSetCacheConfig_not, sizeof(__pyx_k_Function_cuCtxSetCacheConfig_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCtxSetCurrent_not_fou, __pyx_k_Function_cuCtxSetCurrent_not_fou, sizeof(__pyx_k_Function_cuCtxSetCurrent_not_fou), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCtxSetFlags_not_found, __pyx_k_Function_cuCtxSetFlags_not_found, sizeof(__pyx_k_Function_cuCtxSetFlags_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCtxSetLimit_not_found, __pyx_k_Function_cuCtxSetLimit_not_found, sizeof(__pyx_k_Function_cuCtxSetLimit_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCtxSetSharedMemConfig, __pyx_k_Function_cuCtxSetSharedMemConfig, sizeof(__pyx_k_Function_cuCtxSetSharedMemConfig), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuCtxSynchronize_not_fo, __pyx_k_Function_cuCtxSynchronize_not_fo, sizeof(__pyx_k_Function_cuCtxSynchronize_not_fo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDestroyExternalMemory, __pyx_k_Function_cuDestroyExternalMemory, sizeof(__pyx_k_Function_cuDestroyExternalMemory), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDestroyExternalSemaph, __pyx_k_Function_cuDestroyExternalSemaph, sizeof(__pyx_k_Function_cuDestroyExternalSemaph), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDeviceCanAccessPeer_n, __pyx_k_Function_cuDeviceCanAccessPeer_n, sizeof(__pyx_k_Function_cuDeviceCanAccessPeer_n), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDeviceComputeCapabili, __pyx_k_Function_cuDeviceComputeCapabili, sizeof(__pyx_k_Function_cuDeviceComputeCapabili), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDeviceGetAttribute_no, __pyx_k_Function_cuDeviceGetAttribute_no, sizeof(__pyx_k_Function_cuDeviceGetAttribute_no), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDeviceGetByPCIBusId_n, __pyx_k_Function_cuDeviceGetByPCIBusId_n, sizeof(__pyx_k_Function_cuDeviceGetByPCIBusId_n), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDeviceGetCount_not_fo, __pyx_k_Function_cuDeviceGetCount_not_fo, sizeof(__pyx_k_Function_cuDeviceGetCount_not_fo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDeviceGetDefaultMemPo, __pyx_k_Function_cuDeviceGetDefaultMemPo, sizeof(__pyx_k_Function_cuDeviceGetDefaultMemPo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDeviceGetExecAffinity, __pyx_k_Function_cuDeviceGetExecAffinity, sizeof(__pyx_k_Function_cuDeviceGetExecAffinity), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDeviceGetGraphMemAttr, __pyx_k_Function_cuDeviceGetGraphMemAttr, sizeof(__pyx_k_Function_cuDeviceGetGraphMemAttr), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDeviceGetLuid_not_fou, __pyx_k_Function_cuDeviceGetLuid_not_fou, sizeof(__pyx_k_Function_cuDeviceGetLuid_not_fou), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDeviceGetMemPool_not, __pyx_k_Function_cuDeviceGetMemPool_not, sizeof(__pyx_k_Function_cuDeviceGetMemPool_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDeviceGetName_not_fou, __pyx_k_Function_cuDeviceGetName_not_fou, sizeof(__pyx_k_Function_cuDeviceGetName_not_fou), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDeviceGetNvSciSyncAtt, __pyx_k_Function_cuDeviceGetNvSciSyncAtt, sizeof(__pyx_k_Function_cuDeviceGetNvSciSyncAtt), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDeviceGetP2PAttribute, __pyx_k_Function_cuDeviceGetP2PAttribute, sizeof(__pyx_k_Function_cuDeviceGetP2PAttribute), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDeviceGetPCIBusId_not, __pyx_k_Function_cuDeviceGetPCIBusId_not, sizeof(__pyx_k_Function_cuDeviceGetPCIBusId_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDeviceGetProperties_n, __pyx_k_Function_cuDeviceGetProperties_n, sizeof(__pyx_k_Function_cuDeviceGetProperties_n), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDeviceGetTexture1DLin, __pyx_k_Function_cuDeviceGetTexture1DLin, sizeof(__pyx_k_Function_cuDeviceGetTexture1DLin), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDeviceGetUuid_not_fou, __pyx_k_Function_cuDeviceGetUuid_not_fou, sizeof(__pyx_k_Function_cuDeviceGetUuid_not_fou), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDeviceGetUuid_v2_not, __pyx_k_Function_cuDeviceGetUuid_v2_not, sizeof(__pyx_k_Function_cuDeviceGetUuid_v2_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDeviceGet_not_found, __pyx_k_Function_cuDeviceGet_not_found, sizeof(__pyx_k_Function_cuDeviceGet_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDeviceGraphMemTrim_no, __pyx_k_Function_cuDeviceGraphMemTrim_no, sizeof(__pyx_k_Function_cuDeviceGraphMemTrim_no), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDevicePrimaryCtxGetSt, __pyx_k_Function_cuDevicePrimaryCtxGetSt, sizeof(__pyx_k_Function_cuDevicePrimaryCtxGetSt), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDevicePrimaryCtxRelea, __pyx_k_Function_cuDevicePrimaryCtxRelea, sizeof(__pyx_k_Function_cuDevicePrimaryCtxRelea), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDevicePrimaryCtxReset, __pyx_k_Function_cuDevicePrimaryCtxReset, sizeof(__pyx_k_Function_cuDevicePrimaryCtxReset), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDevicePrimaryCtxRetai, __pyx_k_Function_cuDevicePrimaryCtxRetai, sizeof(__pyx_k_Function_cuDevicePrimaryCtxRetai), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDevicePrimaryCtxSetFl, __pyx_k_Function_cuDevicePrimaryCtxSetFl, sizeof(__pyx_k_Function_cuDevicePrimaryCtxSetFl), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDeviceSetGraphMemAttr, __pyx_k_Function_cuDeviceSetGraphMemAttr, sizeof(__pyx_k_Function_cuDeviceSetGraphMemAttr), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDeviceSetMemPool_not, __pyx_k_Function_cuDeviceSetMemPool_not, sizeof(__pyx_k_Function_cuDeviceSetMemPool_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDeviceTotalMem_v2_not, __pyx_k_Function_cuDeviceTotalMem_v2_not, sizeof(__pyx_k_Function_cuDeviceTotalMem_v2_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuDriverGetVersion_not, __pyx_k_Function_cuDriverGetVersion_not, sizeof(__pyx_k_Function_cuDriverGetVersion_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuEGLStreamConsumerAcqu, __pyx_k_Function_cuEGLStreamConsumerAcqu, sizeof(__pyx_k_Function_cuEGLStreamConsumerAcqu), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuEGLStreamConsumerConn, __pyx_k_Function_cuEGLStreamConsumerConn, sizeof(__pyx_k_Function_cuEGLStreamConsumerConn), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuEGLStreamConsumerConn_2, __pyx_k_Function_cuEGLStreamConsumerConn_2, sizeof(__pyx_k_Function_cuEGLStreamConsumerConn_2), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuEGLStreamConsumerDisc, __pyx_k_Function_cuEGLStreamConsumerDisc, sizeof(__pyx_k_Function_cuEGLStreamConsumerDisc), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuEGLStreamConsumerRele, __pyx_k_Function_cuEGLStreamConsumerRele, sizeof(__pyx_k_Function_cuEGLStreamConsumerRele), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuEGLStreamProducerConn, __pyx_k_Function_cuEGLStreamProducerConn, sizeof(__pyx_k_Function_cuEGLStreamProducerConn), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuEGLStreamProducerDisc, __pyx_k_Function_cuEGLStreamProducerDisc, sizeof(__pyx_k_Function_cuEGLStreamProducerDisc), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuEGLStreamProducerPres, __pyx_k_Function_cuEGLStreamProducerPres, sizeof(__pyx_k_Function_cuEGLStreamProducerPres), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuEGLStreamProducerRetu, __pyx_k_Function_cuEGLStreamProducerRetu, sizeof(__pyx_k_Function_cuEGLStreamProducerRetu), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuEventCreateFromEGLSyn, __pyx_k_Function_cuEventCreateFromEGLSyn, sizeof(__pyx_k_Function_cuEventCreateFromEGLSyn), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuEventCreate_not_found, __pyx_k_Function_cuEventCreate_not_found, sizeof(__pyx_k_Function_cuEventCreate_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuEventDestroy_v2_not_f, __pyx_k_Function_cuEventDestroy_v2_not_f, sizeof(__pyx_k_Function_cuEventDestroy_v2_not_f), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuEventElapsedTime_not, __pyx_k_Function_cuEventElapsedTime_not, sizeof(__pyx_k_Function_cuEventElapsedTime_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuEventQuery_not_found, __pyx_k_Function_cuEventQuery_not_found, sizeof(__pyx_k_Function_cuEventQuery_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuEventRecordWithFlags, __pyx_k_Function_cuEventRecordWithFlags, sizeof(__pyx_k_Function_cuEventRecordWithFlags), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuEventRecord_not_found, __pyx_k_Function_cuEventRecord_not_found, sizeof(__pyx_k_Function_cuEventRecord_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuEventSynchronize_not, __pyx_k_Function_cuEventSynchronize_not, sizeof(__pyx_k_Function_cuEventSynchronize_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuExternalMemoryGetMapp, __pyx_k_Function_cuExternalMemoryGetMapp, sizeof(__pyx_k_Function_cuExternalMemoryGetMapp), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuExternalMemoryGetMapp_2, __pyx_k_Function_cuExternalMemoryGetMapp_2, sizeof(__pyx_k_Function_cuExternalMemoryGetMapp_2), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuFlushGPUDirectRDMAWri, __pyx_k_Function_cuFlushGPUDirectRDMAWri, sizeof(__pyx_k_Function_cuFlushGPUDirectRDMAWri), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuFuncGetAttribute_not, __pyx_k_Function_cuFuncGetAttribute_not, sizeof(__pyx_k_Function_cuFuncGetAttribute_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuFuncGetModule_not_fou, __pyx_k_Function_cuFuncGetModule_not_fou, sizeof(__pyx_k_Function_cuFuncGetModule_not_fou), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuFuncSetAttribute_not, __pyx_k_Function_cuFuncSetAttribute_not, sizeof(__pyx_k_Function_cuFuncSetAttribute_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuFuncSetBlockShape_not, __pyx_k_Function_cuFuncSetBlockShape_not, sizeof(__pyx_k_Function_cuFuncSetBlockShape_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuFuncSetCacheConfig_no, __pyx_k_Function_cuFuncSetCacheConfig_no, sizeof(__pyx_k_Function_cuFuncSetCacheConfig_no), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuFuncSetSharedMemConfi, __pyx_k_Function_cuFuncSetSharedMemConfi, sizeof(__pyx_k_Function_cuFuncSetSharedMemConfi), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuFuncSetSharedSize_not, __pyx_k_Function_cuFuncSetSharedSize_not, sizeof(__pyx_k_Function_cuFuncSetSharedSize_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGLGetDevices_v2_not_f, __pyx_k_Function_cuGLGetDevices_v2_not_f, sizeof(__pyx_k_Function_cuGLGetDevices_v2_not_f), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGetErrorName_not_foun, __pyx_k_Function_cuGetErrorName_not_foun, sizeof(__pyx_k_Function_cuGetErrorName_not_foun), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGetErrorString_not_fo, __pyx_k_Function_cuGetErrorString_not_fo, sizeof(__pyx_k_Function_cuGetErrorString_not_fo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGetExportTable_not_fo, __pyx_k_Function_cuGetExportTable_not_fo, sizeof(__pyx_k_Function_cuGetExportTable_not_fo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGetProcAddress_v2_not, __pyx_k_Function_cuGetProcAddress_v2_not, sizeof(__pyx_k_Function_cuGetProcAddress_v2_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphAddBatchMemOpNod, __pyx_k_Function_cuGraphAddBatchMemOpNod, sizeof(__pyx_k_Function_cuGraphAddBatchMemOpNod), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphAddChildGraphNod, __pyx_k_Function_cuGraphAddChildGraphNod, sizeof(__pyx_k_Function_cuGraphAddChildGraphNod), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphAddDependencies, __pyx_k_Function_cuGraphAddDependencies, sizeof(__pyx_k_Function_cuGraphAddDependencies), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphAddEmptyNode_not, __pyx_k_Function_cuGraphAddEmptyNode_not, sizeof(__pyx_k_Function_cuGraphAddEmptyNode_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphAddEventRecordNo, __pyx_k_Function_cuGraphAddEventRecordNo, sizeof(__pyx_k_Function_cuGraphAddEventRecordNo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphAddEventWaitNode, __pyx_k_Function_cuGraphAddEventWaitNode, sizeof(__pyx_k_Function_cuGraphAddEventWaitNode), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphAddExternalSemap, __pyx_k_Function_cuGraphAddExternalSemap, sizeof(__pyx_k_Function_cuGraphAddExternalSemap), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphAddExternalSemap_2, __pyx_k_Function_cuGraphAddExternalSemap_2, sizeof(__pyx_k_Function_cuGraphAddExternalSemap_2), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphAddHostNode_not, __pyx_k_Function_cuGraphAddHostNode_not, sizeof(__pyx_k_Function_cuGraphAddHostNode_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphAddKernelNode_v2, __pyx_k_Function_cuGraphAddKernelNode_v2, sizeof(__pyx_k_Function_cuGraphAddKernelNode_v2), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphAddMemAllocNode, __pyx_k_Function_cuGraphAddMemAllocNode, sizeof(__pyx_k_Function_cuGraphAddMemAllocNode), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphAddMemFreeNode_n, __pyx_k_Function_cuGraphAddMemFreeNode_n, sizeof(__pyx_k_Function_cuGraphAddMemFreeNode_n), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphAddMemcpyNode_no, __pyx_k_Function_cuGraphAddMemcpyNode_no, sizeof(__pyx_k_Function_cuGraphAddMemcpyNode_no), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphAddMemsetNode_no, __pyx_k_Function_cuGraphAddMemsetNode_no, sizeof(__pyx_k_Function_cuGraphAddMemsetNode_no), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphAddNode_not_foun, __pyx_k_Function_cuGraphAddNode_not_foun, sizeof(__pyx_k_Function_cuGraphAddNode_not_foun), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphBatchMemOpNodeGe, __pyx_k_Function_cuGraphBatchMemOpNodeGe, sizeof(__pyx_k_Function_cuGraphBatchMemOpNodeGe), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphBatchMemOpNodeSe, __pyx_k_Function_cuGraphBatchMemOpNodeSe, sizeof(__pyx_k_Function_cuGraphBatchMemOpNodeSe), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphChildGraphNodeGe, __pyx_k_Function_cuGraphChildGraphNodeGe, sizeof(__pyx_k_Function_cuGraphChildGraphNodeGe), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphClone_not_found, __pyx_k_Function_cuGraphClone_not_found, sizeof(__pyx_k_Function_cuGraphClone_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphCreate_not_found, __pyx_k_Function_cuGraphCreate_not_found, sizeof(__pyx_k_Function_cuGraphCreate_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphDebugDotPrint_no, __pyx_k_Function_cuGraphDebugDotPrint_no, sizeof(__pyx_k_Function_cuGraphDebugDotPrint_no), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphDestroyNode_not, __pyx_k_Function_cuGraphDestroyNode_not, sizeof(__pyx_k_Function_cuGraphDestroyNode_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphDestroy_not_foun, __pyx_k_Function_cuGraphDestroy_not_foun, sizeof(__pyx_k_Function_cuGraphDestroy_not_foun), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphEventRecordNodeG, __pyx_k_Function_cuGraphEventRecordNodeG, sizeof(__pyx_k_Function_cuGraphEventRecordNodeG), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphEventRecordNodeS, __pyx_k_Function_cuGraphEventRecordNodeS, sizeof(__pyx_k_Function_cuGraphEventRecordNodeS), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphEventWaitNodeGet, __pyx_k_Function_cuGraphEventWaitNodeGet, sizeof(__pyx_k_Function_cuGraphEventWaitNodeGet), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphEventWaitNodeSet, __pyx_k_Function_cuGraphEventWaitNodeSet, sizeof(__pyx_k_Function_cuGraphEventWaitNodeSet), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphExecBatchMemOpNo, __pyx_k_Function_cuGraphExecBatchMemOpNo, sizeof(__pyx_k_Function_cuGraphExecBatchMemOpNo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphExecChildGraphNo, __pyx_k_Function_cuGraphExecChildGraphNo, sizeof(__pyx_k_Function_cuGraphExecChildGraphNo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphExecDestroy_not, __pyx_k_Function_cuGraphExecDestroy_not, sizeof(__pyx_k_Function_cuGraphExecDestroy_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphExecEventRecordN, __pyx_k_Function_cuGraphExecEventRecordN, sizeof(__pyx_k_Function_cuGraphExecEventRecordN), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphExecEventWaitNod, __pyx_k_Function_cuGraphExecEventWaitNod, sizeof(__pyx_k_Function_cuGraphExecEventWaitNod), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphExecExternalSema, __pyx_k_Function_cuGraphExecExternalSema, sizeof(__pyx_k_Function_cuGraphExecExternalSema), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphExecExternalSema_2, __pyx_k_Function_cuGraphExecExternalSema_2, sizeof(__pyx_k_Function_cuGraphExecExternalSema_2), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphExecGetFlags_not, __pyx_k_Function_cuGraphExecGetFlags_not, sizeof(__pyx_k_Function_cuGraphExecGetFlags_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphExecHostNodeSetP, __pyx_k_Function_cuGraphExecHostNodeSetP, sizeof(__pyx_k_Function_cuGraphExecHostNodeSetP), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphExecKernelNodeSe, __pyx_k_Function_cuGraphExecKernelNodeSe, sizeof(__pyx_k_Function_cuGraphExecKernelNodeSe), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphExecMemcpyNodeSe, __pyx_k_Function_cuGraphExecMemcpyNodeSe, sizeof(__pyx_k_Function_cuGraphExecMemcpyNodeSe), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphExecMemsetNodeSe, __pyx_k_Function_cuGraphExecMemsetNodeSe, sizeof(__pyx_k_Function_cuGraphExecMemsetNodeSe), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphExecNodeSetParam, __pyx_k_Function_cuGraphExecNodeSetParam, sizeof(__pyx_k_Function_cuGraphExecNodeSetParam), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphExecUpdate_v2_no, __pyx_k_Function_cuGraphExecUpdate_v2_no, sizeof(__pyx_k_Function_cuGraphExecUpdate_v2_no), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphExternalSemaphor, __pyx_k_Function_cuGraphExternalSemaphor, sizeof(__pyx_k_Function_cuGraphExternalSemaphor), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphExternalSemaphor_2, __pyx_k_Function_cuGraphExternalSemaphor_2, sizeof(__pyx_k_Function_cuGraphExternalSemaphor_2), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphExternalSemaphor_3, __pyx_k_Function_cuGraphExternalSemaphor_3, sizeof(__pyx_k_Function_cuGraphExternalSemaphor_3), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphExternalSemaphor_4, __pyx_k_Function_cuGraphExternalSemaphor_4, sizeof(__pyx_k_Function_cuGraphExternalSemaphor_4), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphGetEdges_not_fou, __pyx_k_Function_cuGraphGetEdges_not_fou, sizeof(__pyx_k_Function_cuGraphGetEdges_not_fou), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphGetNodes_not_fou, __pyx_k_Function_cuGraphGetNodes_not_fou, sizeof(__pyx_k_Function_cuGraphGetNodes_not_fou), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphGetRootNodes_not, __pyx_k_Function_cuGraphGetRootNodes_not, sizeof(__pyx_k_Function_cuGraphGetRootNodes_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphHostNodeGetParam, __pyx_k_Function_cuGraphHostNodeGetParam, sizeof(__pyx_k_Function_cuGraphHostNodeGetParam), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphHostNodeSetParam, __pyx_k_Function_cuGraphHostNodeSetParam, sizeof(__pyx_k_Function_cuGraphHostNodeSetParam), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphInstantiateWithF, __pyx_k_Function_cuGraphInstantiateWithF, sizeof(__pyx_k_Function_cuGraphInstantiateWithF), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphInstantiateWithP, __pyx_k_Function_cuGraphInstantiateWithP, sizeof(__pyx_k_Function_cuGraphInstantiateWithP), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphKernelNodeCopyAt, __pyx_k_Function_cuGraphKernelNodeCopyAt, sizeof(__pyx_k_Function_cuGraphKernelNodeCopyAt), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphKernelNodeGetAtt, __pyx_k_Function_cuGraphKernelNodeGetAtt, sizeof(__pyx_k_Function_cuGraphKernelNodeGetAtt), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphKernelNodeGetPar, __pyx_k_Function_cuGraphKernelNodeGetPar, sizeof(__pyx_k_Function_cuGraphKernelNodeGetPar), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphKernelNodeSetAtt, __pyx_k_Function_cuGraphKernelNodeSetAtt, sizeof(__pyx_k_Function_cuGraphKernelNodeSetAtt), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphKernelNodeSetPar, __pyx_k_Function_cuGraphKernelNodeSetPar, sizeof(__pyx_k_Function_cuGraphKernelNodeSetPar), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphLaunch_not_found, __pyx_k_Function_cuGraphLaunch_not_found, sizeof(__pyx_k_Function_cuGraphLaunch_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphMemAllocNodeGetP, __pyx_k_Function_cuGraphMemAllocNodeGetP, sizeof(__pyx_k_Function_cuGraphMemAllocNodeGetP), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphMemFreeNodeGetPa, __pyx_k_Function_cuGraphMemFreeNodeGetPa, sizeof(__pyx_k_Function_cuGraphMemFreeNodeGetPa), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphMemcpyNodeGetPar, __pyx_k_Function_cuGraphMemcpyNodeGetPar, sizeof(__pyx_k_Function_cuGraphMemcpyNodeGetPar), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphMemcpyNodeSetPar, __pyx_k_Function_cuGraphMemcpyNodeSetPar, sizeof(__pyx_k_Function_cuGraphMemcpyNodeSetPar), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphMemsetNodeGetPar, __pyx_k_Function_cuGraphMemsetNodeGetPar, sizeof(__pyx_k_Function_cuGraphMemsetNodeGetPar), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphMemsetNodeSetPar, __pyx_k_Function_cuGraphMemsetNodeSetPar, sizeof(__pyx_k_Function_cuGraphMemsetNodeSetPar), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphNodeFindInClone, __pyx_k_Function_cuGraphNodeFindInClone, sizeof(__pyx_k_Function_cuGraphNodeFindInClone), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphNodeGetDependenc, __pyx_k_Function_cuGraphNodeGetDependenc, sizeof(__pyx_k_Function_cuGraphNodeGetDependenc), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphNodeGetDependent, __pyx_k_Function_cuGraphNodeGetDependent, sizeof(__pyx_k_Function_cuGraphNodeGetDependent), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphNodeGetEnabled_n, __pyx_k_Function_cuGraphNodeGetEnabled_n, sizeof(__pyx_k_Function_cuGraphNodeGetEnabled_n), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphNodeGetType_not, __pyx_k_Function_cuGraphNodeGetType_not, sizeof(__pyx_k_Function_cuGraphNodeGetType_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphNodeSetEnabled_n, __pyx_k_Function_cuGraphNodeSetEnabled_n, sizeof(__pyx_k_Function_cuGraphNodeSetEnabled_n), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphNodeSetParams_no, __pyx_k_Function_cuGraphNodeSetParams_no, sizeof(__pyx_k_Function_cuGraphNodeSetParams_no), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphReleaseUserObjec, __pyx_k_Function_cuGraphReleaseUserObjec, sizeof(__pyx_k_Function_cuGraphReleaseUserObjec), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphRemoveDependenci, __pyx_k_Function_cuGraphRemoveDependenci, sizeof(__pyx_k_Function_cuGraphRemoveDependenci), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphRetainUserObject, __pyx_k_Function_cuGraphRetainUserObject, sizeof(__pyx_k_Function_cuGraphRetainUserObject), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphUpload_not_found, __pyx_k_Function_cuGraphUpload_not_found, sizeof(__pyx_k_Function_cuGraphUpload_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphicsEGLRegisterIm, __pyx_k_Function_cuGraphicsEGLRegisterIm, sizeof(__pyx_k_Function_cuGraphicsEGLRegisterIm), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphicsGLRegisterBuf, __pyx_k_Function_cuGraphicsGLRegisterBuf, sizeof(__pyx_k_Function_cuGraphicsGLRegisterBuf), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphicsGLRegisterIma, __pyx_k_Function_cuGraphicsGLRegisterIma, sizeof(__pyx_k_Function_cuGraphicsGLRegisterIma), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphicsMapResources, __pyx_k_Function_cuGraphicsMapResources, sizeof(__pyx_k_Function_cuGraphicsMapResources), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphicsResourceGetMa, __pyx_k_Function_cuGraphicsResourceGetMa, sizeof(__pyx_k_Function_cuGraphicsResourceGetMa), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphicsResourceGetMa_2, __pyx_k_Function_cuGraphicsResourceGetMa_2, sizeof(__pyx_k_Function_cuGraphicsResourceGetMa_2), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphicsResourceGetMa_3, __pyx_k_Function_cuGraphicsResourceGetMa_3, sizeof(__pyx_k_Function_cuGraphicsResourceGetMa_3), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphicsResourceSetMa, __pyx_k_Function_cuGraphicsResourceSetMa, sizeof(__pyx_k_Function_cuGraphicsResourceSetMa), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphicsSubResourceGe, __pyx_k_Function_cuGraphicsSubResourceGe, sizeof(__pyx_k_Function_cuGraphicsSubResourceGe), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphicsUnmapResource, __pyx_k_Function_cuGraphicsUnmapResource, sizeof(__pyx_k_Function_cuGraphicsUnmapResource), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphicsUnregisterRes, __pyx_k_Function_cuGraphicsUnregisterRes, sizeof(__pyx_k_Function_cuGraphicsUnregisterRes), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphicsVDPAURegister, __pyx_k_Function_cuGraphicsVDPAURegister, sizeof(__pyx_k_Function_cuGraphicsVDPAURegister), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuGraphicsVDPAURegister_2, __pyx_k_Function_cuGraphicsVDPAURegister_2, sizeof(__pyx_k_Function_cuGraphicsVDPAURegister_2), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuImportExternalMemory, __pyx_k_Function_cuImportExternalMemory, sizeof(__pyx_k_Function_cuImportExternalMemory), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuImportExternalSemapho, __pyx_k_Function_cuImportExternalSemapho, sizeof(__pyx_k_Function_cuImportExternalSemapho), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuInit_not_found, __pyx_k_Function_cuInit_not_found, sizeof(__pyx_k_Function_cuInit_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuIpcCloseMemHandle_not, __pyx_k_Function_cuIpcCloseMemHandle_not, sizeof(__pyx_k_Function_cuIpcCloseMemHandle_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuIpcGetEventHandle_not, __pyx_k_Function_cuIpcGetEventHandle_not, sizeof(__pyx_k_Function_cuIpcGetEventHandle_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuIpcGetMemHandle_not_f, __pyx_k_Function_cuIpcGetMemHandle_not_f, sizeof(__pyx_k_Function_cuIpcGetMemHandle_not_f), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuIpcOpenEventHandle_no, __pyx_k_Function_cuIpcOpenEventHandle_no, sizeof(__pyx_k_Function_cuIpcOpenEventHandle_no), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuIpcOpenMemHandle_v2_n, __pyx_k_Function_cuIpcOpenMemHandle_v2_n, sizeof(__pyx_k_Function_cuIpcOpenMemHandle_v2_n), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuKernelGetAttribute_no, __pyx_k_Function_cuKernelGetAttribute_no, sizeof(__pyx_k_Function_cuKernelGetAttribute_no), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuKernelGetFunction_not, __pyx_k_Function_cuKernelGetFunction_not, sizeof(__pyx_k_Function_cuKernelGetFunction_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuKernelSetAttribute_no, __pyx_k_Function_cuKernelSetAttribute_no, sizeof(__pyx_k_Function_cuKernelSetAttribute_no), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuKernelSetCacheConfig, __pyx_k_Function_cuKernelSetCacheConfig, sizeof(__pyx_k_Function_cuKernelSetCacheConfig), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuLaunchCooperativeKern, __pyx_k_Function_cuLaunchCooperativeKern, sizeof(__pyx_k_Function_cuLaunchCooperativeKern), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuLaunchCooperativeKern_2, __pyx_k_Function_cuLaunchCooperativeKern_2, sizeof(__pyx_k_Function_cuLaunchCooperativeKern_2), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuLaunchGridAsync_not_f, __pyx_k_Function_cuLaunchGridAsync_not_f, sizeof(__pyx_k_Function_cuLaunchGridAsync_not_f), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuLaunchGrid_not_found, __pyx_k_Function_cuLaunchGrid_not_found, sizeof(__pyx_k_Function_cuLaunchGrid_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuLaunchHostFunc_not_fo, __pyx_k_Function_cuLaunchHostFunc_not_fo, sizeof(__pyx_k_Function_cuLaunchHostFunc_not_fo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuLaunchKernelEx_not_fo, __pyx_k_Function_cuLaunchKernelEx_not_fo, sizeof(__pyx_k_Function_cuLaunchKernelEx_not_fo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuLaunchKernel_not_foun, __pyx_k_Function_cuLaunchKernel_not_foun, sizeof(__pyx_k_Function_cuLaunchKernel_not_foun), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuLaunch_not_found, __pyx_k_Function_cuLaunch_not_found, sizeof(__pyx_k_Function_cuLaunch_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuLibraryGetGlobal_not, __pyx_k_Function_cuLibraryGetGlobal_not, sizeof(__pyx_k_Function_cuLibraryGetGlobal_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuLibraryGetKernel_not, __pyx_k_Function_cuLibraryGetKernel_not, sizeof(__pyx_k_Function_cuLibraryGetKernel_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuLibraryGetManaged_not, __pyx_k_Function_cuLibraryGetManaged_not, sizeof(__pyx_k_Function_cuLibraryGetManaged_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuLibraryGetModule_not, __pyx_k_Function_cuLibraryGetModule_not, sizeof(__pyx_k_Function_cuLibraryGetModule_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuLibraryGetUnifiedFunc, __pyx_k_Function_cuLibraryGetUnifiedFunc, sizeof(__pyx_k_Function_cuLibraryGetUnifiedFunc), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuLibraryLoadData_not_f, __pyx_k_Function_cuLibraryLoadData_not_f, sizeof(__pyx_k_Function_cuLibraryLoadData_not_f), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuLibraryLoadFromFile_n, __pyx_k_Function_cuLibraryLoadFromFile_n, sizeof(__pyx_k_Function_cuLibraryLoadFromFile_n), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuLibraryUnload_not_fou, __pyx_k_Function_cuLibraryUnload_not_fou, sizeof(__pyx_k_Function_cuLibraryUnload_not_fou), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuLinkAddData_v2_not_fo, __pyx_k_Function_cuLinkAddData_v2_not_fo, sizeof(__pyx_k_Function_cuLinkAddData_v2_not_fo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuLinkAddFile_v2_not_fo, __pyx_k_Function_cuLinkAddFile_v2_not_fo, sizeof(__pyx_k_Function_cuLinkAddFile_v2_not_fo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuLinkComplete_not_foun, __pyx_k_Function_cuLinkComplete_not_foun, sizeof(__pyx_k_Function_cuLinkComplete_not_foun), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuLinkCreate_v2_not_fou, __pyx_k_Function_cuLinkCreate_v2_not_fou, sizeof(__pyx_k_Function_cuLinkCreate_v2_not_fou), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuLinkDestroy_not_found, __pyx_k_Function_cuLinkDestroy_not_found, sizeof(__pyx_k_Function_cuLinkDestroy_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemAddressFree_not_fo, __pyx_k_Function_cuMemAddressFree_not_fo, sizeof(__pyx_k_Function_cuMemAddressFree_not_fo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemAddressReserve_not, __pyx_k_Function_cuMemAddressReserve_not, sizeof(__pyx_k_Function_cuMemAddressReserve_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemAdvise_not_found, __pyx_k_Function_cuMemAdvise_not_found, sizeof(__pyx_k_Function_cuMemAdvise_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemAdvise_v2_not_foun, __pyx_k_Function_cuMemAdvise_v2_not_foun, sizeof(__pyx_k_Function_cuMemAdvise_v2_not_foun), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemAllocAsync_not_fou, __pyx_k_Function_cuMemAllocAsync_not_fou, sizeof(__pyx_k_Function_cuMemAllocAsync_not_fou), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemAllocFromPoolAsync, __pyx_k_Function_cuMemAllocFromPoolAsync, sizeof(__pyx_k_Function_cuMemAllocFromPoolAsync), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemAllocHost_v2_not_f, __pyx_k_Function_cuMemAllocHost_v2_not_f, sizeof(__pyx_k_Function_cuMemAllocHost_v2_not_f), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemAllocManaged_not_f, __pyx_k_Function_cuMemAllocManaged_not_f, sizeof(__pyx_k_Function_cuMemAllocManaged_not_f), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemAllocPitch_v2_not, __pyx_k_Function_cuMemAllocPitch_v2_not, sizeof(__pyx_k_Function_cuMemAllocPitch_v2_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemAlloc_v2_not_found, __pyx_k_Function_cuMemAlloc_v2_not_found, sizeof(__pyx_k_Function_cuMemAlloc_v2_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemCreate_not_found, __pyx_k_Function_cuMemCreate_not_found, sizeof(__pyx_k_Function_cuMemCreate_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemExportToShareableH, __pyx_k_Function_cuMemExportToShareableH, sizeof(__pyx_k_Function_cuMemExportToShareableH), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemFreeAsync_not_foun, __pyx_k_Function_cuMemFreeAsync_not_foun, sizeof(__pyx_k_Function_cuMemFreeAsync_not_foun), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemFreeHost_not_found, __pyx_k_Function_cuMemFreeHost_not_found, sizeof(__pyx_k_Function_cuMemFreeHost_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemFree_v2_not_found, __pyx_k_Function_cuMemFree_v2_not_found, sizeof(__pyx_k_Function_cuMemFree_v2_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemGetAccess_not_foun, __pyx_k_Function_cuMemGetAccess_not_foun, sizeof(__pyx_k_Function_cuMemGetAccess_not_foun), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemGetAddressRange_v2, __pyx_k_Function_cuMemGetAddressRange_v2, sizeof(__pyx_k_Function_cuMemGetAddressRange_v2), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemGetAllocationGranu, __pyx_k_Function_cuMemGetAllocationGranu, sizeof(__pyx_k_Function_cuMemGetAllocationGranu), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemGetAllocationPrope, __pyx_k_Function_cuMemGetAllocationPrope, sizeof(__pyx_k_Function_cuMemGetAllocationPrope), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemGetHandleForAddres, __pyx_k_Function_cuMemGetHandleForAddres, sizeof(__pyx_k_Function_cuMemGetHandleForAddres), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemGetInfo_v2_not_fou, __pyx_k_Function_cuMemGetInfo_v2_not_fou, sizeof(__pyx_k_Function_cuMemGetInfo_v2_not_fou), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemHostAlloc_not_foun, __pyx_k_Function_cuMemHostAlloc_not_foun, sizeof(__pyx_k_Function_cuMemHostAlloc_not_foun), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemHostGetDevicePoint, __pyx_k_Function_cuMemHostGetDevicePoint, sizeof(__pyx_k_Function_cuMemHostGetDevicePoint), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemHostGetFlags_not_f, __pyx_k_Function_cuMemHostGetFlags_not_f, sizeof(__pyx_k_Function_cuMemHostGetFlags_not_f), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemHostRegister_v2_no, __pyx_k_Function_cuMemHostRegister_v2_no, sizeof(__pyx_k_Function_cuMemHostRegister_v2_no), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemHostUnregister_not, __pyx_k_Function_cuMemHostUnregister_not, sizeof(__pyx_k_Function_cuMemHostUnregister_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemImportFromShareabl, __pyx_k_Function_cuMemImportFromShareabl, sizeof(__pyx_k_Function_cuMemImportFromShareabl), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemMapArrayAsync_not, __pyx_k_Function_cuMemMapArrayAsync_not, sizeof(__pyx_k_Function_cuMemMapArrayAsync_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemMap_not_found, __pyx_k_Function_cuMemMap_not_found, sizeof(__pyx_k_Function_cuMemMap_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemPoolCreate_not_fou, __pyx_k_Function_cuMemPoolCreate_not_fou, sizeof(__pyx_k_Function_cuMemPoolCreate_not_fou), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemPoolDestroy_not_fo, __pyx_k_Function_cuMemPoolDestroy_not_fo, sizeof(__pyx_k_Function_cuMemPoolDestroy_not_fo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemPoolExportPointer, __pyx_k_Function_cuMemPoolExportPointer, sizeof(__pyx_k_Function_cuMemPoolExportPointer), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemPoolExportToSharea, __pyx_k_Function_cuMemPoolExportToSharea, sizeof(__pyx_k_Function_cuMemPoolExportToSharea), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemPoolGetAccess_not, __pyx_k_Function_cuMemPoolGetAccess_not, sizeof(__pyx_k_Function_cuMemPoolGetAccess_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemPoolGetAttribute_n, __pyx_k_Function_cuMemPoolGetAttribute_n, sizeof(__pyx_k_Function_cuMemPoolGetAttribute_n), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemPoolImportFromShar, __pyx_k_Function_cuMemPoolImportFromShar, sizeof(__pyx_k_Function_cuMemPoolImportFromShar), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemPoolImportPointer, __pyx_k_Function_cuMemPoolImportPointer, sizeof(__pyx_k_Function_cuMemPoolImportPointer), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemPoolSetAccess_not, __pyx_k_Function_cuMemPoolSetAccess_not, sizeof(__pyx_k_Function_cuMemPoolSetAccess_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemPoolSetAttribute_n, __pyx_k_Function_cuMemPoolSetAttribute_n, sizeof(__pyx_k_Function_cuMemPoolSetAttribute_n), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemPoolTrimTo_not_fou, __pyx_k_Function_cuMemPoolTrimTo_not_fou, sizeof(__pyx_k_Function_cuMemPoolTrimTo_not_fou), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemPrefetchAsync_not, __pyx_k_Function_cuMemPrefetchAsync_not, sizeof(__pyx_k_Function_cuMemPrefetchAsync_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemPrefetchAsync_v2_n, __pyx_k_Function_cuMemPrefetchAsync_v2_n, sizeof(__pyx_k_Function_cuMemPrefetchAsync_v2_n), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemRangeGetAttribute, __pyx_k_Function_cuMemRangeGetAttribute, sizeof(__pyx_k_Function_cuMemRangeGetAttribute), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemRangeGetAttributes, __pyx_k_Function_cuMemRangeGetAttributes, sizeof(__pyx_k_Function_cuMemRangeGetAttributes), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemRelease_not_found, __pyx_k_Function_cuMemRelease_not_found, sizeof(__pyx_k_Function_cuMemRelease_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemRetainAllocationHa, __pyx_k_Function_cuMemRetainAllocationHa, sizeof(__pyx_k_Function_cuMemRetainAllocationHa), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemSetAccess_not_foun, __pyx_k_Function_cuMemSetAccess_not_foun, sizeof(__pyx_k_Function_cuMemSetAccess_not_foun), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemUnmap_not_found, __pyx_k_Function_cuMemUnmap_not_found, sizeof(__pyx_k_Function_cuMemUnmap_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemcpy2DAsync_v2_not, __pyx_k_Function_cuMemcpy2DAsync_v2_not, sizeof(__pyx_k_Function_cuMemcpy2DAsync_v2_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemcpy2DUnaligned_v2, __pyx_k_Function_cuMemcpy2DUnaligned_v2, sizeof(__pyx_k_Function_cuMemcpy2DUnaligned_v2), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemcpy2D_v2_not_found, __pyx_k_Function_cuMemcpy2D_v2_not_found, sizeof(__pyx_k_Function_cuMemcpy2D_v2_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemcpy3DAsync_v2_not, __pyx_k_Function_cuMemcpy3DAsync_v2_not, sizeof(__pyx_k_Function_cuMemcpy3DAsync_v2_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemcpy3DPeerAsync_not, __pyx_k_Function_cuMemcpy3DPeerAsync_not, sizeof(__pyx_k_Function_cuMemcpy3DPeerAsync_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemcpy3DPeer_not_foun, __pyx_k_Function_cuMemcpy3DPeer_not_foun, sizeof(__pyx_k_Function_cuMemcpy3DPeer_not_foun), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemcpy3D_v2_not_found, __pyx_k_Function_cuMemcpy3D_v2_not_found, sizeof(__pyx_k_Function_cuMemcpy3D_v2_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemcpyAsync_not_found, __pyx_k_Function_cuMemcpyAsync_not_found, sizeof(__pyx_k_Function_cuMemcpyAsync_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemcpyAtoA_v2_not_fou, __pyx_k_Function_cuMemcpyAtoA_v2_not_fou, sizeof(__pyx_k_Function_cuMemcpyAtoA_v2_not_fou), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemcpyAtoD_v2_not_fou, __pyx_k_Function_cuMemcpyAtoD_v2_not_fou, sizeof(__pyx_k_Function_cuMemcpyAtoD_v2_not_fou), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemcpyAtoHAsync_v2_no, __pyx_k_Function_cuMemcpyAtoHAsync_v2_no, sizeof(__pyx_k_Function_cuMemcpyAtoHAsync_v2_no), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemcpyAtoH_v2_not_fou, __pyx_k_Function_cuMemcpyAtoH_v2_not_fou, sizeof(__pyx_k_Function_cuMemcpyAtoH_v2_not_fou), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemcpyDtoA_v2_not_fou, __pyx_k_Function_cuMemcpyDtoA_v2_not_fou, sizeof(__pyx_k_Function_cuMemcpyDtoA_v2_not_fou), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemcpyDtoDAsync_v2_no, __pyx_k_Function_cuMemcpyDtoDAsync_v2_no, sizeof(__pyx_k_Function_cuMemcpyDtoDAsync_v2_no), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemcpyDtoD_v2_not_fou, __pyx_k_Function_cuMemcpyDtoD_v2_not_fou, sizeof(__pyx_k_Function_cuMemcpyDtoD_v2_not_fou), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemcpyDtoHAsync_v2_no, __pyx_k_Function_cuMemcpyDtoHAsync_v2_no, sizeof(__pyx_k_Function_cuMemcpyDtoHAsync_v2_no), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemcpyDtoH_v2_not_fou, __pyx_k_Function_cuMemcpyDtoH_v2_not_fou, sizeof(__pyx_k_Function_cuMemcpyDtoH_v2_not_fou), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemcpyHtoAAsync_v2_no, __pyx_k_Function_cuMemcpyHtoAAsync_v2_no, sizeof(__pyx_k_Function_cuMemcpyHtoAAsync_v2_no), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemcpyHtoA_v2_not_fou, __pyx_k_Function_cuMemcpyHtoA_v2_not_fou, sizeof(__pyx_k_Function_cuMemcpyHtoA_v2_not_fou), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemcpyHtoDAsync_v2_no, __pyx_k_Function_cuMemcpyHtoDAsync_v2_no, sizeof(__pyx_k_Function_cuMemcpyHtoDAsync_v2_no), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemcpyHtoD_v2_not_fou, __pyx_k_Function_cuMemcpyHtoD_v2_not_fou, sizeof(__pyx_k_Function_cuMemcpyHtoD_v2_not_fou), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemcpyPeerAsync_not_f, __pyx_k_Function_cuMemcpyPeerAsync_not_f, sizeof(__pyx_k_Function_cuMemcpyPeerAsync_not_f), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemcpyPeer_not_found, __pyx_k_Function_cuMemcpyPeer_not_found, sizeof(__pyx_k_Function_cuMemcpyPeer_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemcpy_not_found, __pyx_k_Function_cuMemcpy_not_found, sizeof(__pyx_k_Function_cuMemcpy_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemsetD16Async_not_fo, __pyx_k_Function_cuMemsetD16Async_not_fo, sizeof(__pyx_k_Function_cuMemsetD16Async_not_fo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemsetD16_v2_not_foun, __pyx_k_Function_cuMemsetD16_v2_not_foun, sizeof(__pyx_k_Function_cuMemsetD16_v2_not_foun), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemsetD2D16Async_not, __pyx_k_Function_cuMemsetD2D16Async_not, sizeof(__pyx_k_Function_cuMemsetD2D16Async_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemsetD2D16_v2_not_fo, __pyx_k_Function_cuMemsetD2D16_v2_not_fo, sizeof(__pyx_k_Function_cuMemsetD2D16_v2_not_fo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemsetD2D32Async_not, __pyx_k_Function_cuMemsetD2D32Async_not, sizeof(__pyx_k_Function_cuMemsetD2D32Async_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemsetD2D32_v2_not_fo, __pyx_k_Function_cuMemsetD2D32_v2_not_fo, sizeof(__pyx_k_Function_cuMemsetD2D32_v2_not_fo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemsetD2D8Async_not_f, __pyx_k_Function_cuMemsetD2D8Async_not_f, sizeof(__pyx_k_Function_cuMemsetD2D8Async_not_f), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemsetD2D8_v2_not_fou, __pyx_k_Function_cuMemsetD2D8_v2_not_fou, sizeof(__pyx_k_Function_cuMemsetD2D8_v2_not_fou), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemsetD32Async_not_fo, __pyx_k_Function_cuMemsetD32Async_not_fo, sizeof(__pyx_k_Function_cuMemsetD32Async_not_fo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemsetD32_v2_not_foun, __pyx_k_Function_cuMemsetD32_v2_not_foun, sizeof(__pyx_k_Function_cuMemsetD32_v2_not_foun), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemsetD8Async_not_fou, __pyx_k_Function_cuMemsetD8Async_not_fou, sizeof(__pyx_k_Function_cuMemsetD8Async_not_fou), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMemsetD8_v2_not_found, __pyx_k_Function_cuMemsetD8_v2_not_found, sizeof(__pyx_k_Function_cuMemsetD8_v2_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMipmappedArrayCreate, __pyx_k_Function_cuMipmappedArrayCreate, sizeof(__pyx_k_Function_cuMipmappedArrayCreate), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMipmappedArrayDestroy, __pyx_k_Function_cuMipmappedArrayDestroy, sizeof(__pyx_k_Function_cuMipmappedArrayDestroy), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMipmappedArrayGetLeve, __pyx_k_Function_cuMipmappedArrayGetLeve, sizeof(__pyx_k_Function_cuMipmappedArrayGetLeve), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMipmappedArrayGetMemo, __pyx_k_Function_cuMipmappedArrayGetMemo, sizeof(__pyx_k_Function_cuMipmappedArrayGetMemo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMipmappedArrayGetSpar, __pyx_k_Function_cuMipmappedArrayGetSpar, sizeof(__pyx_k_Function_cuMipmappedArrayGetSpar), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuModuleGetFunction_not, __pyx_k_Function_cuModuleGetFunction_not, sizeof(__pyx_k_Function_cuModuleGetFunction_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuModuleGetGlobal_v2_no, __pyx_k_Function_cuModuleGetGlobal_v2_no, sizeof(__pyx_k_Function_cuModuleGetGlobal_v2_no), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuModuleGetLoadingMode, __pyx_k_Function_cuModuleGetLoadingMode, sizeof(__pyx_k_Function_cuModuleGetLoadingMode), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuModuleGetSurfRef_not, __pyx_k_Function_cuModuleGetSurfRef_not, sizeof(__pyx_k_Function_cuModuleGetSurfRef_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuModuleGetTexRef_not_f, __pyx_k_Function_cuModuleGetTexRef_not_f, sizeof(__pyx_k_Function_cuModuleGetTexRef_not_f), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuModuleLoadDataEx_not, __pyx_k_Function_cuModuleLoadDataEx_not, sizeof(__pyx_k_Function_cuModuleLoadDataEx_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuModuleLoadData_not_fo, __pyx_k_Function_cuModuleLoadData_not_fo, sizeof(__pyx_k_Function_cuModuleLoadData_not_fo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuModuleLoadFatBinary_n, __pyx_k_Function_cuModuleLoadFatBinary_n, sizeof(__pyx_k_Function_cuModuleLoadFatBinary_n), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuModuleLoad_not_found, __pyx_k_Function_cuModuleLoad_not_found, sizeof(__pyx_k_Function_cuModuleLoad_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuModuleUnload_not_foun, __pyx_k_Function_cuModuleUnload_not_foun, sizeof(__pyx_k_Function_cuModuleUnload_not_foun), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMulticastAddDevice_no, __pyx_k_Function_cuMulticastAddDevice_no, sizeof(__pyx_k_Function_cuMulticastAddDevice_no), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMulticastBindAddr_not, __pyx_k_Function_cuMulticastBindAddr_not, sizeof(__pyx_k_Function_cuMulticastBindAddr_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMulticastBindMem_not, __pyx_k_Function_cuMulticastBindMem_not, sizeof(__pyx_k_Function_cuMulticastBindMem_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMulticastCreate_not_f, __pyx_k_Function_cuMulticastCreate_not_f, sizeof(__pyx_k_Function_cuMulticastCreate_not_f), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMulticastGetGranulari, __pyx_k_Function_cuMulticastGetGranulari, sizeof(__pyx_k_Function_cuMulticastGetGranulari), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuMulticastUnbind_not_f, __pyx_k_Function_cuMulticastUnbind_not_f, sizeof(__pyx_k_Function_cuMulticastUnbind_not_f), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuOccupancyAvailableDyn, __pyx_k_Function_cuOccupancyAvailableDyn, sizeof(__pyx_k_Function_cuOccupancyAvailableDyn), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuOccupancyMaxActiveBlo, __pyx_k_Function_cuOccupancyMaxActiveBlo, sizeof(__pyx_k_Function_cuOccupancyMaxActiveBlo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuOccupancyMaxActiveBlo_2, __pyx_k_Function_cuOccupancyMaxActiveBlo_2, sizeof(__pyx_k_Function_cuOccupancyMaxActiveBlo_2), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuOccupancyMaxActiveClu, __pyx_k_Function_cuOccupancyMaxActiveClu, sizeof(__pyx_k_Function_cuOccupancyMaxActiveClu), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuOccupancyMaxPotential, __pyx_k_Function_cuOccupancyMaxPotential, sizeof(__pyx_k_Function_cuOccupancyMaxPotential), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuOccupancyMaxPotential_2, __pyx_k_Function_cuOccupancyMaxPotential_2, sizeof(__pyx_k_Function_cuOccupancyMaxPotential_2), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuOccupancyMaxPotential_3, __pyx_k_Function_cuOccupancyMaxPotential_3, sizeof(__pyx_k_Function_cuOccupancyMaxPotential_3), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuParamSetSize_not_foun, __pyx_k_Function_cuParamSetSize_not_foun, sizeof(__pyx_k_Function_cuParamSetSize_not_foun), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuParamSetTexRef_not_fo, __pyx_k_Function_cuParamSetTexRef_not_fo, sizeof(__pyx_k_Function_cuParamSetTexRef_not_fo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuParamSetf_not_found, __pyx_k_Function_cuParamSetf_not_found, sizeof(__pyx_k_Function_cuParamSetf_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuParamSeti_not_found, __pyx_k_Function_cuParamSeti_not_found, sizeof(__pyx_k_Function_cuParamSeti_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuParamSetv_not_found, __pyx_k_Function_cuParamSetv_not_found, sizeof(__pyx_k_Function_cuParamSetv_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuPointerGetAttribute_n, __pyx_k_Function_cuPointerGetAttribute_n, sizeof(__pyx_k_Function_cuPointerGetAttribute_n), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuPointerGetAttributes, __pyx_k_Function_cuPointerGetAttributes, sizeof(__pyx_k_Function_cuPointerGetAttributes), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuPointerSetAttribute_n, __pyx_k_Function_cuPointerSetAttribute_n, sizeof(__pyx_k_Function_cuPointerSetAttribute_n), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuProfilerStart_not_fou, __pyx_k_Function_cuProfilerStart_not_fou, sizeof(__pyx_k_Function_cuProfilerStart_not_fou), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuProfilerStop_not_foun, __pyx_k_Function_cuProfilerStop_not_foun, sizeof(__pyx_k_Function_cuProfilerStop_not_foun), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuSignalExternalSemapho, __pyx_k_Function_cuSignalExternalSemapho, sizeof(__pyx_k_Function_cuSignalExternalSemapho), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuStreamAddCallback_not, __pyx_k_Function_cuStreamAddCallback_not, sizeof(__pyx_k_Function_cuStreamAddCallback_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuStreamAttachMemAsync, __pyx_k_Function_cuStreamAttachMemAsync, sizeof(__pyx_k_Function_cuStreamAttachMemAsync), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuStreamBatchMemOp_v2_n, __pyx_k_Function_cuStreamBatchMemOp_v2_n, sizeof(__pyx_k_Function_cuStreamBatchMemOp_v2_n), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuStreamBeginCapture_v2, __pyx_k_Function_cuStreamBeginCapture_v2, sizeof(__pyx_k_Function_cuStreamBeginCapture_v2), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuStreamCopyAttributes, __pyx_k_Function_cuStreamCopyAttributes, sizeof(__pyx_k_Function_cuStreamCopyAttributes), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuStreamCreateWithPrior, __pyx_k_Function_cuStreamCreateWithPrior, sizeof(__pyx_k_Function_cuStreamCreateWithPrior), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuStreamCreate_not_foun, __pyx_k_Function_cuStreamCreate_not_foun, sizeof(__pyx_k_Function_cuStreamCreate_not_foun), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuStreamDestroy_v2_not, __pyx_k_Function_cuStreamDestroy_v2_not, sizeof(__pyx_k_Function_cuStreamDestroy_v2_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuStreamEndCapture_not, __pyx_k_Function_cuStreamEndCapture_not, sizeof(__pyx_k_Function_cuStreamEndCapture_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuStreamGetAttribute_no, __pyx_k_Function_cuStreamGetAttribute_no, sizeof(__pyx_k_Function_cuStreamGetAttribute_no), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuStreamGetCaptureInfo, __pyx_k_Function_cuStreamGetCaptureInfo, sizeof(__pyx_k_Function_cuStreamGetCaptureInfo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuStreamGetCtx_not_foun, __pyx_k_Function_cuStreamGetCtx_not_foun, sizeof(__pyx_k_Function_cuStreamGetCtx_not_foun), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuStreamGetFlags_not_fo, __pyx_k_Function_cuStreamGetFlags_not_fo, sizeof(__pyx_k_Function_cuStreamGetFlags_not_fo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuStreamGetId_not_found, __pyx_k_Function_cuStreamGetId_not_found, sizeof(__pyx_k_Function_cuStreamGetId_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuStreamGetPriority_not, __pyx_k_Function_cuStreamGetPriority_not, sizeof(__pyx_k_Function_cuStreamGetPriority_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuStreamIsCapturing_not, __pyx_k_Function_cuStreamIsCapturing_not, sizeof(__pyx_k_Function_cuStreamIsCapturing_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuStreamQuery_not_found, __pyx_k_Function_cuStreamQuery_not_found, sizeof(__pyx_k_Function_cuStreamQuery_not_found), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuStreamSetAttribute_no, __pyx_k_Function_cuStreamSetAttribute_no, sizeof(__pyx_k_Function_cuStreamSetAttribute_no), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuStreamSynchronize_not, __pyx_k_Function_cuStreamSynchronize_not, sizeof(__pyx_k_Function_cuStreamSynchronize_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuStreamUpdateCaptureDe, __pyx_k_Function_cuStreamUpdateCaptureDe, sizeof(__pyx_k_Function_cuStreamUpdateCaptureDe), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuStreamWaitEvent_not_f, __pyx_k_Function_cuStreamWaitEvent_not_f, sizeof(__pyx_k_Function_cuStreamWaitEvent_not_f), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuStreamWaitValue32_v2, __pyx_k_Function_cuStreamWaitValue32_v2, sizeof(__pyx_k_Function_cuStreamWaitValue32_v2), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuStreamWaitValue64_v2, __pyx_k_Function_cuStreamWaitValue64_v2, sizeof(__pyx_k_Function_cuStreamWaitValue64_v2), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuStreamWriteValue32_v2, __pyx_k_Function_cuStreamWriteValue32_v2, sizeof(__pyx_k_Function_cuStreamWriteValue32_v2), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuStreamWriteValue64_v2, __pyx_k_Function_cuStreamWriteValue64_v2, sizeof(__pyx_k_Function_cuStreamWriteValue64_v2), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuSurfObjectCreate_not, __pyx_k_Function_cuSurfObjectCreate_not, sizeof(__pyx_k_Function_cuSurfObjectCreate_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuSurfObjectDestroy_not, __pyx_k_Function_cuSurfObjectDestroy_not, sizeof(__pyx_k_Function_cuSurfObjectDestroy_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuSurfObjectGetResource, __pyx_k_Function_cuSurfObjectGetResource, sizeof(__pyx_k_Function_cuSurfObjectGetResource), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuSurfRefGetArray_not_f, __pyx_k_Function_cuSurfRefGetArray_not_f, sizeof(__pyx_k_Function_cuSurfRefGetArray_not_f), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuSurfRefSetArray_not_f, __pyx_k_Function_cuSurfRefSetArray_not_f, sizeof(__pyx_k_Function_cuSurfRefSetArray_not_f), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTensorMapEncodeIm2col, __pyx_k_Function_cuTensorMapEncodeIm2col, sizeof(__pyx_k_Function_cuTensorMapEncodeIm2col), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTensorMapEncodeTiled, __pyx_k_Function_cuTensorMapEncodeTiled, sizeof(__pyx_k_Function_cuTensorMapEncodeTiled), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTensorMapReplaceAddre, __pyx_k_Function_cuTensorMapReplaceAddre, sizeof(__pyx_k_Function_cuTensorMapReplaceAddre), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexObjectCreate_not_f, __pyx_k_Function_cuTexObjectCreate_not_f, sizeof(__pyx_k_Function_cuTexObjectCreate_not_f), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexObjectDestroy_not, __pyx_k_Function_cuTexObjectDestroy_not, sizeof(__pyx_k_Function_cuTexObjectDestroy_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexObjectGetResourceD, __pyx_k_Function_cuTexObjectGetResourceD, sizeof(__pyx_k_Function_cuTexObjectGetResourceD), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexObjectGetResourceV, __pyx_k_Function_cuTexObjectGetResourceV, sizeof(__pyx_k_Function_cuTexObjectGetResourceV), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexObjectGetTextureDe, __pyx_k_Function_cuTexObjectGetTextureDe, sizeof(__pyx_k_Function_cuTexObjectGetTextureDe), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexRefCreate_not_foun, __pyx_k_Function_cuTexRefCreate_not_foun, sizeof(__pyx_k_Function_cuTexRefCreate_not_foun), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexRefDestroy_not_fou, __pyx_k_Function_cuTexRefDestroy_not_fou, sizeof(__pyx_k_Function_cuTexRefDestroy_not_fou), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexRefGetAddressMode, __pyx_k_Function_cuTexRefGetAddressMode, sizeof(__pyx_k_Function_cuTexRefGetAddressMode), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexRefGetAddress_v2_n, __pyx_k_Function_cuTexRefGetAddress_v2_n, sizeof(__pyx_k_Function_cuTexRefGetAddress_v2_n), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexRefGetArray_not_fo, __pyx_k_Function_cuTexRefGetArray_not_fo, sizeof(__pyx_k_Function_cuTexRefGetArray_not_fo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexRefGetBorderColor, __pyx_k_Function_cuTexRefGetBorderColor, sizeof(__pyx_k_Function_cuTexRefGetBorderColor), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexRefGetFilterMode_n, __pyx_k_Function_cuTexRefGetFilterMode_n, sizeof(__pyx_k_Function_cuTexRefGetFilterMode_n), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexRefGetFlags_not_fo, __pyx_k_Function_cuTexRefGetFlags_not_fo, sizeof(__pyx_k_Function_cuTexRefGetFlags_not_fo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexRefGetFormat_not_f, __pyx_k_Function_cuTexRefGetFormat_not_f, sizeof(__pyx_k_Function_cuTexRefGetFormat_not_f), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexRefGetMaxAnisotrop, __pyx_k_Function_cuTexRefGetMaxAnisotrop, sizeof(__pyx_k_Function_cuTexRefGetMaxAnisotrop), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexRefGetMipmapFilter, __pyx_k_Function_cuTexRefGetMipmapFilter, sizeof(__pyx_k_Function_cuTexRefGetMipmapFilter), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexRefGetMipmapLevelB, __pyx_k_Function_cuTexRefGetMipmapLevelB, sizeof(__pyx_k_Function_cuTexRefGetMipmapLevelB), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexRefGetMipmapLevelC, __pyx_k_Function_cuTexRefGetMipmapLevelC, sizeof(__pyx_k_Function_cuTexRefGetMipmapLevelC), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexRefGetMipmappedArr, __pyx_k_Function_cuTexRefGetMipmappedArr, sizeof(__pyx_k_Function_cuTexRefGetMipmappedArr), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexRefSetAddress2D_v3, __pyx_k_Function_cuTexRefSetAddress2D_v3, sizeof(__pyx_k_Function_cuTexRefSetAddress2D_v3), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexRefSetAddressMode, __pyx_k_Function_cuTexRefSetAddressMode, sizeof(__pyx_k_Function_cuTexRefSetAddressMode), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexRefSetAddress_v2_n, __pyx_k_Function_cuTexRefSetAddress_v2_n, sizeof(__pyx_k_Function_cuTexRefSetAddress_v2_n), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexRefSetArray_not_fo, __pyx_k_Function_cuTexRefSetArray_not_fo, sizeof(__pyx_k_Function_cuTexRefSetArray_not_fo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexRefSetBorderColor, __pyx_k_Function_cuTexRefSetBorderColor, sizeof(__pyx_k_Function_cuTexRefSetBorderColor), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexRefSetFilterMode_n, __pyx_k_Function_cuTexRefSetFilterMode_n, sizeof(__pyx_k_Function_cuTexRefSetFilterMode_n), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexRefSetFlags_not_fo, __pyx_k_Function_cuTexRefSetFlags_not_fo, sizeof(__pyx_k_Function_cuTexRefSetFlags_not_fo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexRefSetFormat_not_f, __pyx_k_Function_cuTexRefSetFormat_not_f, sizeof(__pyx_k_Function_cuTexRefSetFormat_not_f), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexRefSetMaxAnisotrop, __pyx_k_Function_cuTexRefSetMaxAnisotrop, sizeof(__pyx_k_Function_cuTexRefSetMaxAnisotrop), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexRefSetMipmapFilter, __pyx_k_Function_cuTexRefSetMipmapFilter, sizeof(__pyx_k_Function_cuTexRefSetMipmapFilter), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexRefSetMipmapLevelB, __pyx_k_Function_cuTexRefSetMipmapLevelB, sizeof(__pyx_k_Function_cuTexRefSetMipmapLevelB), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexRefSetMipmapLevelC, __pyx_k_Function_cuTexRefSetMipmapLevelC, sizeof(__pyx_k_Function_cuTexRefSetMipmapLevelC), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuTexRefSetMipmappedArr, __pyx_k_Function_cuTexRefSetMipmappedArr, sizeof(__pyx_k_Function_cuTexRefSetMipmappedArr), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuThreadExchangeStreamC, __pyx_k_Function_cuThreadExchangeStreamC, sizeof(__pyx_k_Function_cuThreadExchangeStreamC), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuUserObjectCreate_not, __pyx_k_Function_cuUserObjectCreate_not, sizeof(__pyx_k_Function_cuUserObjectCreate_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuUserObjectRelease_not, __pyx_k_Function_cuUserObjectRelease_not, sizeof(__pyx_k_Function_cuUserObjectRelease_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuUserObjectRetain_not, __pyx_k_Function_cuUserObjectRetain_not, sizeof(__pyx_k_Function_cuUserObjectRetain_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuVDPAUCtxCreate_v2_not, __pyx_k_Function_cuVDPAUCtxCreate_v2_not, sizeof(__pyx_k_Function_cuVDPAUCtxCreate_v2_not), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuVDPAUGetDevice_not_fo, __pyx_k_Function_cuVDPAUGetDevice_not_fo, sizeof(__pyx_k_Function_cuVDPAUGetDevice_not_fo), 0, 1, 0, 0},
  {&__pyx_kp_u_Function_cuWaitExternalSemaphore, __pyx_k_Function_cuWaitExternalSemaphore, sizeof(__pyx_k_Function_cuWaitExternalSemaphore), 0, 1, 0, 0},
  {&__pyx_n_s_GetProcAddress, __pyx_k_GetProcAddress, sizeof(__pyx_k_GetProcAddress), 0, 0, 1, 1},
  {&__pyx_n_s_LoadLibraryEx, __pyx_k_LoadLibraryEx, sizeof(__pyx_k_LoadLibraryEx), 0, 0, 1, 1},
  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_u_cuArray3DCreate_v2, __pyx_k_cuArray3DCreate_v2, sizeof(__pyx_k_cuArray3DCreate_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuArray3DGetDescriptor_v2, __pyx_k_cuArray3DGetDescriptor_v2, sizeof(__pyx_k_cuArray3DGetDescriptor_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuArrayCreate_v2, __pyx_k_cuArrayCreate_v2, sizeof(__pyx_k_cuArrayCreate_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuArrayDestroy, __pyx_k_cuArrayDestroy, sizeof(__pyx_k_cuArrayDestroy), 0, 1, 0, 1},
  {&__pyx_n_u_cuArrayGetDescriptor_v2, __pyx_k_cuArrayGetDescriptor_v2, sizeof(__pyx_k_cuArrayGetDescriptor_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuArrayGetMemoryRequirements, __pyx_k_cuArrayGetMemoryRequirements, sizeof(__pyx_k_cuArrayGetMemoryRequirements), 0, 1, 0, 1},
  {&__pyx_n_u_cuArrayGetPlane, __pyx_k_cuArrayGetPlane, sizeof(__pyx_k_cuArrayGetPlane), 0, 1, 0, 1},
  {&__pyx_n_u_cuArrayGetSparseProperties, __pyx_k_cuArrayGetSparseProperties, sizeof(__pyx_k_cuArrayGetSparseProperties), 0, 1, 0, 1},
  {&__pyx_n_u_cuCoredumpGetAttribute, __pyx_k_cuCoredumpGetAttribute, sizeof(__pyx_k_cuCoredumpGetAttribute), 0, 1, 0, 1},
  {&__pyx_n_u_cuCoredumpGetAttributeGlobal, __pyx_k_cuCoredumpGetAttributeGlobal, sizeof(__pyx_k_cuCoredumpGetAttributeGlobal), 0, 1, 0, 1},
  {&__pyx_n_u_cuCoredumpSetAttribute, __pyx_k_cuCoredumpSetAttribute, sizeof(__pyx_k_cuCoredumpSetAttribute), 0, 1, 0, 1},
  {&__pyx_n_u_cuCoredumpSetAttributeGlobal, __pyx_k_cuCoredumpSetAttributeGlobal, sizeof(__pyx_k_cuCoredumpSetAttributeGlobal), 0, 1, 0, 1},
  {&__pyx_n_u_cuCtxAttach, __pyx_k_cuCtxAttach, sizeof(__pyx_k_cuCtxAttach), 0, 1, 0, 1},
  {&__pyx_n_u_cuCtxCreate_v2, __pyx_k_cuCtxCreate_v2, sizeof(__pyx_k_cuCtxCreate_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuCtxCreate_v3, __pyx_k_cuCtxCreate_v3, sizeof(__pyx_k_cuCtxCreate_v3), 0, 1, 0, 1},
  {&__pyx_n_u_cuCtxDestroy_v2, __pyx_k_cuCtxDestroy_v2, sizeof(__pyx_k_cuCtxDestroy_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuCtxDetach, __pyx_k_cuCtxDetach, sizeof(__pyx_k_cuCtxDetach), 0, 1, 0, 1},
  {&__pyx_n_u_cuCtxDisablePeerAccess, __pyx_k_cuCtxDisablePeerAccess, sizeof(__pyx_k_cuCtxDisablePeerAccess), 0, 1, 0, 1},
  {&__pyx_n_u_cuCtxEnablePeerAccess, __pyx_k_cuCtxEnablePeerAccess, sizeof(__pyx_k_cuCtxEnablePeerAccess), 0, 1, 0, 1},
  {&__pyx_n_u_cuCtxGetApiVersion, __pyx_k_cuCtxGetApiVersion, sizeof(__pyx_k_cuCtxGetApiVersion), 0, 1, 0, 1},
  {&__pyx_n_u_cuCtxGetCacheConfig, __pyx_k_cuCtxGetCacheConfig, sizeof(__pyx_k_cuCtxGetCacheConfig), 0, 1, 0, 1},
  {&__pyx_n_u_cuCtxGetCurrent, __pyx_k_cuCtxGetCurrent, sizeof(__pyx_k_cuCtxGetCurrent), 0, 1, 0, 1},
  {&__pyx_n_u_cuCtxGetDevice, __pyx_k_cuCtxGetDevice, sizeof(__pyx_k_cuCtxGetDevice), 0, 1, 0, 1},
  {&__pyx_n_u_cuCtxGetExecAffinity, __pyx_k_cuCtxGetExecAffinity, sizeof(__pyx_k_cuCtxGetExecAffinity), 0, 1, 0, 1},
  {&__pyx_n_u_cuCtxGetFlags, __pyx_k_cuCtxGetFlags, sizeof(__pyx_k_cuCtxGetFlags), 0, 1, 0, 1},
  {&__pyx_n_u_cuCtxGetId, __pyx_k_cuCtxGetId, sizeof(__pyx_k_cuCtxGetId), 0, 1, 0, 1},
  {&__pyx_n_u_cuCtxGetLimit, __pyx_k_cuCtxGetLimit, sizeof(__pyx_k_cuCtxGetLimit), 0, 1, 0, 1},
  {&__pyx_n_u_cuCtxGetSharedMemConfig, __pyx_k_cuCtxGetSharedMemConfig, sizeof(__pyx_k_cuCtxGetSharedMemConfig), 0, 1, 0, 1},
  {&__pyx_n_u_cuCtxGetStreamPriorityRange, __pyx_k_cuCtxGetStreamPriorityRange, sizeof(__pyx_k_cuCtxGetStreamPriorityRange), 0, 1, 0, 1},
  {&__pyx_n_u_cuCtxPopCurrent_v2, __pyx_k_cuCtxPopCurrent_v2, sizeof(__pyx_k_cuCtxPopCurrent_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuCtxPushCurrent_v2, __pyx_k_cuCtxPushCurrent_v2, sizeof(__pyx_k_cuCtxPushCurrent_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuCtxResetPersistingL2Cache, __pyx_k_cuCtxResetPersistingL2Cache, sizeof(__pyx_k_cuCtxResetPersistingL2Cache), 0, 1, 0, 1},
  {&__pyx_n_u_cuCtxSetCacheConfig, __pyx_k_cuCtxSetCacheConfig, sizeof(__pyx_k_cuCtxSetCacheConfig), 0, 1, 0, 1},
  {&__pyx_n_u_cuCtxSetCurrent, __pyx_k_cuCtxSetCurrent, sizeof(__pyx_k_cuCtxSetCurrent), 0, 1, 0, 1},
  {&__pyx_n_u_cuCtxSetFlags, __pyx_k_cuCtxSetFlags, sizeof(__pyx_k_cuCtxSetFlags), 0, 1, 0, 1},
  {&__pyx_n_u_cuCtxSetLimit, __pyx_k_cuCtxSetLimit, sizeof(__pyx_k_cuCtxSetLimit), 0, 1, 0, 1},
  {&__pyx_n_u_cuCtxSetSharedMemConfig, __pyx_k_cuCtxSetSharedMemConfig, sizeof(__pyx_k_cuCtxSetSharedMemConfig), 0, 1, 0, 1},
  {&__pyx_n_u_cuCtxSynchronize, __pyx_k_cuCtxSynchronize, sizeof(__pyx_k_cuCtxSynchronize), 0, 1, 0, 1},
  {&__pyx_n_u_cuDestroyExternalMemory, __pyx_k_cuDestroyExternalMemory, sizeof(__pyx_k_cuDestroyExternalMemory), 0, 1, 0, 1},
  {&__pyx_n_u_cuDestroyExternalSemaphore, __pyx_k_cuDestroyExternalSemaphore, sizeof(__pyx_k_cuDestroyExternalSemaphore), 0, 1, 0, 1},
  {&__pyx_n_u_cuDeviceCanAccessPeer, __pyx_k_cuDeviceCanAccessPeer, sizeof(__pyx_k_cuDeviceCanAccessPeer), 0, 1, 0, 1},
  {&__pyx_n_u_cuDeviceComputeCapability, __pyx_k_cuDeviceComputeCapability, sizeof(__pyx_k_cuDeviceComputeCapability), 0, 1, 0, 1},
  {&__pyx_n_u_cuDeviceGet, __pyx_k_cuDeviceGet, sizeof(__pyx_k_cuDeviceGet), 0, 1, 0, 1},
  {&__pyx_n_u_cuDeviceGetAttribute, __pyx_k_cuDeviceGetAttribute, sizeof(__pyx_k_cuDeviceGetAttribute), 0, 1, 0, 1},
  {&__pyx_n_u_cuDeviceGetByPCIBusId, __pyx_k_cuDeviceGetByPCIBusId, sizeof(__pyx_k_cuDeviceGetByPCIBusId), 0, 1, 0, 1},
  {&__pyx_n_u_cuDeviceGetCount, __pyx_k_cuDeviceGetCount, sizeof(__pyx_k_cuDeviceGetCount), 0, 1, 0, 1},
  {&__pyx_n_u_cuDeviceGetDefaultMemPool, __pyx_k_cuDeviceGetDefaultMemPool, sizeof(__pyx_k_cuDeviceGetDefaultMemPool), 0, 1, 0, 1},
  {&__pyx_n_u_cuDeviceGetExecAffinitySupport, __pyx_k_cuDeviceGetExecAffinitySupport, sizeof(__pyx_k_cuDeviceGetExecAffinitySupport), 0, 1, 0, 1},
  {&__pyx_n_u_cuDeviceGetGraphMemAttribute, __pyx_k_cuDeviceGetGraphMemAttribute, sizeof(__pyx_k_cuDeviceGetGraphMemAttribute), 0, 1, 0, 1},
  {&__pyx_n_u_cuDeviceGetLuid, __pyx_k_cuDeviceGetLuid, sizeof(__pyx_k_cuDeviceGetLuid), 0, 1, 0, 1},
  {&__pyx_n_u_cuDeviceGetMemPool, __pyx_k_cuDeviceGetMemPool, sizeof(__pyx_k_cuDeviceGetMemPool), 0, 1, 0, 1},
  {&__pyx_n_u_cuDeviceGetName, __pyx_k_cuDeviceGetName, sizeof(__pyx_k_cuDeviceGetName), 0, 1, 0, 1},
  {&__pyx_n_u_cuDeviceGetNvSciSyncAttributes, __pyx_k_cuDeviceGetNvSciSyncAttributes, sizeof(__pyx_k_cuDeviceGetNvSciSyncAttributes), 0, 1, 0, 1},
  {&__pyx_n_u_cuDeviceGetP2PAttribute, __pyx_k_cuDeviceGetP2PAttribute, sizeof(__pyx_k_cuDeviceGetP2PAttribute), 0, 1, 0, 1},
  {&__pyx_n_u_cuDeviceGetPCIBusId, __pyx_k_cuDeviceGetPCIBusId, sizeof(__pyx_k_cuDeviceGetPCIBusId), 0, 1, 0, 1},
  {&__pyx_n_u_cuDeviceGetProperties, __pyx_k_cuDeviceGetProperties, sizeof(__pyx_k_cuDeviceGetProperties), 0, 1, 0, 1},
  {&__pyx_n_u_cuDeviceGetTexture1DLinearMaxWid, __pyx_k_cuDeviceGetTexture1DLinearMaxWid, sizeof(__pyx_k_cuDeviceGetTexture1DLinearMaxWid), 0, 1, 0, 1},
  {&__pyx_n_u_cuDeviceGetUuid, __pyx_k_cuDeviceGetUuid, sizeof(__pyx_k_cuDeviceGetUuid), 0, 1, 0, 1},
  {&__pyx_n_u_cuDeviceGetUuid_v2, __pyx_k_cuDeviceGetUuid_v2, sizeof(__pyx_k_cuDeviceGetUuid_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuDeviceGraphMemTrim, __pyx_k_cuDeviceGraphMemTrim, sizeof(__pyx_k_cuDeviceGraphMemTrim), 0, 1, 0, 1},
  {&__pyx_n_u_cuDevicePrimaryCtxGetState, __pyx_k_cuDevicePrimaryCtxGetState, sizeof(__pyx_k_cuDevicePrimaryCtxGetState), 0, 1, 0, 1},
  {&__pyx_n_u_cuDevicePrimaryCtxRelease_v2, __pyx_k_cuDevicePrimaryCtxRelease_v2, sizeof(__pyx_k_cuDevicePrimaryCtxRelease_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuDevicePrimaryCtxReset_v2, __pyx_k_cuDevicePrimaryCtxReset_v2, sizeof(__pyx_k_cuDevicePrimaryCtxReset_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuDevicePrimaryCtxRetain, __pyx_k_cuDevicePrimaryCtxRetain, sizeof(__pyx_k_cuDevicePrimaryCtxRetain), 0, 1, 0, 1},
  {&__pyx_n_u_cuDevicePrimaryCtxSetFlags_v2, __pyx_k_cuDevicePrimaryCtxSetFlags_v2, sizeof(__pyx_k_cuDevicePrimaryCtxSetFlags_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuDeviceSetGraphMemAttribute, __pyx_k_cuDeviceSetGraphMemAttribute, sizeof(__pyx_k_cuDeviceSetGraphMemAttribute), 0, 1, 0, 1},
  {&__pyx_n_u_cuDeviceSetMemPool, __pyx_k_cuDeviceSetMemPool, sizeof(__pyx_k_cuDeviceSetMemPool), 0, 1, 0, 1},
  {&__pyx_n_u_cuDeviceTotalMem_v2, __pyx_k_cuDeviceTotalMem_v2, sizeof(__pyx_k_cuDeviceTotalMem_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuDriverGetVersion, __pyx_k_cuDriverGetVersion, sizeof(__pyx_k_cuDriverGetVersion), 0, 1, 0, 1},
  {&__pyx_n_u_cuEGLStreamConsumerAcquireFrame, __pyx_k_cuEGLStreamConsumerAcquireFrame, sizeof(__pyx_k_cuEGLStreamConsumerAcquireFrame), 0, 1, 0, 1},
  {&__pyx_n_u_cuEGLStreamConsumerConnect, __pyx_k_cuEGLStreamConsumerConnect, sizeof(__pyx_k_cuEGLStreamConsumerConnect), 0, 1, 0, 1},
  {&__pyx_n_u_cuEGLStreamConsumerConnectWithFl, __pyx_k_cuEGLStreamConsumerConnectWithFl, sizeof(__pyx_k_cuEGLStreamConsumerConnectWithFl), 0, 1, 0, 1},
  {&__pyx_n_u_cuEGLStreamConsumerDisconnect, __pyx_k_cuEGLStreamConsumerDisconnect, sizeof(__pyx_k_cuEGLStreamConsumerDisconnect), 0, 1, 0, 1},
  {&__pyx_n_u_cuEGLStreamConsumerReleaseFrame, __pyx_k_cuEGLStreamConsumerReleaseFrame, sizeof(__pyx_k_cuEGLStreamConsumerReleaseFrame), 0, 1, 0, 1},
  {&__pyx_n_u_cuEGLStreamProducerConnect, __pyx_k_cuEGLStreamProducerConnect, sizeof(__pyx_k_cuEGLStreamProducerConnect), 0, 1, 0, 1},
  {&__pyx_n_u_cuEGLStreamProducerDisconnect, __pyx_k_cuEGLStreamProducerDisconnect, sizeof(__pyx_k_cuEGLStreamProducerDisconnect), 0, 1, 0, 1},
  {&__pyx_n_u_cuEGLStreamProducerPresentFrame, __pyx_k_cuEGLStreamProducerPresentFrame, sizeof(__pyx_k_cuEGLStreamProducerPresentFrame), 0, 1, 0, 1},
  {&__pyx_n_u_cuEGLStreamProducerReturnFrame, __pyx_k_cuEGLStreamProducerReturnFrame, sizeof(__pyx_k_cuEGLStreamProducerReturnFrame), 0, 1, 0, 1},
  {&__pyx_n_u_cuEventCreate, __pyx_k_cuEventCreate, sizeof(__pyx_k_cuEventCreate), 0, 1, 0, 1},
  {&__pyx_n_u_cuEventCreateFromEGLSync, __pyx_k_cuEventCreateFromEGLSync, sizeof(__pyx_k_cuEventCreateFromEGLSync), 0, 1, 0, 1},
  {&__pyx_n_u_cuEventDestroy_v2, __pyx_k_cuEventDestroy_v2, sizeof(__pyx_k_cuEventDestroy_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuEventElapsedTime, __pyx_k_cuEventElapsedTime, sizeof(__pyx_k_cuEventElapsedTime), 0, 1, 0, 1},
  {&__pyx_n_u_cuEventQuery, __pyx_k_cuEventQuery, sizeof(__pyx_k_cuEventQuery), 0, 1, 0, 1},
  {&__pyx_n_u_cuEventRecord, __pyx_k_cuEventRecord, sizeof(__pyx_k_cuEventRecord), 0, 1, 0, 1},
  {&__pyx_n_u_cuEventRecordWithFlags, __pyx_k_cuEventRecordWithFlags, sizeof(__pyx_k_cuEventRecordWithFlags), 0, 1, 0, 1},
  {&__pyx_n_u_cuEventRecordWithFlags_ptsz, __pyx_k_cuEventRecordWithFlags_ptsz, sizeof(__pyx_k_cuEventRecordWithFlags_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuEventRecord_ptsz, __pyx_k_cuEventRecord_ptsz, sizeof(__pyx_k_cuEventRecord_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuEventSynchronize, __pyx_k_cuEventSynchronize, sizeof(__pyx_k_cuEventSynchronize), 0, 1, 0, 1},
  {&__pyx_n_u_cuExternalMemoryGetMappedBuffer, __pyx_k_cuExternalMemoryGetMappedBuffer, sizeof(__pyx_k_cuExternalMemoryGetMappedBuffer), 0, 1, 0, 1},
  {&__pyx_n_u_cuExternalMemoryGetMappedMipmapp, __pyx_k_cuExternalMemoryGetMappedMipmapp, sizeof(__pyx_k_cuExternalMemoryGetMappedMipmapp), 0, 1, 0, 1},
  {&__pyx_n_u_cuFlushGPUDirectRDMAWrites, __pyx_k_cuFlushGPUDirectRDMAWrites, sizeof(__pyx_k_cuFlushGPUDirectRDMAWrites), 0, 1, 0, 1},
  {&__pyx_n_u_cuFuncGetAttribute, __pyx_k_cuFuncGetAttribute, sizeof(__pyx_k_cuFuncGetAttribute), 0, 1, 0, 1},
  {&__pyx_n_u_cuFuncGetModule, __pyx_k_cuFuncGetModule, sizeof(__pyx_k_cuFuncGetModule), 0, 1, 0, 1},
  {&__pyx_n_u_cuFuncSetAttribute, __pyx_k_cuFuncSetAttribute, sizeof(__pyx_k_cuFuncSetAttribute), 0, 1, 0, 1},
  {&__pyx_n_u_cuFuncSetBlockShape, __pyx_k_cuFuncSetBlockShape, sizeof(__pyx_k_cuFuncSetBlockShape), 0, 1, 0, 1},
  {&__pyx_n_u_cuFuncSetCacheConfig, __pyx_k_cuFuncSetCacheConfig, sizeof(__pyx_k_cuFuncSetCacheConfig), 0, 1, 0, 1},
  {&__pyx_n_u_cuFuncSetSharedMemConfig, __pyx_k_cuFuncSetSharedMemConfig, sizeof(__pyx_k_cuFuncSetSharedMemConfig), 0, 1, 0, 1},
  {&__pyx_n_u_cuFuncSetSharedSize, __pyx_k_cuFuncSetSharedSize, sizeof(__pyx_k_cuFuncSetSharedSize), 0, 1, 0, 1},
  {&__pyx_n_u_cuGLGetDevices_v2, __pyx_k_cuGLGetDevices_v2, sizeof(__pyx_k_cuGLGetDevices_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuGetErrorName, __pyx_k_cuGetErrorName, sizeof(__pyx_k_cuGetErrorName), 0, 1, 0, 1},
  {&__pyx_n_u_cuGetErrorString, __pyx_k_cuGetErrorString, sizeof(__pyx_k_cuGetErrorString), 0, 1, 0, 1},
  {&__pyx_n_u_cuGetExportTable, __pyx_k_cuGetExportTable, sizeof(__pyx_k_cuGetExportTable), 0, 1, 0, 1},
  {&__pyx_n_u_cuGetProcAddress_v2, __pyx_k_cuGetProcAddress_v2, sizeof(__pyx_k_cuGetProcAddress_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphAddBatchMemOpNode, __pyx_k_cuGraphAddBatchMemOpNode, sizeof(__pyx_k_cuGraphAddBatchMemOpNode), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphAddChildGraphNode, __pyx_k_cuGraphAddChildGraphNode, sizeof(__pyx_k_cuGraphAddChildGraphNode), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphAddDependencies, __pyx_k_cuGraphAddDependencies, sizeof(__pyx_k_cuGraphAddDependencies), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphAddEmptyNode, __pyx_k_cuGraphAddEmptyNode, sizeof(__pyx_k_cuGraphAddEmptyNode), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphAddEventRecordNode, __pyx_k_cuGraphAddEventRecordNode, sizeof(__pyx_k_cuGraphAddEventRecordNode), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphAddEventWaitNode, __pyx_k_cuGraphAddEventWaitNode, sizeof(__pyx_k_cuGraphAddEventWaitNode), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphAddExternalSemaphoresSign, __pyx_k_cuGraphAddExternalSemaphoresSign, sizeof(__pyx_k_cuGraphAddExternalSemaphoresSign), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphAddExternalSemaphoresWait, __pyx_k_cuGraphAddExternalSemaphoresWait, sizeof(__pyx_k_cuGraphAddExternalSemaphoresWait), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphAddHostNode, __pyx_k_cuGraphAddHostNode, sizeof(__pyx_k_cuGraphAddHostNode), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphAddKernelNode_v2, __pyx_k_cuGraphAddKernelNode_v2, sizeof(__pyx_k_cuGraphAddKernelNode_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphAddMemAllocNode, __pyx_k_cuGraphAddMemAllocNode, sizeof(__pyx_k_cuGraphAddMemAllocNode), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphAddMemFreeNode, __pyx_k_cuGraphAddMemFreeNode, sizeof(__pyx_k_cuGraphAddMemFreeNode), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphAddMemcpyNode, __pyx_k_cuGraphAddMemcpyNode, sizeof(__pyx_k_cuGraphAddMemcpyNode), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphAddMemsetNode, __pyx_k_cuGraphAddMemsetNode, sizeof(__pyx_k_cuGraphAddMemsetNode), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphAddNode, __pyx_k_cuGraphAddNode, sizeof(__pyx_k_cuGraphAddNode), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphBatchMemOpNodeGetParams, __pyx_k_cuGraphBatchMemOpNodeGetParams, sizeof(__pyx_k_cuGraphBatchMemOpNodeGetParams), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphBatchMemOpNodeSetParams, __pyx_k_cuGraphBatchMemOpNodeSetParams, sizeof(__pyx_k_cuGraphBatchMemOpNodeSetParams), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphChildGraphNodeGetGraph, __pyx_k_cuGraphChildGraphNodeGetGraph, sizeof(__pyx_k_cuGraphChildGraphNodeGetGraph), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphClone, __pyx_k_cuGraphClone, sizeof(__pyx_k_cuGraphClone), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphCreate, __pyx_k_cuGraphCreate, sizeof(__pyx_k_cuGraphCreate), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphDebugDotPrint, __pyx_k_cuGraphDebugDotPrint, sizeof(__pyx_k_cuGraphDebugDotPrint), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphDestroy, __pyx_k_cuGraphDestroy, sizeof(__pyx_k_cuGraphDestroy), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphDestroyNode, __pyx_k_cuGraphDestroyNode, sizeof(__pyx_k_cuGraphDestroyNode), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphEventRecordNodeGetEvent, __pyx_k_cuGraphEventRecordNodeGetEvent, sizeof(__pyx_k_cuGraphEventRecordNodeGetEvent), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphEventRecordNodeSetEvent, __pyx_k_cuGraphEventRecordNodeSetEvent, sizeof(__pyx_k_cuGraphEventRecordNodeSetEvent), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphEventWaitNodeGetEvent, __pyx_k_cuGraphEventWaitNodeGetEvent, sizeof(__pyx_k_cuGraphEventWaitNodeGetEvent), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphEventWaitNodeSetEvent, __pyx_k_cuGraphEventWaitNodeSetEvent, sizeof(__pyx_k_cuGraphEventWaitNodeSetEvent), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphExecBatchMemOpNodeSetPara, __pyx_k_cuGraphExecBatchMemOpNodeSetPara, sizeof(__pyx_k_cuGraphExecBatchMemOpNodeSetPara), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphExecChildGraphNodeSetPara, __pyx_k_cuGraphExecChildGraphNodeSetPara, sizeof(__pyx_k_cuGraphExecChildGraphNodeSetPara), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphExecDestroy, __pyx_k_cuGraphExecDestroy, sizeof(__pyx_k_cuGraphExecDestroy), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphExecEventRecordNodeSetEve, __pyx_k_cuGraphExecEventRecordNodeSetEve, sizeof(__pyx_k_cuGraphExecEventRecordNodeSetEve), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphExecEventWaitNodeSetEvent, __pyx_k_cuGraphExecEventWaitNodeSetEvent, sizeof(__pyx_k_cuGraphExecEventWaitNodeSetEvent), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphExecExternalSemaphoresSig, __pyx_k_cuGraphExecExternalSemaphoresSig, sizeof(__pyx_k_cuGraphExecExternalSemaphoresSig), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphExecExternalSemaphoresWai, __pyx_k_cuGraphExecExternalSemaphoresWai, sizeof(__pyx_k_cuGraphExecExternalSemaphoresWai), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphExecGetFlags, __pyx_k_cuGraphExecGetFlags, sizeof(__pyx_k_cuGraphExecGetFlags), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphExecHostNodeSetParams, __pyx_k_cuGraphExecHostNodeSetParams, sizeof(__pyx_k_cuGraphExecHostNodeSetParams), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphExecKernelNodeSetParams_v, __pyx_k_cuGraphExecKernelNodeSetParams_v, sizeof(__pyx_k_cuGraphExecKernelNodeSetParams_v), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphExecMemcpyNodeSetParams, __pyx_k_cuGraphExecMemcpyNodeSetParams, sizeof(__pyx_k_cuGraphExecMemcpyNodeSetParams), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphExecMemsetNodeSetParams, __pyx_k_cuGraphExecMemsetNodeSetParams, sizeof(__pyx_k_cuGraphExecMemsetNodeSetParams), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphExecNodeSetParams, __pyx_k_cuGraphExecNodeSetParams, sizeof(__pyx_k_cuGraphExecNodeSetParams), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphExecUpdate_v2, __pyx_k_cuGraphExecUpdate_v2, sizeof(__pyx_k_cuGraphExecUpdate_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphExternalSemaphoresSignalN, __pyx_k_cuGraphExternalSemaphoresSignalN, sizeof(__pyx_k_cuGraphExternalSemaphoresSignalN), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphExternalSemaphoresSignalN_2, __pyx_k_cuGraphExternalSemaphoresSignalN_2, sizeof(__pyx_k_cuGraphExternalSemaphoresSignalN_2), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphExternalSemaphoresWaitNod, __pyx_k_cuGraphExternalSemaphoresWaitNod, sizeof(__pyx_k_cuGraphExternalSemaphoresWaitNod), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphExternalSemaphoresWaitNod_2, __pyx_k_cuGraphExternalSemaphoresWaitNod_2, sizeof(__pyx_k_cuGraphExternalSemaphoresWaitNod_2), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphGetEdges, __pyx_k_cuGraphGetEdges, sizeof(__pyx_k_cuGraphGetEdges), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphGetNodes, __pyx_k_cuGraphGetNodes, sizeof(__pyx_k_cuGraphGetNodes), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphGetRootNodes, __pyx_k_cuGraphGetRootNodes, sizeof(__pyx_k_cuGraphGetRootNodes), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphHostNodeGetParams, __pyx_k_cuGraphHostNodeGetParams, sizeof(__pyx_k_cuGraphHostNodeGetParams), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphHostNodeSetParams, __pyx_k_cuGraphHostNodeSetParams, sizeof(__pyx_k_cuGraphHostNodeSetParams), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphInstantiateWithFlags, __pyx_k_cuGraphInstantiateWithFlags, sizeof(__pyx_k_cuGraphInstantiateWithFlags), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphInstantiateWithParams, __pyx_k_cuGraphInstantiateWithParams, sizeof(__pyx_k_cuGraphInstantiateWithParams), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphInstantiateWithParams_pts, __pyx_k_cuGraphInstantiateWithParams_pts, sizeof(__pyx_k_cuGraphInstantiateWithParams_pts), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphKernelNodeCopyAttributes, __pyx_k_cuGraphKernelNodeCopyAttributes, sizeof(__pyx_k_cuGraphKernelNodeCopyAttributes), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphKernelNodeGetAttribute, __pyx_k_cuGraphKernelNodeGetAttribute, sizeof(__pyx_k_cuGraphKernelNodeGetAttribute), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphKernelNodeGetParams_v2, __pyx_k_cuGraphKernelNodeGetParams_v2, sizeof(__pyx_k_cuGraphKernelNodeGetParams_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphKernelNodeSetAttribute, __pyx_k_cuGraphKernelNodeSetAttribute, sizeof(__pyx_k_cuGraphKernelNodeSetAttribute), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphKernelNodeSetParams_v2, __pyx_k_cuGraphKernelNodeSetParams_v2, sizeof(__pyx_k_cuGraphKernelNodeSetParams_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphLaunch, __pyx_k_cuGraphLaunch, sizeof(__pyx_k_cuGraphLaunch), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphLaunch_ptsz, __pyx_k_cuGraphLaunch_ptsz, sizeof(__pyx_k_cuGraphLaunch_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphMemAllocNodeGetParams, __pyx_k_cuGraphMemAllocNodeGetParams, sizeof(__pyx_k_cuGraphMemAllocNodeGetParams), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphMemFreeNodeGetParams, __pyx_k_cuGraphMemFreeNodeGetParams, sizeof(__pyx_k_cuGraphMemFreeNodeGetParams), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphMemcpyNodeGetParams, __pyx_k_cuGraphMemcpyNodeGetParams, sizeof(__pyx_k_cuGraphMemcpyNodeGetParams), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphMemcpyNodeSetParams, __pyx_k_cuGraphMemcpyNodeSetParams, sizeof(__pyx_k_cuGraphMemcpyNodeSetParams), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphMemsetNodeGetParams, __pyx_k_cuGraphMemsetNodeGetParams, sizeof(__pyx_k_cuGraphMemsetNodeGetParams), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphMemsetNodeSetParams, __pyx_k_cuGraphMemsetNodeSetParams, sizeof(__pyx_k_cuGraphMemsetNodeSetParams), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphNodeFindInClone, __pyx_k_cuGraphNodeFindInClone, sizeof(__pyx_k_cuGraphNodeFindInClone), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphNodeGetDependencies, __pyx_k_cuGraphNodeGetDependencies, sizeof(__pyx_k_cuGraphNodeGetDependencies), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphNodeGetDependentNodes, __pyx_k_cuGraphNodeGetDependentNodes, sizeof(__pyx_k_cuGraphNodeGetDependentNodes), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphNodeGetEnabled, __pyx_k_cuGraphNodeGetEnabled, sizeof(__pyx_k_cuGraphNodeGetEnabled), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphNodeGetType, __pyx_k_cuGraphNodeGetType, sizeof(__pyx_k_cuGraphNodeGetType), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphNodeSetEnabled, __pyx_k_cuGraphNodeSetEnabled, sizeof(__pyx_k_cuGraphNodeSetEnabled), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphNodeSetParams, __pyx_k_cuGraphNodeSetParams, sizeof(__pyx_k_cuGraphNodeSetParams), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphReleaseUserObject, __pyx_k_cuGraphReleaseUserObject, sizeof(__pyx_k_cuGraphReleaseUserObject), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphRemoveDependencies, __pyx_k_cuGraphRemoveDependencies, sizeof(__pyx_k_cuGraphRemoveDependencies), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphRetainUserObject, __pyx_k_cuGraphRetainUserObject, sizeof(__pyx_k_cuGraphRetainUserObject), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphUpload, __pyx_k_cuGraphUpload, sizeof(__pyx_k_cuGraphUpload), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphUpload_ptsz, __pyx_k_cuGraphUpload_ptsz, sizeof(__pyx_k_cuGraphUpload_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphicsEGLRegisterImage, __pyx_k_cuGraphicsEGLRegisterImage, sizeof(__pyx_k_cuGraphicsEGLRegisterImage), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphicsGLRegisterBuffer, __pyx_k_cuGraphicsGLRegisterBuffer, sizeof(__pyx_k_cuGraphicsGLRegisterBuffer), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphicsGLRegisterImage, __pyx_k_cuGraphicsGLRegisterImage, sizeof(__pyx_k_cuGraphicsGLRegisterImage), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphicsMapResources, __pyx_k_cuGraphicsMapResources, sizeof(__pyx_k_cuGraphicsMapResources), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphicsMapResources_ptsz, __pyx_k_cuGraphicsMapResources_ptsz, sizeof(__pyx_k_cuGraphicsMapResources_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphicsResourceGetMappedEglFr, __pyx_k_cuGraphicsResourceGetMappedEglFr, sizeof(__pyx_k_cuGraphicsResourceGetMappedEglFr), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphicsResourceGetMappedMipma, __pyx_k_cuGraphicsResourceGetMappedMipma, sizeof(__pyx_k_cuGraphicsResourceGetMappedMipma), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphicsResourceGetMappedPoint, __pyx_k_cuGraphicsResourceGetMappedPoint, sizeof(__pyx_k_cuGraphicsResourceGetMappedPoint), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphicsResourceSetMapFlags_v2, __pyx_k_cuGraphicsResourceSetMapFlags_v2, sizeof(__pyx_k_cuGraphicsResourceSetMapFlags_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphicsSubResourceGetMappedAr, __pyx_k_cuGraphicsSubResourceGetMappedAr, sizeof(__pyx_k_cuGraphicsSubResourceGetMappedAr), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphicsUnmapResources, __pyx_k_cuGraphicsUnmapResources, sizeof(__pyx_k_cuGraphicsUnmapResources), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphicsUnmapResources_ptsz, __pyx_k_cuGraphicsUnmapResources_ptsz, sizeof(__pyx_k_cuGraphicsUnmapResources_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphicsUnregisterResource, __pyx_k_cuGraphicsUnregisterResource, sizeof(__pyx_k_cuGraphicsUnregisterResource), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphicsVDPAURegisterOutputSur, __pyx_k_cuGraphicsVDPAURegisterOutputSur, sizeof(__pyx_k_cuGraphicsVDPAURegisterOutputSur), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphicsVDPAURegisterVideoSurf, __pyx_k_cuGraphicsVDPAURegisterVideoSurf, sizeof(__pyx_k_cuGraphicsVDPAURegisterVideoSurf), 0, 1, 0, 1},
  {&__pyx_n_u_cuImportExternalMemory, __pyx_k_cuImportExternalMemory, sizeof(__pyx_k_cuImportExternalMemory), 0, 1, 0, 1},
  {&__pyx_n_u_cuImportExternalSemaphore, __pyx_k_cuImportExternalSemaphore, sizeof(__pyx_k_cuImportExternalSemaphore), 0, 1, 0, 1},
  {&__pyx_n_u_cuInit, __pyx_k_cuInit, sizeof(__pyx_k_cuInit), 0, 1, 0, 1},
  {&__pyx_n_u_cuIpcCloseMemHandle, __pyx_k_cuIpcCloseMemHandle, sizeof(__pyx_k_cuIpcCloseMemHandle), 0, 1, 0, 1},
  {&__pyx_n_u_cuIpcGetEventHandle, __pyx_k_cuIpcGetEventHandle, sizeof(__pyx_k_cuIpcGetEventHandle), 0, 1, 0, 1},
  {&__pyx_n_u_cuIpcGetMemHandle, __pyx_k_cuIpcGetMemHandle, sizeof(__pyx_k_cuIpcGetMemHandle), 0, 1, 0, 1},
  {&__pyx_n_u_cuIpcOpenEventHandle, __pyx_k_cuIpcOpenEventHandle, sizeof(__pyx_k_cuIpcOpenEventHandle), 0, 1, 0, 1},
  {&__pyx_n_u_cuIpcOpenMemHandle_v2, __pyx_k_cuIpcOpenMemHandle_v2, sizeof(__pyx_k_cuIpcOpenMemHandle_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuKernelGetAttribute, __pyx_k_cuKernelGetAttribute, sizeof(__pyx_k_cuKernelGetAttribute), 0, 1, 0, 1},
  {&__pyx_n_u_cuKernelGetFunction, __pyx_k_cuKernelGetFunction, sizeof(__pyx_k_cuKernelGetFunction), 0, 1, 0, 1},
  {&__pyx_n_u_cuKernelSetAttribute, __pyx_k_cuKernelSetAttribute, sizeof(__pyx_k_cuKernelSetAttribute), 0, 1, 0, 1},
  {&__pyx_n_u_cuKernelSetCacheConfig, __pyx_k_cuKernelSetCacheConfig, sizeof(__pyx_k_cuKernelSetCacheConfig), 0, 1, 0, 1},
  {&__pyx_n_u_cuLaunch, __pyx_k_cuLaunch, sizeof(__pyx_k_cuLaunch), 0, 1, 0, 1},
  {&__pyx_n_u_cuLaunchCooperativeKernel, __pyx_k_cuLaunchCooperativeKernel, sizeof(__pyx_k_cuLaunchCooperativeKernel), 0, 1, 0, 1},
  {&__pyx_n_u_cuLaunchCooperativeKernelMultiDe, __pyx_k_cuLaunchCooperativeKernelMultiDe, sizeof(__pyx_k_cuLaunchCooperativeKernelMultiDe), 0, 1, 0, 1},
  {&__pyx_n_u_cuLaunchCooperativeKernel_ptsz, __pyx_k_cuLaunchCooperativeKernel_ptsz, sizeof(__pyx_k_cuLaunchCooperativeKernel_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuLaunchGrid, __pyx_k_cuLaunchGrid, sizeof(__pyx_k_cuLaunchGrid), 0, 1, 0, 1},
  {&__pyx_n_u_cuLaunchGridAsync, __pyx_k_cuLaunchGridAsync, sizeof(__pyx_k_cuLaunchGridAsync), 0, 1, 0, 1},
  {&__pyx_n_u_cuLaunchHostFunc, __pyx_k_cuLaunchHostFunc, sizeof(__pyx_k_cuLaunchHostFunc), 0, 1, 0, 1},
  {&__pyx_n_u_cuLaunchHostFunc_ptsz, __pyx_k_cuLaunchHostFunc_ptsz, sizeof(__pyx_k_cuLaunchHostFunc_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuLaunchKernel, __pyx_k_cuLaunchKernel, sizeof(__pyx_k_cuLaunchKernel), 0, 1, 0, 1},
  {&__pyx_n_u_cuLaunchKernelEx, __pyx_k_cuLaunchKernelEx, sizeof(__pyx_k_cuLaunchKernelEx), 0, 1, 0, 1},
  {&__pyx_n_u_cuLaunchKernelEx_ptsz, __pyx_k_cuLaunchKernelEx_ptsz, sizeof(__pyx_k_cuLaunchKernelEx_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuLaunchKernel_ptsz, __pyx_k_cuLaunchKernel_ptsz, sizeof(__pyx_k_cuLaunchKernel_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuLibraryGetGlobal, __pyx_k_cuLibraryGetGlobal, sizeof(__pyx_k_cuLibraryGetGlobal), 0, 1, 0, 1},
  {&__pyx_n_u_cuLibraryGetKernel, __pyx_k_cuLibraryGetKernel, sizeof(__pyx_k_cuLibraryGetKernel), 0, 1, 0, 1},
  {&__pyx_n_u_cuLibraryGetManaged, __pyx_k_cuLibraryGetManaged, sizeof(__pyx_k_cuLibraryGetManaged), 0, 1, 0, 1},
  {&__pyx_n_u_cuLibraryGetModule, __pyx_k_cuLibraryGetModule, sizeof(__pyx_k_cuLibraryGetModule), 0, 1, 0, 1},
  {&__pyx_n_u_cuLibraryGetUnifiedFunction, __pyx_k_cuLibraryGetUnifiedFunction, sizeof(__pyx_k_cuLibraryGetUnifiedFunction), 0, 1, 0, 1},
  {&__pyx_n_u_cuLibraryLoadData, __pyx_k_cuLibraryLoadData, sizeof(__pyx_k_cuLibraryLoadData), 0, 1, 0, 1},
  {&__pyx_n_u_cuLibraryLoadFromFile, __pyx_k_cuLibraryLoadFromFile, sizeof(__pyx_k_cuLibraryLoadFromFile), 0, 1, 0, 1},
  {&__pyx_n_u_cuLibraryUnload, __pyx_k_cuLibraryUnload, sizeof(__pyx_k_cuLibraryUnload), 0, 1, 0, 1},
  {&__pyx_n_u_cuLinkAddData_v2, __pyx_k_cuLinkAddData_v2, sizeof(__pyx_k_cuLinkAddData_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuLinkAddFile_v2, __pyx_k_cuLinkAddFile_v2, sizeof(__pyx_k_cuLinkAddFile_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuLinkComplete, __pyx_k_cuLinkComplete, sizeof(__pyx_k_cuLinkComplete), 0, 1, 0, 1},
  {&__pyx_n_u_cuLinkCreate_v2, __pyx_k_cuLinkCreate_v2, sizeof(__pyx_k_cuLinkCreate_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuLinkDestroy, __pyx_k_cuLinkDestroy, sizeof(__pyx_k_cuLinkDestroy), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemAddressFree, __pyx_k_cuMemAddressFree, sizeof(__pyx_k_cuMemAddressFree), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemAddressReserve, __pyx_k_cuMemAddressReserve, sizeof(__pyx_k_cuMemAddressReserve), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemAdvise, __pyx_k_cuMemAdvise, sizeof(__pyx_k_cuMemAdvise), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemAdvise_v2, __pyx_k_cuMemAdvise_v2, sizeof(__pyx_k_cuMemAdvise_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemAllocAsync, __pyx_k_cuMemAllocAsync, sizeof(__pyx_k_cuMemAllocAsync), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemAllocAsync_ptsz, __pyx_k_cuMemAllocAsync_ptsz, sizeof(__pyx_k_cuMemAllocAsync_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemAllocFromPoolAsync, __pyx_k_cuMemAllocFromPoolAsync, sizeof(__pyx_k_cuMemAllocFromPoolAsync), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemAllocFromPoolAsync_ptsz, __pyx_k_cuMemAllocFromPoolAsync_ptsz, sizeof(__pyx_k_cuMemAllocFromPoolAsync_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemAllocHost_v2, __pyx_k_cuMemAllocHost_v2, sizeof(__pyx_k_cuMemAllocHost_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemAllocManaged, __pyx_k_cuMemAllocManaged, sizeof(__pyx_k_cuMemAllocManaged), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemAllocPitch_v2, __pyx_k_cuMemAllocPitch_v2, sizeof(__pyx_k_cuMemAllocPitch_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemAlloc_v2, __pyx_k_cuMemAlloc_v2, sizeof(__pyx_k_cuMemAlloc_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemCreate, __pyx_k_cuMemCreate, sizeof(__pyx_k_cuMemCreate), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemExportToShareableHandle, __pyx_k_cuMemExportToShareableHandle, sizeof(__pyx_k_cuMemExportToShareableHandle), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemFreeAsync, __pyx_k_cuMemFreeAsync, sizeof(__pyx_k_cuMemFreeAsync), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemFreeAsync_ptsz, __pyx_k_cuMemFreeAsync_ptsz, sizeof(__pyx_k_cuMemFreeAsync_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemFreeHost, __pyx_k_cuMemFreeHost, sizeof(__pyx_k_cuMemFreeHost), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemFree_v2, __pyx_k_cuMemFree_v2, sizeof(__pyx_k_cuMemFree_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemGetAccess, __pyx_k_cuMemGetAccess, sizeof(__pyx_k_cuMemGetAccess), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemGetAddressRange_v2, __pyx_k_cuMemGetAddressRange_v2, sizeof(__pyx_k_cuMemGetAddressRange_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemGetAllocationGranularity, __pyx_k_cuMemGetAllocationGranularity, sizeof(__pyx_k_cuMemGetAllocationGranularity), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemGetAllocationPropertiesFrom, __pyx_k_cuMemGetAllocationPropertiesFrom, sizeof(__pyx_k_cuMemGetAllocationPropertiesFrom), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemGetHandleForAddressRange, __pyx_k_cuMemGetHandleForAddressRange, sizeof(__pyx_k_cuMemGetHandleForAddressRange), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemGetInfo_v2, __pyx_k_cuMemGetInfo_v2, sizeof(__pyx_k_cuMemGetInfo_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemHostAlloc, __pyx_k_cuMemHostAlloc, sizeof(__pyx_k_cuMemHostAlloc), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemHostGetDevicePointer_v2, __pyx_k_cuMemHostGetDevicePointer_v2, sizeof(__pyx_k_cuMemHostGetDevicePointer_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemHostGetFlags, __pyx_k_cuMemHostGetFlags, sizeof(__pyx_k_cuMemHostGetFlags), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemHostRegister_v2, __pyx_k_cuMemHostRegister_v2, sizeof(__pyx_k_cuMemHostRegister_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemHostUnregister, __pyx_k_cuMemHostUnregister, sizeof(__pyx_k_cuMemHostUnregister), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemImportFromShareableHandle, __pyx_k_cuMemImportFromShareableHandle, sizeof(__pyx_k_cuMemImportFromShareableHandle), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemMap, __pyx_k_cuMemMap, sizeof(__pyx_k_cuMemMap), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemMapArrayAsync, __pyx_k_cuMemMapArrayAsync, sizeof(__pyx_k_cuMemMapArrayAsync), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemMapArrayAsync_ptsz, __pyx_k_cuMemMapArrayAsync_ptsz, sizeof(__pyx_k_cuMemMapArrayAsync_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemPoolCreate, __pyx_k_cuMemPoolCreate, sizeof(__pyx_k_cuMemPoolCreate), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemPoolDestroy, __pyx_k_cuMemPoolDestroy, sizeof(__pyx_k_cuMemPoolDestroy), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemPoolExportPointer, __pyx_k_cuMemPoolExportPointer, sizeof(__pyx_k_cuMemPoolExportPointer), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemPoolExportToShareableHandle, __pyx_k_cuMemPoolExportToShareableHandle, sizeof(__pyx_k_cuMemPoolExportToShareableHandle), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemPoolGetAccess, __pyx_k_cuMemPoolGetAccess, sizeof(__pyx_k_cuMemPoolGetAccess), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemPoolGetAttribute, __pyx_k_cuMemPoolGetAttribute, sizeof(__pyx_k_cuMemPoolGetAttribute), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemPoolImportFromShareableHand, __pyx_k_cuMemPoolImportFromShareableHand, sizeof(__pyx_k_cuMemPoolImportFromShareableHand), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemPoolImportPointer, __pyx_k_cuMemPoolImportPointer, sizeof(__pyx_k_cuMemPoolImportPointer), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemPoolSetAccess, __pyx_k_cuMemPoolSetAccess, sizeof(__pyx_k_cuMemPoolSetAccess), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemPoolSetAttribute, __pyx_k_cuMemPoolSetAttribute, sizeof(__pyx_k_cuMemPoolSetAttribute), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemPoolTrimTo, __pyx_k_cuMemPoolTrimTo, sizeof(__pyx_k_cuMemPoolTrimTo), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemPrefetchAsync, __pyx_k_cuMemPrefetchAsync, sizeof(__pyx_k_cuMemPrefetchAsync), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemPrefetchAsync_ptsz, __pyx_k_cuMemPrefetchAsync_ptsz, sizeof(__pyx_k_cuMemPrefetchAsync_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemPrefetchAsync_v2, __pyx_k_cuMemPrefetchAsync_v2, sizeof(__pyx_k_cuMemPrefetchAsync_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemPrefetchAsync_v2_ptsz, __pyx_k_cuMemPrefetchAsync_v2_ptsz, sizeof(__pyx_k_cuMemPrefetchAsync_v2_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemRangeGetAttribute, __pyx_k_cuMemRangeGetAttribute, sizeof(__pyx_k_cuMemRangeGetAttribute), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemRangeGetAttributes, __pyx_k_cuMemRangeGetAttributes, sizeof(__pyx_k_cuMemRangeGetAttributes), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemRelease, __pyx_k_cuMemRelease, sizeof(__pyx_k_cuMemRelease), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemRetainAllocationHandle, __pyx_k_cuMemRetainAllocationHandle, sizeof(__pyx_k_cuMemRetainAllocationHandle), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemSetAccess, __pyx_k_cuMemSetAccess, sizeof(__pyx_k_cuMemSetAccess), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemUnmap, __pyx_k_cuMemUnmap, sizeof(__pyx_k_cuMemUnmap), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpy, __pyx_k_cuMemcpy, sizeof(__pyx_k_cuMemcpy), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpy2DAsync_v2, __pyx_k_cuMemcpy2DAsync_v2, sizeof(__pyx_k_cuMemcpy2DAsync_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpy2DAsync_v2_ptsz, __pyx_k_cuMemcpy2DAsync_v2_ptsz, sizeof(__pyx_k_cuMemcpy2DAsync_v2_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpy2DUnaligned_v2, __pyx_k_cuMemcpy2DUnaligned_v2, sizeof(__pyx_k_cuMemcpy2DUnaligned_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpy2DUnaligned_v2_ptds, __pyx_k_cuMemcpy2DUnaligned_v2_ptds, sizeof(__pyx_k_cuMemcpy2DUnaligned_v2_ptds), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpy2D_v2, __pyx_k_cuMemcpy2D_v2, sizeof(__pyx_k_cuMemcpy2D_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpy2D_v2_ptds, __pyx_k_cuMemcpy2D_v2_ptds, sizeof(__pyx_k_cuMemcpy2D_v2_ptds), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpy3DAsync_v2, __pyx_k_cuMemcpy3DAsync_v2, sizeof(__pyx_k_cuMemcpy3DAsync_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpy3DAsync_v2_ptsz, __pyx_k_cuMemcpy3DAsync_v2_ptsz, sizeof(__pyx_k_cuMemcpy3DAsync_v2_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpy3DPeer, __pyx_k_cuMemcpy3DPeer, sizeof(__pyx_k_cuMemcpy3DPeer), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpy3DPeerAsync, __pyx_k_cuMemcpy3DPeerAsync, sizeof(__pyx_k_cuMemcpy3DPeerAsync), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpy3DPeerAsync_ptsz, __pyx_k_cuMemcpy3DPeerAsync_ptsz, sizeof(__pyx_k_cuMemcpy3DPeerAsync_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpy3DPeer_ptds, __pyx_k_cuMemcpy3DPeer_ptds, sizeof(__pyx_k_cuMemcpy3DPeer_ptds), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpy3D_v2, __pyx_k_cuMemcpy3D_v2, sizeof(__pyx_k_cuMemcpy3D_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpy3D_v2_ptds, __pyx_k_cuMemcpy3D_v2_ptds, sizeof(__pyx_k_cuMemcpy3D_v2_ptds), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyAsync, __pyx_k_cuMemcpyAsync, sizeof(__pyx_k_cuMemcpyAsync), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyAsync_ptsz, __pyx_k_cuMemcpyAsync_ptsz, sizeof(__pyx_k_cuMemcpyAsync_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyAtoA_v2, __pyx_k_cuMemcpyAtoA_v2, sizeof(__pyx_k_cuMemcpyAtoA_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyAtoA_v2_ptds, __pyx_k_cuMemcpyAtoA_v2_ptds, sizeof(__pyx_k_cuMemcpyAtoA_v2_ptds), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyAtoD_v2, __pyx_k_cuMemcpyAtoD_v2, sizeof(__pyx_k_cuMemcpyAtoD_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyAtoD_v2_ptds, __pyx_k_cuMemcpyAtoD_v2_ptds, sizeof(__pyx_k_cuMemcpyAtoD_v2_ptds), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyAtoHAsync_v2, __pyx_k_cuMemcpyAtoHAsync_v2, sizeof(__pyx_k_cuMemcpyAtoHAsync_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyAtoHAsync_v2_ptsz, __pyx_k_cuMemcpyAtoHAsync_v2_ptsz, sizeof(__pyx_k_cuMemcpyAtoHAsync_v2_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyAtoH_v2, __pyx_k_cuMemcpyAtoH_v2, sizeof(__pyx_k_cuMemcpyAtoH_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyAtoH_v2_ptds, __pyx_k_cuMemcpyAtoH_v2_ptds, sizeof(__pyx_k_cuMemcpyAtoH_v2_ptds), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyDtoA_v2, __pyx_k_cuMemcpyDtoA_v2, sizeof(__pyx_k_cuMemcpyDtoA_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyDtoA_v2_ptds, __pyx_k_cuMemcpyDtoA_v2_ptds, sizeof(__pyx_k_cuMemcpyDtoA_v2_ptds), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyDtoDAsync_v2, __pyx_k_cuMemcpyDtoDAsync_v2, sizeof(__pyx_k_cuMemcpyDtoDAsync_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyDtoDAsync_v2_ptsz, __pyx_k_cuMemcpyDtoDAsync_v2_ptsz, sizeof(__pyx_k_cuMemcpyDtoDAsync_v2_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyDtoD_v2, __pyx_k_cuMemcpyDtoD_v2, sizeof(__pyx_k_cuMemcpyDtoD_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyDtoD_v2_ptds, __pyx_k_cuMemcpyDtoD_v2_ptds, sizeof(__pyx_k_cuMemcpyDtoD_v2_ptds), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyDtoHAsync_v2, __pyx_k_cuMemcpyDtoHAsync_v2, sizeof(__pyx_k_cuMemcpyDtoHAsync_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyDtoHAsync_v2_ptsz, __pyx_k_cuMemcpyDtoHAsync_v2_ptsz, sizeof(__pyx_k_cuMemcpyDtoHAsync_v2_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyDtoH_v2, __pyx_k_cuMemcpyDtoH_v2, sizeof(__pyx_k_cuMemcpyDtoH_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyDtoH_v2_ptds, __pyx_k_cuMemcpyDtoH_v2_ptds, sizeof(__pyx_k_cuMemcpyDtoH_v2_ptds), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyHtoAAsync_v2, __pyx_k_cuMemcpyHtoAAsync_v2, sizeof(__pyx_k_cuMemcpyHtoAAsync_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyHtoAAsync_v2_ptsz, __pyx_k_cuMemcpyHtoAAsync_v2_ptsz, sizeof(__pyx_k_cuMemcpyHtoAAsync_v2_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyHtoA_v2, __pyx_k_cuMemcpyHtoA_v2, sizeof(__pyx_k_cuMemcpyHtoA_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyHtoA_v2_ptds, __pyx_k_cuMemcpyHtoA_v2_ptds, sizeof(__pyx_k_cuMemcpyHtoA_v2_ptds), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyHtoDAsync_v2, __pyx_k_cuMemcpyHtoDAsync_v2, sizeof(__pyx_k_cuMemcpyHtoDAsync_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyHtoDAsync_v2_ptsz, __pyx_k_cuMemcpyHtoDAsync_v2_ptsz, sizeof(__pyx_k_cuMemcpyHtoDAsync_v2_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyHtoD_v2, __pyx_k_cuMemcpyHtoD_v2, sizeof(__pyx_k_cuMemcpyHtoD_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyHtoD_v2_ptds, __pyx_k_cuMemcpyHtoD_v2_ptds, sizeof(__pyx_k_cuMemcpyHtoD_v2_ptds), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyPeer, __pyx_k_cuMemcpyPeer, sizeof(__pyx_k_cuMemcpyPeer), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyPeerAsync, __pyx_k_cuMemcpyPeerAsync, sizeof(__pyx_k_cuMemcpyPeerAsync), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyPeerAsync_ptsz, __pyx_k_cuMemcpyPeerAsync_ptsz, sizeof(__pyx_k_cuMemcpyPeerAsync_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpyPeer_ptds, __pyx_k_cuMemcpyPeer_ptds, sizeof(__pyx_k_cuMemcpyPeer_ptds), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemcpy_ptds, __pyx_k_cuMemcpy_ptds, sizeof(__pyx_k_cuMemcpy_ptds), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemsetD16Async, __pyx_k_cuMemsetD16Async, sizeof(__pyx_k_cuMemsetD16Async), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemsetD16Async_ptsz, __pyx_k_cuMemsetD16Async_ptsz, sizeof(__pyx_k_cuMemsetD16Async_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemsetD16_v2, __pyx_k_cuMemsetD16_v2, sizeof(__pyx_k_cuMemsetD16_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemsetD16_v2_ptds, __pyx_k_cuMemsetD16_v2_ptds, sizeof(__pyx_k_cuMemsetD16_v2_ptds), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemsetD2D16Async, __pyx_k_cuMemsetD2D16Async, sizeof(__pyx_k_cuMemsetD2D16Async), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemsetD2D16Async_ptsz, __pyx_k_cuMemsetD2D16Async_ptsz, sizeof(__pyx_k_cuMemsetD2D16Async_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemsetD2D16_v2, __pyx_k_cuMemsetD2D16_v2, sizeof(__pyx_k_cuMemsetD2D16_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemsetD2D16_v2_ptds, __pyx_k_cuMemsetD2D16_v2_ptds, sizeof(__pyx_k_cuMemsetD2D16_v2_ptds), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemsetD2D32Async, __pyx_k_cuMemsetD2D32Async, sizeof(__pyx_k_cuMemsetD2D32Async), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemsetD2D32Async_ptsz, __pyx_k_cuMemsetD2D32Async_ptsz, sizeof(__pyx_k_cuMemsetD2D32Async_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemsetD2D32_v2, __pyx_k_cuMemsetD2D32_v2, sizeof(__pyx_k_cuMemsetD2D32_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemsetD2D32_v2_ptds, __pyx_k_cuMemsetD2D32_v2_ptds, sizeof(__pyx_k_cuMemsetD2D32_v2_ptds), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemsetD2D8Async, __pyx_k_cuMemsetD2D8Async, sizeof(__pyx_k_cuMemsetD2D8Async), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemsetD2D8Async_ptsz, __pyx_k_cuMemsetD2D8Async_ptsz, sizeof(__pyx_k_cuMemsetD2D8Async_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemsetD2D8_v2, __pyx_k_cuMemsetD2D8_v2, sizeof(__pyx_k_cuMemsetD2D8_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemsetD2D8_v2_ptds, __pyx_k_cuMemsetD2D8_v2_ptds, sizeof(__pyx_k_cuMemsetD2D8_v2_ptds), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemsetD32Async, __pyx_k_cuMemsetD32Async, sizeof(__pyx_k_cuMemsetD32Async), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemsetD32Async_ptsz, __pyx_k_cuMemsetD32Async_ptsz, sizeof(__pyx_k_cuMemsetD32Async_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemsetD32_v2, __pyx_k_cuMemsetD32_v2, sizeof(__pyx_k_cuMemsetD32_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemsetD32_v2_ptds, __pyx_k_cuMemsetD32_v2_ptds, sizeof(__pyx_k_cuMemsetD32_v2_ptds), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemsetD8Async, __pyx_k_cuMemsetD8Async, sizeof(__pyx_k_cuMemsetD8Async), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemsetD8Async_ptsz, __pyx_k_cuMemsetD8Async_ptsz, sizeof(__pyx_k_cuMemsetD8Async_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemsetD8_v2, __pyx_k_cuMemsetD8_v2, sizeof(__pyx_k_cuMemsetD8_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuMemsetD8_v2_ptds, __pyx_k_cuMemsetD8_v2_ptds, sizeof(__pyx_k_cuMemsetD8_v2_ptds), 0, 1, 0, 1},
  {&__pyx_n_u_cuMipmappedArrayCreate, __pyx_k_cuMipmappedArrayCreate, sizeof(__pyx_k_cuMipmappedArrayCreate), 0, 1, 0, 1},
  {&__pyx_n_u_cuMipmappedArrayDestroy, __pyx_k_cuMipmappedArrayDestroy, sizeof(__pyx_k_cuMipmappedArrayDestroy), 0, 1, 0, 1},
  {&__pyx_n_u_cuMipmappedArrayGetLevel, __pyx_k_cuMipmappedArrayGetLevel, sizeof(__pyx_k_cuMipmappedArrayGetLevel), 0, 1, 0, 1},
  {&__pyx_n_u_cuMipmappedArrayGetMemoryRequire, __pyx_k_cuMipmappedArrayGetMemoryRequire, sizeof(__pyx_k_cuMipmappedArrayGetMemoryRequire), 0, 1, 0, 1},
  {&__pyx_n_u_cuMipmappedArrayGetSparsePropert, __pyx_k_cuMipmappedArrayGetSparsePropert, sizeof(__pyx_k_cuMipmappedArrayGetSparsePropert), 0, 1, 0, 1},
  {&__pyx_n_u_cuModuleGetFunction, __pyx_k_cuModuleGetFunction, sizeof(__pyx_k_cuModuleGetFunction), 0, 1, 0, 1},
  {&__pyx_n_u_cuModuleGetGlobal_v2, __pyx_k_cuModuleGetGlobal_v2, sizeof(__pyx_k_cuModuleGetGlobal_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuModuleGetLoadingMode, __pyx_k_cuModuleGetLoadingMode, sizeof(__pyx_k_cuModuleGetLoadingMode), 0, 1, 0, 1},
  {&__pyx_n_u_cuModuleGetSurfRef, __pyx_k_cuModuleGetSurfRef, sizeof(__pyx_k_cuModuleGetSurfRef), 0, 1, 0, 1},
  {&__pyx_n_u_cuModuleGetTexRef, __pyx_k_cuModuleGetTexRef, sizeof(__pyx_k_cuModuleGetTexRef), 0, 1, 0, 1},
  {&__pyx_n_u_cuModuleLoad, __pyx_k_cuModuleLoad, sizeof(__pyx_k_cuModuleLoad), 0, 1, 0, 1},
  {&__pyx_n_u_cuModuleLoadData, __pyx_k_cuModuleLoadData, sizeof(__pyx_k_cuModuleLoadData), 0, 1, 0, 1},
  {&__pyx_n_u_cuModuleLoadDataEx, __pyx_k_cuModuleLoadDataEx, sizeof(__pyx_k_cuModuleLoadDataEx), 0, 1, 0, 1},
  {&__pyx_n_u_cuModuleLoadFatBinary, __pyx_k_cuModuleLoadFatBinary, sizeof(__pyx_k_cuModuleLoadFatBinary), 0, 1, 0, 1},
  {&__pyx_n_u_cuModuleUnload, __pyx_k_cuModuleUnload, sizeof(__pyx_k_cuModuleUnload), 0, 1, 0, 1},
  {&__pyx_n_u_cuMulticastAddDevice, __pyx_k_cuMulticastAddDevice, sizeof(__pyx_k_cuMulticastAddDevice), 0, 1, 0, 1},
  {&__pyx_n_u_cuMulticastBindAddr, __pyx_k_cuMulticastBindAddr, sizeof(__pyx_k_cuMulticastBindAddr), 0, 1, 0, 1},
  {&__pyx_n_u_cuMulticastBindMem, __pyx_k_cuMulticastBindMem, sizeof(__pyx_k_cuMulticastBindMem), 0, 1, 0, 1},
  {&__pyx_n_u_cuMulticastCreate, __pyx_k_cuMulticastCreate, sizeof(__pyx_k_cuMulticastCreate), 0, 1, 0, 1},
  {&__pyx_n_u_cuMulticastGetGranularity, __pyx_k_cuMulticastGetGranularity, sizeof(__pyx_k_cuMulticastGetGranularity), 0, 1, 0, 1},
  {&__pyx_n_u_cuMulticastUnbind, __pyx_k_cuMulticastUnbind, sizeof(__pyx_k_cuMulticastUnbind), 0, 1, 0, 1},
  {&__pyx_n_u_cuOccupancyAvailableDynamicSMemP, __pyx_k_cuOccupancyAvailableDynamicSMemP, sizeof(__pyx_k_cuOccupancyAvailableDynamicSMemP), 0, 1, 0, 1},
  {&__pyx_n_u_cuOccupancyMaxActiveBlocksPerMul, __pyx_k_cuOccupancyMaxActiveBlocksPerMul, sizeof(__pyx_k_cuOccupancyMaxActiveBlocksPerMul), 0, 1, 0, 1},
  {&__pyx_n_u_cuOccupancyMaxActiveBlocksPerMul_2, __pyx_k_cuOccupancyMaxActiveBlocksPerMul_2, sizeof(__pyx_k_cuOccupancyMaxActiveBlocksPerMul_2), 0, 1, 0, 1},
  {&__pyx_n_u_cuOccupancyMaxActiveClusters, __pyx_k_cuOccupancyMaxActiveClusters, sizeof(__pyx_k_cuOccupancyMaxActiveClusters), 0, 1, 0, 1},
  {&__pyx_n_u_cuOccupancyMaxPotentialBlockSize, __pyx_k_cuOccupancyMaxPotentialBlockSize, sizeof(__pyx_k_cuOccupancyMaxPotentialBlockSize), 0, 1, 0, 1},
  {&__pyx_n_u_cuOccupancyMaxPotentialBlockSize_2, __pyx_k_cuOccupancyMaxPotentialBlockSize_2, sizeof(__pyx_k_cuOccupancyMaxPotentialBlockSize_2), 0, 1, 0, 1},
  {&__pyx_n_u_cuOccupancyMaxPotentialClusterSi, __pyx_k_cuOccupancyMaxPotentialClusterSi, sizeof(__pyx_k_cuOccupancyMaxPotentialClusterSi), 0, 1, 0, 1},
  {&__pyx_n_u_cuParamSetSize, __pyx_k_cuParamSetSize, sizeof(__pyx_k_cuParamSetSize), 0, 1, 0, 1},
  {&__pyx_n_u_cuParamSetTexRef, __pyx_k_cuParamSetTexRef, sizeof(__pyx_k_cuParamSetTexRef), 0, 1, 0, 1},
  {&__pyx_n_u_cuParamSetf, __pyx_k_cuParamSetf, sizeof(__pyx_k_cuParamSetf), 0, 1, 0, 1},
  {&__pyx_n_u_cuParamSeti, __pyx_k_cuParamSeti, sizeof(__pyx_k_cuParamSeti), 0, 1, 0, 1},
  {&__pyx_n_u_cuParamSetv, __pyx_k_cuParamSetv, sizeof(__pyx_k_cuParamSetv), 0, 1, 0, 1},
  {&__pyx_n_u_cuPointerGetAttribute, __pyx_k_cuPointerGetAttribute, sizeof(__pyx_k_cuPointerGetAttribute), 0, 1, 0, 1},
  {&__pyx_n_u_cuPointerGetAttributes, __pyx_k_cuPointerGetAttributes, sizeof(__pyx_k_cuPointerGetAttributes), 0, 1, 0, 1},
  {&__pyx_n_u_cuPointerSetAttribute, __pyx_k_cuPointerSetAttribute, sizeof(__pyx_k_cuPointerSetAttribute), 0, 1, 0, 1},
  {&__pyx_n_u_cuProfilerStart, __pyx_k_cuProfilerStart, sizeof(__pyx_k_cuProfilerStart), 0, 1, 0, 1},
  {&__pyx_n_u_cuProfilerStop, __pyx_k_cuProfilerStop, sizeof(__pyx_k_cuProfilerStop), 0, 1, 0, 1},
  {&__pyx_n_u_cuSignalExternalSemaphoresAsync, __pyx_k_cuSignalExternalSemaphoresAsync, sizeof(__pyx_k_cuSignalExternalSemaphoresAsync), 0, 1, 0, 1},
  {&__pyx_n_u_cuSignalExternalSemaphoresAsync_2, __pyx_k_cuSignalExternalSemaphoresAsync_2, sizeof(__pyx_k_cuSignalExternalSemaphoresAsync_2), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamAddCallback, __pyx_k_cuStreamAddCallback, sizeof(__pyx_k_cuStreamAddCallback), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamAddCallback_ptsz, __pyx_k_cuStreamAddCallback_ptsz, sizeof(__pyx_k_cuStreamAddCallback_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamAttachMemAsync, __pyx_k_cuStreamAttachMemAsync, sizeof(__pyx_k_cuStreamAttachMemAsync), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamAttachMemAsync_ptsz, __pyx_k_cuStreamAttachMemAsync_ptsz, sizeof(__pyx_k_cuStreamAttachMemAsync_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamBatchMemOp_v2, __pyx_k_cuStreamBatchMemOp_v2, sizeof(__pyx_k_cuStreamBatchMemOp_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamBatchMemOp_v2_ptsz, __pyx_k_cuStreamBatchMemOp_v2_ptsz, sizeof(__pyx_k_cuStreamBatchMemOp_v2_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamBeginCapture_v2, __pyx_k_cuStreamBeginCapture_v2, sizeof(__pyx_k_cuStreamBeginCapture_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamBeginCapture_v2_ptsz, __pyx_k_cuStreamBeginCapture_v2_ptsz, sizeof(__pyx_k_cuStreamBeginCapture_v2_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamCopyAttributes, __pyx_k_cuStreamCopyAttributes, sizeof(__pyx_k_cuStreamCopyAttributes), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamCopyAttributes_ptsz, __pyx_k_cuStreamCopyAttributes_ptsz, sizeof(__pyx_k_cuStreamCopyAttributes_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamCreate, __pyx_k_cuStreamCreate, sizeof(__pyx_k_cuStreamCreate), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamCreateWithPriority, __pyx_k_cuStreamCreateWithPriority, sizeof(__pyx_k_cuStreamCreateWithPriority), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamDestroy_v2, __pyx_k_cuStreamDestroy_v2, sizeof(__pyx_k_cuStreamDestroy_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamEndCapture, __pyx_k_cuStreamEndCapture, sizeof(__pyx_k_cuStreamEndCapture), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamEndCapture_ptsz, __pyx_k_cuStreamEndCapture_ptsz, sizeof(__pyx_k_cuStreamEndCapture_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamGetAttribute, __pyx_k_cuStreamGetAttribute, sizeof(__pyx_k_cuStreamGetAttribute), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamGetAttribute_ptsz, __pyx_k_cuStreamGetAttribute_ptsz, sizeof(__pyx_k_cuStreamGetAttribute_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamGetCaptureInfo_v2, __pyx_k_cuStreamGetCaptureInfo_v2, sizeof(__pyx_k_cuStreamGetCaptureInfo_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamGetCaptureInfo_v2_ptsz, __pyx_k_cuStreamGetCaptureInfo_v2_ptsz, sizeof(__pyx_k_cuStreamGetCaptureInfo_v2_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamGetCtx, __pyx_k_cuStreamGetCtx, sizeof(__pyx_k_cuStreamGetCtx), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamGetCtx_ptsz, __pyx_k_cuStreamGetCtx_ptsz, sizeof(__pyx_k_cuStreamGetCtx_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamGetFlags, __pyx_k_cuStreamGetFlags, sizeof(__pyx_k_cuStreamGetFlags), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamGetFlags_ptsz, __pyx_k_cuStreamGetFlags_ptsz, sizeof(__pyx_k_cuStreamGetFlags_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamGetId, __pyx_k_cuStreamGetId, sizeof(__pyx_k_cuStreamGetId), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamGetId_ptsz, __pyx_k_cuStreamGetId_ptsz, sizeof(__pyx_k_cuStreamGetId_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamGetPriority, __pyx_k_cuStreamGetPriority, sizeof(__pyx_k_cuStreamGetPriority), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamGetPriority_ptsz, __pyx_k_cuStreamGetPriority_ptsz, sizeof(__pyx_k_cuStreamGetPriority_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamIsCapturing, __pyx_k_cuStreamIsCapturing, sizeof(__pyx_k_cuStreamIsCapturing), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamIsCapturing_ptsz, __pyx_k_cuStreamIsCapturing_ptsz, sizeof(__pyx_k_cuStreamIsCapturing_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamQuery, __pyx_k_cuStreamQuery, sizeof(__pyx_k_cuStreamQuery), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamQuery_ptsz, __pyx_k_cuStreamQuery_ptsz, sizeof(__pyx_k_cuStreamQuery_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamSetAttribute, __pyx_k_cuStreamSetAttribute, sizeof(__pyx_k_cuStreamSetAttribute), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamSetAttribute_ptsz, __pyx_k_cuStreamSetAttribute_ptsz, sizeof(__pyx_k_cuStreamSetAttribute_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamSynchronize, __pyx_k_cuStreamSynchronize, sizeof(__pyx_k_cuStreamSynchronize), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamSynchronize_ptsz, __pyx_k_cuStreamSynchronize_ptsz, sizeof(__pyx_k_cuStreamSynchronize_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamUpdateCaptureDependencie, __pyx_k_cuStreamUpdateCaptureDependencie, sizeof(__pyx_k_cuStreamUpdateCaptureDependencie), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamUpdateCaptureDependencie_2, __pyx_k_cuStreamUpdateCaptureDependencie_2, sizeof(__pyx_k_cuStreamUpdateCaptureDependencie_2), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamWaitEvent, __pyx_k_cuStreamWaitEvent, sizeof(__pyx_k_cuStreamWaitEvent), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamWaitEvent_ptsz, __pyx_k_cuStreamWaitEvent_ptsz, sizeof(__pyx_k_cuStreamWaitEvent_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamWaitValue32_v2, __pyx_k_cuStreamWaitValue32_v2, sizeof(__pyx_k_cuStreamWaitValue32_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamWaitValue32_v2_ptsz, __pyx_k_cuStreamWaitValue32_v2_ptsz, sizeof(__pyx_k_cuStreamWaitValue32_v2_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamWaitValue64_v2, __pyx_k_cuStreamWaitValue64_v2, sizeof(__pyx_k_cuStreamWaitValue64_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamWaitValue64_v2_ptsz, __pyx_k_cuStreamWaitValue64_v2_ptsz, sizeof(__pyx_k_cuStreamWaitValue64_v2_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamWriteValue32_v2, __pyx_k_cuStreamWriteValue32_v2, sizeof(__pyx_k_cuStreamWriteValue32_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamWriteValue32_v2_ptsz, __pyx_k_cuStreamWriteValue32_v2_ptsz, sizeof(__pyx_k_cuStreamWriteValue32_v2_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamWriteValue64_v2, __pyx_k_cuStreamWriteValue64_v2, sizeof(__pyx_k_cuStreamWriteValue64_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamWriteValue64_v2_ptsz, __pyx_k_cuStreamWriteValue64_v2_ptsz, sizeof(__pyx_k_cuStreamWriteValue64_v2_ptsz), 0, 1, 0, 1},
  {&__pyx_n_u_cuSurfObjectCreate, __pyx_k_cuSurfObjectCreate, sizeof(__pyx_k_cuSurfObjectCreate), 0, 1, 0, 1},
  {&__pyx_n_u_cuSurfObjectDestroy, __pyx_k_cuSurfObjectDestroy, sizeof(__pyx_k_cuSurfObjectDestroy), 0, 1, 0, 1},
  {&__pyx_n_u_cuSurfObjectGetResourceDesc, __pyx_k_cuSurfObjectGetResourceDesc, sizeof(__pyx_k_cuSurfObjectGetResourceDesc), 0, 1, 0, 1},
  {&__pyx_n_u_cuSurfRefGetArray, __pyx_k_cuSurfRefGetArray, sizeof(__pyx_k_cuSurfRefGetArray), 0, 1, 0, 1},
  {&__pyx_n_u_cuSurfRefSetArray, __pyx_k_cuSurfRefSetArray, sizeof(__pyx_k_cuSurfRefSetArray), 0, 1, 0, 1},
  {&__pyx_n_u_cuTensorMapEncodeIm2col, __pyx_k_cuTensorMapEncodeIm2col, sizeof(__pyx_k_cuTensorMapEncodeIm2col), 0, 1, 0, 1},
  {&__pyx_n_u_cuTensorMapEncodeTiled, __pyx_k_cuTensorMapEncodeTiled, sizeof(__pyx_k_cuTensorMapEncodeTiled), 0, 1, 0, 1},
  {&__pyx_n_u_cuTensorMapReplaceAddress, __pyx_k_cuTensorMapReplaceAddress, sizeof(__pyx_k_cuTensorMapReplaceAddress), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexObjectCreate, __pyx_k_cuTexObjectCreate, sizeof(__pyx_k_cuTexObjectCreate), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexObjectDestroy, __pyx_k_cuTexObjectDestroy, sizeof(__pyx_k_cuTexObjectDestroy), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexObjectGetResourceDesc, __pyx_k_cuTexObjectGetResourceDesc, sizeof(__pyx_k_cuTexObjectGetResourceDesc), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexObjectGetResourceViewDesc, __pyx_k_cuTexObjectGetResourceViewDesc, sizeof(__pyx_k_cuTexObjectGetResourceViewDesc), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexObjectGetTextureDesc, __pyx_k_cuTexObjectGetTextureDesc, sizeof(__pyx_k_cuTexObjectGetTextureDesc), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexRefCreate, __pyx_k_cuTexRefCreate, sizeof(__pyx_k_cuTexRefCreate), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexRefDestroy, __pyx_k_cuTexRefDestroy, sizeof(__pyx_k_cuTexRefDestroy), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexRefGetAddressMode, __pyx_k_cuTexRefGetAddressMode, sizeof(__pyx_k_cuTexRefGetAddressMode), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexRefGetAddress_v2, __pyx_k_cuTexRefGetAddress_v2, sizeof(__pyx_k_cuTexRefGetAddress_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexRefGetArray, __pyx_k_cuTexRefGetArray, sizeof(__pyx_k_cuTexRefGetArray), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexRefGetBorderColor, __pyx_k_cuTexRefGetBorderColor, sizeof(__pyx_k_cuTexRefGetBorderColor), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexRefGetFilterMode, __pyx_k_cuTexRefGetFilterMode, sizeof(__pyx_k_cuTexRefGetFilterMode), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexRefGetFlags, __pyx_k_cuTexRefGetFlags, sizeof(__pyx_k_cuTexRefGetFlags), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexRefGetFormat, __pyx_k_cuTexRefGetFormat, sizeof(__pyx_k_cuTexRefGetFormat), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexRefGetMaxAnisotropy, __pyx_k_cuTexRefGetMaxAnisotropy, sizeof(__pyx_k_cuTexRefGetMaxAnisotropy), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexRefGetMipmapFilterMode, __pyx_k_cuTexRefGetMipmapFilterMode, sizeof(__pyx_k_cuTexRefGetMipmapFilterMode), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexRefGetMipmapLevelBias, __pyx_k_cuTexRefGetMipmapLevelBias, sizeof(__pyx_k_cuTexRefGetMipmapLevelBias), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexRefGetMipmapLevelClamp, __pyx_k_cuTexRefGetMipmapLevelClamp, sizeof(__pyx_k_cuTexRefGetMipmapLevelClamp), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexRefGetMipmappedArray, __pyx_k_cuTexRefGetMipmappedArray, sizeof(__pyx_k_cuTexRefGetMipmappedArray), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexRefSetAddress2D_v3, __pyx_k_cuTexRefSetAddress2D_v3, sizeof(__pyx_k_cuTexRefSetAddress2D_v3), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexRefSetAddressMode, __pyx_k_cuTexRefSetAddressMode, sizeof(__pyx_k_cuTexRefSetAddressMode), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexRefSetAddress_v2, __pyx_k_cuTexRefSetAddress_v2, sizeof(__pyx_k_cuTexRefSetAddress_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexRefSetArray, __pyx_k_cuTexRefSetArray, sizeof(__pyx_k_cuTexRefSetArray), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexRefSetBorderColor, __pyx_k_cuTexRefSetBorderColor, sizeof(__pyx_k_cuTexRefSetBorderColor), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexRefSetFilterMode, __pyx_k_cuTexRefSetFilterMode, sizeof(__pyx_k_cuTexRefSetFilterMode), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexRefSetFlags, __pyx_k_cuTexRefSetFlags, sizeof(__pyx_k_cuTexRefSetFlags), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexRefSetFormat, __pyx_k_cuTexRefSetFormat, sizeof(__pyx_k_cuTexRefSetFormat), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexRefSetMaxAnisotropy, __pyx_k_cuTexRefSetMaxAnisotropy, sizeof(__pyx_k_cuTexRefSetMaxAnisotropy), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexRefSetMipmapFilterMode, __pyx_k_cuTexRefSetMipmapFilterMode, sizeof(__pyx_k_cuTexRefSetMipmapFilterMode), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexRefSetMipmapLevelBias, __pyx_k_cuTexRefSetMipmapLevelBias, sizeof(__pyx_k_cuTexRefSetMipmapLevelBias), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexRefSetMipmapLevelClamp, __pyx_k_cuTexRefSetMipmapLevelClamp, sizeof(__pyx_k_cuTexRefSetMipmapLevelClamp), 0, 1, 0, 1},
  {&__pyx_n_u_cuTexRefSetMipmappedArray, __pyx_k_cuTexRefSetMipmappedArray, sizeof(__pyx_k_cuTexRefSetMipmappedArray), 0, 1, 0, 1},
  {&__pyx_n_u_cuThreadExchangeStreamCaptureMod, __pyx_k_cuThreadExchangeStreamCaptureMod, sizeof(__pyx_k_cuThreadExchangeStreamCaptureMod), 0, 1, 0, 1},
  {&__pyx_n_u_cuUserObjectCreate, __pyx_k_cuUserObjectCreate, sizeof(__pyx_k_cuUserObjectCreate), 0, 1, 0, 1},
  {&__pyx_n_u_cuUserObjectRelease, __pyx_k_cuUserObjectRelease, sizeof(__pyx_k_cuUserObjectRelease), 0, 1, 0, 1},
  {&__pyx_n_u_cuUserObjectRetain, __pyx_k_cuUserObjectRetain, sizeof(__pyx_k_cuUserObjectRetain), 0, 1, 0, 1},
  {&__pyx_n_u_cuVDPAUCtxCreate_v2, __pyx_k_cuVDPAUCtxCreate_v2, sizeof(__pyx_k_cuVDPAUCtxCreate_v2), 0, 1, 0, 1},
  {&__pyx_n_u_cuVDPAUGetDevice, __pyx_k_cuVDPAUGetDevice, sizeof(__pyx_k_cuVDPAUGetDevice), 0, 1, 0, 1},
  {&__pyx_n_u_cuWaitExternalSemaphoresAsync, __pyx_k_cuWaitExternalSemaphoresAsync, sizeof(__pyx_k_cuWaitExternalSemaphoresAsync), 0, 1, 0, 1},
  {&__pyx_n_u_cuWaitExternalSemaphoresAsync_pt, __pyx_k_cuWaitExternalSemaphoresAsync_pt, sizeof(__pyx_k_cuWaitExternalSemaphoresAsync_pt), 0, 1, 0, 1},
  {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1},
  {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
  {&__pyx_n_s_getenv, __pyx_k_getenv, sizeof(__pyx_k_getenv), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_maxsize, __pyx_k_maxsize, sizeof(__pyx_k_maxsize), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_kp_u_nvcuda_dll, __pyx_k_nvcuda_dll, sizeof(__pyx_k_nvcuda_dll), 0, 1, 0, 0},
  {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
  {&__pyx_n_s_pywintypes, __pyx_k_pywintypes, sizeof(__pyx_k_pywintypes), 0, 0, 1, 1},
  {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
  {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_win32api, __pyx_k_win32api, sizeof(__pyx_k_win32api), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 455, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "cuda/_cuda/ccuda.pyx":440
 *     __cuPythonInit = True
 *     with gil:
 *         usePTDS = os.getenv('CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM', default=0)             # <<<<<<<<<<<<<<
 * 
 *     # Load library
 */
  __pyx_tuple_ = PyTuple_Pack(1, __pyx_n_u_CUDA_PYTHON_CUDA_PER_THREAD_DEFA); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);

  /* "cuda/_cuda/ccuda.pyx":3949
 *     if __cuGetErrorString == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGetErrorString" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUresult, const char**) nogil> __cuGetErrorString)(error, pStr)
 *     return err
 */
  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGetErrorString_not_fo); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 3949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);

  /* "cuda/_cuda/ccuda.pyx":3958
 *     if __cuGetErrorName == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGetErrorName" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUresult, const char**) nogil> __cuGetErrorName)(error, pStr)
 *     return err
 */
  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGetErrorName_not_foun); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 3958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "cuda/_cuda/ccuda.pyx":3967
 *     if __cuInit == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuInit" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int) nogil> __cuInit)(Flags)
 *     return err
 */
  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_Function_cuInit_not_found); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 3967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);

  /* "cuda/_cuda/ccuda.pyx":3976
 *     if __cuDriverGetVersion == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDriverGetVersion" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*) nogil> __cuDriverGetVersion)(driverVersion)
 *     return err
 */
  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDriverGetVersion_not); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 3976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "cuda/_cuda/ccuda.pyx":3985
 *     if __cuDeviceGet == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGet" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice*, int) nogil> __cuDeviceGet)(device, ordinal)
 *     return err
 */
  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGet_not_found); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 3985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "cuda/_cuda/ccuda.pyx":3994
 *     if __cuDeviceGetCount == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetCount" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*) nogil> __cuDeviceGetCount)(count)
 *     return err
 */
  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetCount_not_fo); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 3994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);

  /* "cuda/_cuda/ccuda.pyx":4003
 *     if __cuDeviceGetName == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetName" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(char*, int, CUdevice) nogil> __cuDeviceGetName)(name, length, dev)
 *     return err
 */
  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetName_not_fou); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 4003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "cuda/_cuda/ccuda.pyx":4012
 *     if __cuDeviceGetUuid == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetUuid" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUuuid*, CUdevice) nogil> __cuDeviceGetUuid)(uuid, dev)
 *     return err
 */
  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetUuid_not_fou); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 4012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "cuda/_cuda/ccuda.pyx":4021
 *     if __cuDeviceGetUuid_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetUuid_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUuuid*, CUdevice) nogil> __cuDeviceGetUuid_v2)(uuid, dev)
 *     return err
 */
  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetUuid_v2_not); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 4021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "cuda/_cuda/ccuda.pyx":4030
 *     if __cuDeviceGetLuid == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetLuid" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(char*, unsigned int*, CUdevice) nogil> __cuDeviceGetLuid)(luid, deviceNodeMask, dev)
 *     return err
 */
  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetLuid_not_fou); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 4030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "cuda/_cuda/ccuda.pyx":4039
 *     if __cuDeviceTotalMem_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceTotalMem_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(size_t*, CUdevice) nogil> __cuDeviceTotalMem_v2)(numbytes, dev)
 *     return err
 */
  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceTotalMem_v2_not); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 4039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);

  /* "cuda/_cuda/ccuda.pyx":4048
 *     if __cuDeviceGetTexture1DLinearMaxWidth == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetTexture1DLinearMaxWidth" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(size_t*, CUarray_format, unsigned, CUdevice) nogil> __cuDeviceGetTexture1DLinearMaxWidth)(maxWidthInElements, pformat, numChannels, dev)
 *     return err
 */
  __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetTexture1DLin); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 4048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);

  /* "cuda/_cuda/ccuda.pyx":4057
 *     if __cuDeviceGetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, CUdevice_attribute, CUdevice) nogil> __cuDeviceGetAttribute)(pi, attrib, dev)
 *     return err
 */
  __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetAttribute_no); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 4057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);

  /* "cuda/_cuda/ccuda.pyx":4066
 *     if __cuDeviceGetNvSciSyncAttributes == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetNvSciSyncAttributes" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*, CUdevice, int) nogil> __cuDeviceGetNvSciSyncAttributes)(nvSciSyncAttrList, dev, flags)
 *     return err
 */
  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetNvSciSyncAtt); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 4066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "cuda/_cuda/ccuda.pyx":4075
 *     if __cuDeviceSetMemPool == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceSetMemPool" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice, CUmemoryPool) nogil> __cuDeviceSetMemPool)(dev, pool)
 *     return err
 */
  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceSetMemPool_not); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 4075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "cuda/_cuda/ccuda.pyx":4084
 *     if __cuDeviceGetMemPool == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetMemPool" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool*, CUdevice) nogil> __cuDeviceGetMemPool)(pool, dev)
 *     return err
 */
  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetMemPool_not); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 4084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);

  /* "cuda/_cuda/ccuda.pyx":4093
 *     if __cuDeviceGetDefaultMemPool == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetDefaultMemPool" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool*, CUdevice) nogil> __cuDeviceGetDefaultMemPool)(pool_out, dev)
 *     return err
 */
  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetDefaultMemPo); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 4093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);

  /* "cuda/_cuda/ccuda.pyx":4102
 *     if __cuDeviceGetExecAffinitySupport == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetExecAffinitySupport" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, CUexecAffinityType, CUdevice) nogil> __cuDeviceGetExecAffinitySupport)(pi, typename, dev)
 *     return err
 */
  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetExecAffinity); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 4102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__19);
  __Pyx_GIVEREF(__pyx_tuple__19);

  /* "cuda/_cuda/ccuda.pyx":4111
 *     if __cuFlushGPUDirectRDMAWrites == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFlushGPUDirectRDMAWrites" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUflushGPUDirectRDMAWritesTarget, CUflushGPUDirectRDMAWritesScope) nogil> __cuFlushGPUDirectRDMAWrites)(target, scope)
 *     return err
 */
  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFlushGPUDirectRDMAWri); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 4111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);

  /* "cuda/_cuda/ccuda.pyx":4120
 *     if __cuDeviceGetProperties == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetProperties" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevprop*, CUdevice) nogil> __cuDeviceGetProperties)(prop, dev)
 *     return err
 */
  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetProperties_n); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 4120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__21);
  __Pyx_GIVEREF(__pyx_tuple__21);

  /* "cuda/_cuda/ccuda.pyx":4129
 *     if __cuDeviceComputeCapability == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceComputeCapability" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, int*, CUdevice) nogil> __cuDeviceComputeCapability)(major, minor, dev)
 *     return err
 */
  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceComputeCapabili); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 4129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);

  /* "cuda/_cuda/ccuda.pyx":4138
 *     if __cuDevicePrimaryCtxRetain == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRetain" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*, CUdevice) nogil> __cuDevicePrimaryCtxRetain)(pctx, dev)
 *     return err
 */
  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDevicePrimaryCtxRetai); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 4138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);

  /* "cuda/_cuda/ccuda.pyx":4147
 *     if __cuDevicePrimaryCtxRelease_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRelease_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDevicePrimaryCtxRelease_v2)(dev)
 *     return err
 */
  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDevicePrimaryCtxRelea); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 4147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);

  /* "cuda/_cuda/ccuda.pyx":4156
 *     if __cuDevicePrimaryCtxSetFlags_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxSetFlags_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice, unsigned int) nogil> __cuDevicePrimaryCtxSetFlags_v2)(dev, flags)
 *     return err
 */
  __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDevicePrimaryCtxSetFl); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 4156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__25);
  __Pyx_GIVEREF(__pyx_tuple__25);

  /* "cuda/_cuda/ccuda.pyx":4165
 *     if __cuDevicePrimaryCtxGetState == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxGetState" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice, unsigned int*, int*) nogil> __cuDevicePrimaryCtxGetState)(dev, flags, active)
 *     return err
 */
  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDevicePrimaryCtxGetSt); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 4165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);

  /* "cuda/_cuda/ccuda.pyx":4174
 *     if __cuDevicePrimaryCtxReset_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxReset_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDevicePrimaryCtxReset_v2)(dev)
 *     return err
 */
  __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDevicePrimaryCtxReset); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 4174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "cuda/_cuda/ccuda.pyx":4183
 *     if __cuCtxCreate_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxCreate_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*, unsigned int, CUdevice) nogil> __cuCtxCreate_v2)(pctx, flags, dev)
 *     return err
 */
  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxCreate_v2_not_foun); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 4183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);

  /* "cuda/_cuda/ccuda.pyx":4192
 *     if __cuCtxCreate_v3 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxCreate_v3" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*, CUexecAffinityParam*, int, unsigned int, CUdevice) nogil> __cuCtxCreate_v3)(pctx, paramsArray, numParams, flags, dev)
 *     return err
 */
  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxCreate_v3_not_foun); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 4192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);

  /* "cuda/_cuda/ccuda.pyx":4201
 *     if __cuCtxDestroy_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDestroy_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDestroy_v2)(ctx)
 *     return err
 */
  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxDestroy_v2_not_fou); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 4201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);

  /* "cuda/_cuda/ccuda.pyx":4210
 *     if __cuCtxPushCurrent_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxPushCurrent_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxPushCurrent_v2)(ctx)
 *     return err
 */
  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxPushCurrent_v2_not); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 4210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);

  /* "cuda/_cuda/ccuda.pyx":4219
 *     if __cuCtxPopCurrent_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxPopCurrent_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*) nogil> __cuCtxPopCurrent_v2)(pctx)
 *     return err
 */
  __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxPopCurrent_v2_not); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 4219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);

  /* "cuda/_cuda/ccuda.pyx":4228
 *     if __cuCtxSetCurrent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetCurrent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxSetCurrent)(ctx)
 *     return err
 */
  __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxSetCurrent_not_fou); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 4228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);

  /* "cuda/_cuda/ccuda.pyx":4237
 *     if __cuCtxGetCurrent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetCurrent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*) nogil> __cuCtxGetCurrent)(pctx)
 *     return err
 */
  __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetCurrent_not_fou); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 4237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);

  /* "cuda/_cuda/ccuda.pyx":4246
 *     if __cuCtxGetDevice == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetDevice" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice*) nogil> __cuCtxGetDevice)(device)
 *     return err
 */
  __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetDevice_not_foun); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 4246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);

  /* "cuda/_cuda/ccuda.pyx":4255
 *     if __cuCtxGetFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int*) nogil> __cuCtxGetFlags)(flags)
 *     return err
 */
  __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetFlags_not_found); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 4255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);

  /* "cuda/_cuda/ccuda.pyx":4264
 *     if __cuCtxSetFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int) nogil> __cuCtxSetFlags)(flags)
 *     return err
 */
  __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxSetFlags_not_found); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 4264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);

  /* "cuda/_cuda/ccuda.pyx":4273
 *     if __cuCtxGetId == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetId" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext, unsigned long long*) nogil> __cuCtxGetId)(ctx, ctxId)
 *     return err
 */
  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetId_not_found); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 4273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);

  /* "cuda/_cuda/ccuda.pyx":4282
 *     if __cuCtxSynchronize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSynchronize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)() nogil> __cuCtxSynchronize)()
 *     return err
 */
  __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxSynchronize_not_fo); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 4282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__39);
  __Pyx_GIVEREF(__pyx_tuple__39);

  /* "cuda/_cuda/ccuda.pyx":4291
 *     if __cuCtxSetLimit == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetLimit" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUlimit, size_t) nogil> __cuCtxSetLimit)(limit, value)
 *     return err
 */
  __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxSetLimit_not_found); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 4291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__40);
  __Pyx_GIVEREF(__pyx_tuple__40);

  /* "cuda/_cuda/ccuda.pyx":4300
 *     if __cuCtxGetLimit == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetLimit" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(size_t*, CUlimit) nogil> __cuCtxGetLimit)(pvalue, limit)
 *     return err
 */
  __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetLimit_not_found); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 4300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);

  /* "cuda/_cuda/ccuda.pyx":4309
 *     if __cuCtxGetCacheConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetCacheConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunc_cache*) nogil> __cuCtxGetCacheConfig)(pconfig)
 *     return err
 */
  __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetCacheConfig_not); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 4309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__42);
  __Pyx_GIVEREF(__pyx_tuple__42);

  /* "cuda/_cuda/ccuda.pyx":4318
 *     if __cuCtxSetCacheConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetCacheConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunc_cache) nogil> __cuCtxSetCacheConfig)(config)
 *     return err
 */
  __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxSetCacheConfig_not); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 4318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);

  /* "cuda/_cuda/ccuda.pyx":4327
 *     if __cuCtxGetSharedMemConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetSharedMemConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUsharedconfig*) nogil> __cuCtxGetSharedMemConfig)(pConfig)
 *     return err
 */
  __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetSharedMemConfig); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 4327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);

  /* "cuda/_cuda/ccuda.pyx":4336
 *     if __cuCtxSetSharedMemConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetSharedMemConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUsharedconfig) nogil> __cuCtxSetSharedMemConfig)(config)
 *     return err
 */
  __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxSetSharedMemConfig); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 4336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);

  /* "cuda/_cuda/ccuda.pyx":4345
 *     if __cuCtxGetApiVersion == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetApiVersion" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext, unsigned int*) nogil> __cuCtxGetApiVersion)(ctx, version)
 *     return err
 */
  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetApiVersion_not); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 4345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);

  /* "cuda/_cuda/ccuda.pyx":4354
 *     if __cuCtxGetStreamPriorityRange == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetStreamPriorityRange" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, int*) nogil> __cuCtxGetStreamPriorityRange)(leastPriority, greatestPriority)
 *     return err
 */
  __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetStreamPriorityR); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 4354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__47);
  __Pyx_GIVEREF(__pyx_tuple__47);

  /* "cuda/_cuda/ccuda.pyx":4363
 *     if __cuCtxResetPersistingL2Cache == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxResetPersistingL2Cache" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)() nogil> __cuCtxResetPersistingL2Cache)()
 *     return err
 */
  __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxResetPersistingL2C); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 4363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);

  /* "cuda/_cuda/ccuda.pyx":4372
 *     if __cuCtxGetExecAffinity == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetExecAffinity" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUexecAffinityParam*, CUexecAffinityType) nogil> __cuCtxGetExecAffinity)(pExecAffinity, typename)
 *     return err
 */
  __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetExecAffinity_no); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 4372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__49);
  __Pyx_GIVEREF(__pyx_tuple__49);

  /* "cuda/_cuda/ccuda.pyx":4381
 *     if __cuCtxAttach == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxAttach" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*, unsigned int) nogil> __cuCtxAttach)(pctx, flags)
 *     return err
 */
  __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxAttach_not_found); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 4381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__50);
  __Pyx_GIVEREF(__pyx_tuple__50);

  /* "cuda/_cuda/ccuda.pyx":4390
 *     if __cuCtxDetach == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDetach" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDetach)(ctx)
 *     return err
 */
  __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxDetach_not_found); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 4390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__51);
  __Pyx_GIVEREF(__pyx_tuple__51);

  /* "cuda/_cuda/ccuda.pyx":4399
 *     if __cuModuleLoad == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoad" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule*, const char*) nogil> __cuModuleLoad)(module, fname)
 *     return err
 */
  __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleLoad_not_found); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 4399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);

  /* "cuda/_cuda/ccuda.pyx":4408
 *     if __cuModuleLoadData == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadData" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule*, const void*) nogil> __cuModuleLoadData)(module, image)
 *     return err
 */
  __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleLoadData_not_fo); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 4408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__53);
  __Pyx_GIVEREF(__pyx_tuple__53);

  /* "cuda/_cuda/ccuda.pyx":4417
 *     if __cuModuleLoadDataEx == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadDataEx" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule*, const void*, unsigned int, CUjit_option*, void**) nogil> __cuModuleLoadDataEx)(module, image, numOptions, options, optionValues)
 *     return err
 */
  __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleLoadDataEx_not); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 4417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);

  /* "cuda/_cuda/ccuda.pyx":4426
 *     if __cuModuleLoadFatBinary == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadFatBinary" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule*, const void*) nogil> __cuModuleLoadFatBinary)(module, fatCubin)
 *     return err
 */
  __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleLoadFatBinary_n); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 4426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);

  /* "cuda/_cuda/ccuda.pyx":4435
 *     if __cuModuleUnload == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleUnload" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule) nogil> __cuModuleUnload)(hmod)
 *     return err
 */
  __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleUnload_not_foun); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 4435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);

  /* "cuda/_cuda/ccuda.pyx":4444
 *     if __cuModuleGetLoadingMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetLoadingMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmoduleLoadingMode*) nogil> __cuModuleGetLoadingMode)(mode)
 *     return err
 */
  __pyx_tuple__57 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleGetLoadingMode); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 4444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);

  /* "cuda/_cuda/ccuda.pyx":4453
 *     if __cuModuleGetFunction == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetFunction" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction*, CUmodule, const char*) nogil> __cuModuleGetFunction)(hfunc, hmod, name)
 *     return err
 */
  __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleGetFunction_not); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 4453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);

  /* "cuda/_cuda/ccuda.pyx":4462
 *     if __cuModuleGetGlobal_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetGlobal_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUmodule, const char*) nogil> __cuModuleGetGlobal_v2)(dptr, numbytes, hmod, name)
 *     return err
 */
  __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleGetGlobal_v2_no); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 4462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);

  /* "cuda/_cuda/ccuda.pyx":4471
 *     if __cuLinkCreate_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLinkCreate_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int, CUjit_option*, void**, CUlinkState*) nogil> __cuLinkCreate_v2)(numOptions, options, optionValues, stateOut)
 *     return err
 */
  __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLinkCreate_v2_not_fou); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 4471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__60);
  __Pyx_GIVEREF(__pyx_tuple__60);

  /* "cuda/_cuda/ccuda.pyx":4480
 *     if __cuLinkAddData_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLinkAddData_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUlinkState, CUjitInputType, void*, size_t, const char*, unsigned int, CUjit_option*, void**) nogil> __cuLinkAddData_v2)(state, typename, data, size, name, numOptions, options, optionValues)
 *     return err
 */
  __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLinkAddData_v2_not_fo); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 4480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__61);
  __Pyx_GIVEREF(__pyx_tuple__61);

  /* "cuda/_cuda/ccuda.pyx":4489
 *     if __cuLinkAddFile_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLinkAddFile_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUlinkState, CUjitInputType, const char*, unsigned int, CUjit_option*, void**) nogil> __cuLinkAddFile_v2)(state, typename, path, numOptions, options, optionValues)
 *     return err
 */
  __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLinkAddFile_v2_not_fo); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 4489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);

  /* "cuda/_cuda/ccuda.pyx":4498
 *     if __cuLinkComplete == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLinkComplete" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUlinkState, void**, size_t*) nogil> __cuLinkComplete)(state, cubinOut, sizeOut)
 *     return err
 */
  __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLinkComplete_not_foun); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 4498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);

  /* "cuda/_cuda/ccuda.pyx":4507
 *     if __cuLinkDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLinkDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUlinkState) nogil> __cuLinkDestroy)(state)
 *     return err
 */
  __pyx_tuple__64 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLinkDestroy_not_found); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 4507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__64);
  __Pyx_GIVEREF(__pyx_tuple__64);

  /* "cuda/_cuda/ccuda.pyx":4516
 *     if __cuModuleGetTexRef == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetTexRef" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref*, CUmodule, const char*) nogil> __cuModuleGetTexRef)(pTexRef, hmod, name)
 *     return err
 */
  __pyx_tuple__65 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleGetTexRef_not_f); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 4516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);

  /* "cuda/_cuda/ccuda.pyx":4525
 *     if __cuModuleGetSurfRef == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetSurfRef" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUsurfref*, CUmodule, const char*) nogil> __cuModuleGetSurfRef)(pSurfRef, hmod, name)
 *     return err
 */
  __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleGetSurfRef_not); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 4525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);

  /* "cuda/_cuda/ccuda.pyx":4534
 *     if __cuLibraryLoadData == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryLoadData" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUlibrary*, const void*, CUjit_option*, void**, unsigned int, CUlibraryOption*, void**, unsigned int) nogil> __cuLibraryLoadData)(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions)
 *     return err
 */
  __pyx_tuple__67 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLibraryLoadData_not_f); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 4534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__67);
  __Pyx_GIVEREF(__pyx_tuple__67);

  /* "cuda/_cuda/ccuda.pyx":4543
 *     if __cuLibraryLoadFromFile == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryLoadFromFile" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUlibrary*, const char*, CUjit_option*, void**, unsigned int, CUlibraryOption*, void**, unsigned int) nogil> __cuLibraryLoadFromFile)(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions)
 *     return err
 */
  __pyx_tuple__68 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLibraryLoadFromFile_n); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 4543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);

  /* "cuda/_cuda/ccuda.pyx":4552
 *     if __cuLibraryUnload == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryUnload" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUlibrary) nogil> __cuLibraryUnload)(library)
 *     return err
 */
  __pyx_tuple__69 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLibraryUnload_not_fou); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 4552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__69);
  __Pyx_GIVEREF(__pyx_tuple__69);

  /* "cuda/_cuda/ccuda.pyx":4561
 *     if __cuLibraryGetKernel == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryGetKernel" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUkernel*, CUlibrary, const char*) nogil> __cuLibraryGetKernel)(pKernel, library, name)
 *     return err
 */
  __pyx_tuple__70 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLibraryGetKernel_not); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 4561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);

  /* "cuda/_cuda/ccuda.pyx":4570
 *     if __cuLibraryGetModule == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryGetModule" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule*, CUlibrary) nogil> __cuLibraryGetModule)(pMod, library)
 *     return err
 */
  __pyx_tuple__71 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLibraryGetModule_not); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 4570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__71);
  __Pyx_GIVEREF(__pyx_tuple__71);

  /* "cuda/_cuda/ccuda.pyx":4579
 *     if __cuKernelGetFunction == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuKernelGetFunction" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction*, CUkernel) nogil> __cuKernelGetFunction)(pFunc, kernel)
 *     return err
 */
  __pyx_tuple__72 = PyTuple_Pack(1, __pyx_kp_u_Function_cuKernelGetFunction_not); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 4579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__72);
  __Pyx_GIVEREF(__pyx_tuple__72);

  /* "cuda/_cuda/ccuda.pyx":4588
 *     if __cuLibraryGetGlobal == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryGetGlobal" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUlibrary, const char*) nogil> __cuLibraryGetGlobal)(dptr, numbytes, library, name)
 *     return err
 */
  __pyx_tuple__73 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLibraryGetGlobal_not); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 4588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__73);
  __Pyx_GIVEREF(__pyx_tuple__73);

  /* "cuda/_cuda/ccuda.pyx":4597
 *     if __cuLibraryGetManaged == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryGetManaged" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUlibrary, const char*) nogil> __cuLibraryGetManaged)(dptr, numbytes, library, name)
 *     return err
 */
  __pyx_tuple__74 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLibraryGetManaged_not); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 4597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);

  /* "cuda/_cuda/ccuda.pyx":4606
 *     if __cuLibraryGetUnifiedFunction == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLibraryGetUnifiedFunction" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void**, CUlibrary, const char*) nogil> __cuLibraryGetUnifiedFunction)(fptr, library, symbol)
 *     return err
 */
  __pyx_tuple__75 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLibraryGetUnifiedFunc); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 4606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);

  /* "cuda/_cuda/ccuda.pyx":4615
 *     if __cuKernelGetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuKernelGetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, CUfunction_attribute, CUkernel, CUdevice) nogil> __cuKernelGetAttribute)(pi, attrib, kernel, dev)
 *     return err
 */
  __pyx_tuple__76 = PyTuple_Pack(1, __pyx_kp_u_Function_cuKernelGetAttribute_no); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 4615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);

  /* "cuda/_cuda/ccuda.pyx":4624
 *     if __cuKernelSetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuKernelSetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction_attribute, int, CUkernel, CUdevice) nogil> __cuKernelSetAttribute)(attrib, val, kernel, dev)
 *     return err
 */
  __pyx_tuple__77 = PyTuple_Pack(1, __pyx_kp_u_Function_cuKernelSetAttribute_no); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 4624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__77);
  __Pyx_GIVEREF(__pyx_tuple__77);

  /* "cuda/_cuda/ccuda.pyx":4633
 *     if __cuKernelSetCacheConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuKernelSetCacheConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUkernel, CUfunc_cache, CUdevice) nogil> __cuKernelSetCacheConfig)(kernel, config, dev)
 *     return err
 */
  __pyx_tuple__78 = PyTuple_Pack(1, __pyx_kp_u_Function_cuKernelSetCacheConfig); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 4633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__78);
  __Pyx_GIVEREF(__pyx_tuple__78);

  /* "cuda/_cuda/ccuda.pyx":4642
 *     if __cuMemGetInfo_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetInfo_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(size_t*, size_t*) nogil> __cuMemGetInfo_v2)(free, total)
 *     return err
 */
  __pyx_tuple__79 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemGetInfo_v2_not_fou); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 4642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);

  /* "cuda/_cuda/ccuda.pyx":4651
 *     if __cuMemAlloc_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemAlloc_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, size_t) nogil> __cuMemAlloc_v2)(dptr, bytesize)
 *     return err
 */
  __pyx_tuple__80 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAlloc_v2_not_found); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 4651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__80);
  __Pyx_GIVEREF(__pyx_tuple__80);

  /* "cuda/_cuda/ccuda.pyx":4660
 *     if __cuMemAllocPitch_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocPitch_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, size_t, size_t, unsigned int) nogil> __cuMemAllocPitch_v2)(dptr, pPitch, WidthInBytes, Height, ElementSizeBytes)
 *     return err
 */
  __pyx_tuple__81 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAllocPitch_v2_not); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 4660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);

  /* "cuda/_cuda/ccuda.pyx":4669
 *     if __cuMemFree_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemFree_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr) nogil> __cuMemFree_v2)(dptr)
 *     return err
 */
  __pyx_tuple__82 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemFree_v2_not_found); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 4669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__82);
  __Pyx_GIVEREF(__pyx_tuple__82);

  /* "cuda/_cuda/ccuda.pyx":4678
 *     if __cuMemGetAddressRange_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAddressRange_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUdeviceptr) nogil> __cuMemGetAddressRange_v2)(pbase, psize, dptr)
 *     return err
 */
  __pyx_tuple__83 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemGetAddressRange_v2); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 4678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__83);
  __Pyx_GIVEREF(__pyx_tuple__83);

  /* "cuda/_cuda/ccuda.pyx":4687
 *     if __cuMemAllocHost_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocHost_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void**, size_t) nogil> __cuMemAllocHost_v2)(pp, bytesize)
 *     return err
 */
  __pyx_tuple__84 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAllocHost_v2_not_f); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 4687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__84);
  __Pyx_GIVEREF(__pyx_tuple__84);

  /* "cuda/_cuda/ccuda.pyx":4696
 *     if __cuMemFreeHost == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemFreeHost" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*) nogil> __cuMemFreeHost)(p)
 *     return err
 */
  __pyx_tuple__85 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemFreeHost_not_found); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 4696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__85);
  __Pyx_GIVEREF(__pyx_tuple__85);

  /* "cuda/_cuda/ccuda.pyx":4705
 *     if __cuMemHostAlloc == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostAlloc" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void**, size_t, unsigned int) nogil> __cuMemHostAlloc)(pp, bytesize, Flags)
 *     return err
 */
  __pyx_tuple__86 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemHostAlloc_not_foun); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 4705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);

  /* "cuda/_cuda/ccuda.pyx":4714
 *     if __cuMemHostGetDevicePointer_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostGetDevicePointer_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, void*, unsigned int) nogil> __cuMemHostGetDevicePointer_v2)(pdptr, p, Flags)
 *     return err
 */
  __pyx_tuple__87 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemHostGetDevicePoint); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 4714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__87);
  __Pyx_GIVEREF(__pyx_tuple__87);

  /* "cuda/_cuda/ccuda.pyx":4723
 *     if __cuMemHostGetFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostGetFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int*, void*) nogil> __cuMemHostGetFlags)(pFlags, p)
 *     return err
 */
  __pyx_tuple__88 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemHostGetFlags_not_f); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 4723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__88);
  __Pyx_GIVEREF(__pyx_tuple__88);

  /* "cuda/_cuda/ccuda.pyx":4732
 *     if __cuMemAllocManaged == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocManaged" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, size_t, unsigned int) nogil> __cuMemAllocManaged)(dptr, bytesize, flags)
 *     return err
 */
  __pyx_tuple__89 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAllocManaged_not_f); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 4732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__89);
  __Pyx_GIVEREF(__pyx_tuple__89);

  /* "cuda/_cuda/ccuda.pyx":4741
 *     if __cuDeviceGetByPCIBusId == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetByPCIBusId" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice*, const char*) nogil> __cuDeviceGetByPCIBusId)(dev, pciBusId)
 *     return err
 */
  __pyx_tuple__90 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetByPCIBusId_n); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 4741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);

  /* "cuda/_cuda/ccuda.pyx":4750
 *     if __cuDeviceGetPCIBusId == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetPCIBusId" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(char*, int, CUdevice) nogil> __cuDeviceGetPCIBusId)(pciBusId, length, dev)
 *     return err
 */
  __pyx_tuple__91 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetPCIBusId_not); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 4750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__91);
  __Pyx_GIVEREF(__pyx_tuple__91);

  /* "cuda/_cuda/ccuda.pyx":4759
 *     if __cuIpcGetEventHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuIpcGetEventHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUipcEventHandle*, CUevent) nogil> __cuIpcGetEventHandle)(pHandle, event)
 *     return err
 */
  __pyx_tuple__92 = PyTuple_Pack(1, __pyx_kp_u_Function_cuIpcGetEventHandle_not); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 4759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);

  /* "cuda/_cuda/ccuda.pyx":4768
 *     if __cuIpcOpenEventHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuIpcOpenEventHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent*, CUipcEventHandle) nogil> __cuIpcOpenEventHandle)(phEvent, handle)
 *     return err
 */
  __pyx_tuple__93 = PyTuple_Pack(1, __pyx_kp_u_Function_cuIpcOpenEventHandle_no); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 4768, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__93);
  __Pyx_GIVEREF(__pyx_tuple__93);

  /* "cuda/_cuda/ccuda.pyx":4777
 *     if __cuIpcGetMemHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuIpcGetMemHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUipcMemHandle*, CUdeviceptr) nogil> __cuIpcGetMemHandle)(pHandle, dptr)
 *     return err
 */
  __pyx_tuple__94 = PyTuple_Pack(1, __pyx_kp_u_Function_cuIpcGetMemHandle_not_f); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 4777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__94);
  __Pyx_GIVEREF(__pyx_tuple__94);

  /* "cuda/_cuda/ccuda.pyx":4786
 *     if __cuIpcOpenMemHandle_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuIpcOpenMemHandle_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, CUipcMemHandle, unsigned int) nogil> __cuIpcOpenMemHandle_v2)(pdptr, handle, Flags)
 *     return err
 */
  __pyx_tuple__95 = PyTuple_Pack(1, __pyx_kp_u_Function_cuIpcOpenMemHandle_v2_n); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 4786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__95);
  __Pyx_GIVEREF(__pyx_tuple__95);

  /* "cuda/_cuda/ccuda.pyx":4795
 *     if __cuIpcCloseMemHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuIpcCloseMemHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr) nogil> __cuIpcCloseMemHandle)(dptr)
 *     return err
 */
  __pyx_tuple__96 = PyTuple_Pack(1, __pyx_kp_u_Function_cuIpcCloseMemHandle_not); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 4795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__96);
  __Pyx_GIVEREF(__pyx_tuple__96);

  /* "cuda/_cuda/ccuda.pyx":4804
 *     if __cuMemHostRegister_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostRegister_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*, size_t, unsigned int) nogil> __cuMemHostRegister_v2)(p, bytesize, Flags)
 *     return err
 */
  __pyx_tuple__97 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemHostRegister_v2_no); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 4804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__97);
  __Pyx_GIVEREF(__pyx_tuple__97);

  /* "cuda/_cuda/ccuda.pyx":4813
 *     if __cuMemHostUnregister == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostUnregister" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*) nogil> __cuMemHostUnregister)(p)
 *     return err
 */
  __pyx_tuple__98 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemHostUnregister_not); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 4813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__98);
  __Pyx_GIVEREF(__pyx_tuple__98);

  /* "cuda/_cuda/ccuda.pyx":4822
 *     if __cuMemcpy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, CUdeviceptr, size_t) nogil> __cuMemcpy)(dst, src, ByteCount)
 *     return err
 */
  __pyx_tuple__99 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpy_not_found); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 4822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__99);
  __Pyx_GIVEREF(__pyx_tuple__99);

  /* "cuda/_cuda/ccuda.pyx":4831
 *     if __cuMemcpyPeer == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyPeer" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t) nogil> __cuMemcpyPeer)(dstDevice, dstContext, srcDevice, srcContext, ByteCount)
 *     return err
 */
  __pyx_tuple__100 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyPeer_not_found); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 4831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__100);
  __Pyx_GIVEREF(__pyx_tuple__100);

  /* "cuda/_cuda/ccuda.pyx":4840
 *     if __cuMemcpyHtoD_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyHtoD_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, const void*, size_t) nogil> __cuMemcpyHtoD_v2)(dstDevice, srcHost, ByteCount)
 *     return err
 */
  __pyx_tuple__101 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyHtoD_v2_not_fou); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 4840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__101);
  __Pyx_GIVEREF(__pyx_tuple__101);

  /* "cuda/_cuda/ccuda.pyx":4849
 *     if __cuMemcpyDtoH_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoH_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*, CUdeviceptr, size_t) nogil> __cuMemcpyDtoH_v2)(dstHost, srcDevice, ByteCount)
 *     return err
 */
  __pyx_tuple__102 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyDtoH_v2_not_fou); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 4849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__102);
  __Pyx_GIVEREF(__pyx_tuple__102);

  /* "cuda/_cuda/ccuda.pyx":4858
 *     if __cuMemcpyDtoD_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoD_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, CUdeviceptr, size_t) nogil> __cuMemcpyDtoD_v2)(dstDevice, srcDevice, ByteCount)
 *     return err
 */
  __pyx_tuple__103 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyDtoD_v2_not_fou); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 4858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__103);
  __Pyx_GIVEREF(__pyx_tuple__103);

  /* "cuda/_cuda/ccuda.pyx":4867
 *     if __cuMemcpyDtoA_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoA_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray, size_t, CUdeviceptr, size_t) nogil> __cuMemcpyDtoA_v2)(dstArray, dstOffset, srcDevice, ByteCount)
 *     return err
 */
  __pyx_tuple__104 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyDtoA_v2_not_fou); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 4867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__104);
  __Pyx_GIVEREF(__pyx_tuple__104);

  /* "cuda/_cuda/ccuda.pyx":4876
 *     if __cuMemcpyAtoD_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAtoD_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, CUarray, size_t, size_t) nogil> __cuMemcpyAtoD_v2)(dstDevice, srcArray, srcOffset, ByteCount)
 *     return err
 */
  __pyx_tuple__105 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyAtoD_v2_not_fou); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 4876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__105);
  __Pyx_GIVEREF(__pyx_tuple__105);

  /* "cuda/_cuda/ccuda.pyx":4885
 *     if __cuMemcpyHtoA_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyHtoA_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray, size_t, const void*, size_t) nogil> __cuMemcpyHtoA_v2)(dstArray, dstOffset, srcHost, ByteCount)
 *     return err
 */
  __pyx_tuple__106 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyHtoA_v2_not_fou); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 4885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__106);
  __Pyx_GIVEREF(__pyx_tuple__106);

  /* "cuda/_cuda/ccuda.pyx":4894
 *     if __cuMemcpyAtoH_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAtoH_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*, CUarray, size_t, size_t) nogil> __cuMemcpyAtoH_v2)(dstHost, srcArray, srcOffset, ByteCount)
 *     return err
 */
  __pyx_tuple__107 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyAtoH_v2_not_fou); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 4894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__107);
  __Pyx_GIVEREF(__pyx_tuple__107);

  /* "cuda/_cuda/ccuda.pyx":4903
 *     if __cuMemcpyAtoA_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAtoA_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray, size_t, CUarray, size_t, size_t) nogil> __cuMemcpyAtoA_v2)(dstArray, dstOffset, srcArray, srcOffset, ByteCount)
 *     return err
 */
  __pyx_tuple__108 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyAtoA_v2_not_fou); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 4903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__108);
  __Pyx_GIVEREF(__pyx_tuple__108);

  /* "cuda/_cuda/ccuda.pyx":4912
 *     if __cuMemcpy2D_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy2D_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const CUDA_MEMCPY2D*) nogil> __cuMemcpy2D_v2)(pCopy)
 *     return err
 */
  __pyx_tuple__109 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpy2D_v2_not_found); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(0, 4912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__109);
  __Pyx_GIVEREF(__pyx_tuple__109);

  /* "cuda/_cuda/ccuda.pyx":4921
 *     if __cuMemcpy2DUnaligned_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy2DUnaligned_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const CUDA_MEMCPY2D*) nogil> __cuMemcpy2DUnaligned_v2)(pCopy)
 *     return err
 */
  __pyx_tuple__110 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpy2DUnaligned_v2); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 4921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__110);
  __Pyx_GIVEREF(__pyx_tuple__110);

  /* "cuda/_cuda/ccuda.pyx":4930
 *     if __cuMemcpy3D_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3D_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const CUDA_MEMCPY3D*) nogil> __cuMemcpy3D_v2)(pCopy)
 *     return err
 */
  __pyx_tuple__111 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpy3D_v2_not_found); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 4930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__111);
  __Pyx_GIVEREF(__pyx_tuple__111);

  /* "cuda/_cuda/ccuda.pyx":4939
 *     if __cuMemcpy3DPeer == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3DPeer" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const CUDA_MEMCPY3D_PEER*) nogil> __cuMemcpy3DPeer)(pCopy)
 *     return err
 */
  __pyx_tuple__112 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpy3DPeer_not_foun); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 4939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__112);
  __Pyx_GIVEREF(__pyx_tuple__112);

  /* "cuda/_cuda/ccuda.pyx":4948
 *     if __cuMemcpyAsync == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAsync" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, CUdeviceptr, size_t, CUstream) nogil> __cuMemcpyAsync)(dst, src, ByteCount, hStream)
 *     return err
 */
  __pyx_tuple__113 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyAsync_not_found); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(0, 4948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__113);
  __Pyx_GIVEREF(__pyx_tuple__113);

  /* "cuda/_cuda/ccuda.pyx":4957
 *     if __cuMemcpyPeerAsync == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyPeerAsync" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t, CUstream) nogil> __cuMemcpyPeerAsync)(dstDevice, dstContext, srcDevice, srcContext, ByteCount, hStream)
 *     return err
 */
  __pyx_tuple__114 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyPeerAsync_not_f); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 4957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__114);
  __Pyx_GIVEREF(__pyx_tuple__114);

  /* "cuda/_cuda/ccuda.pyx":4966
 *     if __cuMemcpyHtoDAsync_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyHtoDAsync_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, const void*, size_t, CUstream) nogil> __cuMemcpyHtoDAsync_v2)(dstDevice, srcHost, ByteCount, hStream)
 *     return err
 */
  __pyx_tuple__115 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyHtoDAsync_v2_no); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(0, 4966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__115);
  __Pyx_GIVEREF(__pyx_tuple__115);

  /* "cuda/_cuda/ccuda.pyx":4975
 *     if __cuMemcpyDtoHAsync_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoHAsync_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*, CUdeviceptr, size_t, CUstream) nogil> __cuMemcpyDtoHAsync_v2)(dstHost, srcDevice, ByteCount, hStream)
 *     return err
 */
  __pyx_tuple__116 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyDtoHAsync_v2_no); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(0, 4975, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__116);
  __Pyx_GIVEREF(__pyx_tuple__116);

  /* "cuda/_cuda/ccuda.pyx":4984
 *     if __cuMemcpyDtoDAsync_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoDAsync_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, CUdeviceptr, size_t, CUstream) nogil> __cuMemcpyDtoDAsync_v2)(dstDevice, srcDevice, ByteCount, hStream)
 *     return err
 */
  __pyx_tuple__117 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyDtoDAsync_v2_no); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(0, 4984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__117);
  __Pyx_GIVEREF(__pyx_tuple__117);

  /* "cuda/_cuda/ccuda.pyx":4993
 *     if __cuMemcpyHtoAAsync_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyHtoAAsync_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray, size_t, const void*, size_t, CUstream) nogil> __cuMemcpyHtoAAsync_v2)(dstArray, dstOffset, srcHost, ByteCount, hStream)
 *     return err
 */
  __pyx_tuple__118 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyHtoAAsync_v2_no); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 4993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__118);
  __Pyx_GIVEREF(__pyx_tuple__118);

  /* "cuda/_cuda/ccuda.pyx":5002
 *     if __cuMemcpyAtoHAsync_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAtoHAsync_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*, CUarray, size_t, size_t, CUstream) nogil> __cuMemcpyAtoHAsync_v2)(dstHost, srcArray, srcOffset, ByteCount, hStream)
 *     return err
 */
  __pyx_tuple__119 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyAtoHAsync_v2_no); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(0, 5002, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__119);
  __Pyx_GIVEREF(__pyx_tuple__119);

  /* "cuda/_cuda/ccuda.pyx":5011
 *     if __cuMemcpy2DAsync_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy2DAsync_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const CUDA_MEMCPY2D*, CUstream) nogil> __cuMemcpy2DAsync_v2)(pCopy, hStream)
 *     return err
 */
  __pyx_tuple__120 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpy2DAsync_v2_not); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 5011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__120);
  __Pyx_GIVEREF(__pyx_tuple__120);

  /* "cuda/_cuda/ccuda.pyx":5020
 *     if __cuMemcpy3DAsync_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3DAsync_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const CUDA_MEMCPY3D*, CUstream) nogil> __cuMemcpy3DAsync_v2)(pCopy, hStream)
 *     return err
 */
  __pyx_tuple__121 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpy3DAsync_v2_not); if (unlikely(!__pyx_tuple__121)) __PYX_ERR(0, 5020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__121);
  __Pyx_GIVEREF(__pyx_tuple__121);

  /* "cuda/_cuda/ccuda.pyx":5029
 *     if __cuMemcpy3DPeerAsync == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3DPeerAsync" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const CUDA_MEMCPY3D_PEER*, CUstream) nogil> __cuMemcpy3DPeerAsync)(pCopy, hStream)
 *     return err
 */
  __pyx_tuple__122 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpy3DPeerAsync_not); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 5029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__122);
  __Pyx_GIVEREF(__pyx_tuple__122);

  /* "cuda/_cuda/ccuda.pyx":5038
 *     if __cuMemsetD8_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD8_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, unsigned char, size_t) nogil> __cuMemsetD8_v2)(dstDevice, uc, N)
 *     return err
 */
  __pyx_tuple__123 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD8_v2_not_found); if (unlikely(!__pyx_tuple__123)) __PYX_ERR(0, 5038, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__123);
  __Pyx_GIVEREF(__pyx_tuple__123);

  /* "cuda/_cuda/ccuda.pyx":5047
 *     if __cuMemsetD16_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD16_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, unsigned short, size_t) nogil> __cuMemsetD16_v2)(dstDevice, us, N)
 *     return err
 */
  __pyx_tuple__124 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD16_v2_not_foun); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 5047, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__124);
  __Pyx_GIVEREF(__pyx_tuple__124);

  /* "cuda/_cuda/ccuda.pyx":5056
 *     if __cuMemsetD32_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD32_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, unsigned int, size_t) nogil> __cuMemsetD32_v2)(dstDevice, ui, N)
 *     return err
 */
  __pyx_tuple__125 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD32_v2_not_foun); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(0, 5056, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__125);
  __Pyx_GIVEREF(__pyx_tuple__125);

  /* "cuda/_cuda/ccuda.pyx":5065
 *     if __cuMemsetD2D8_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D8_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned char, size_t, size_t) nogil> __cuMemsetD2D8_v2)(dstDevice, dstPitch, uc, Width, Height)
 *     return err
 */
  __pyx_tuple__126 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD2D8_v2_not_fou); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(0, 5065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__126);
  __Pyx_GIVEREF(__pyx_tuple__126);

  /* "cuda/_cuda/ccuda.pyx":5074
 *     if __cuMemsetD2D16_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D16_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned short, size_t, size_t) nogil> __cuMemsetD2D16_v2)(dstDevice, dstPitch, us, Width, Height)
 *     return err
 */
  __pyx_tuple__127 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD2D16_v2_not_fo); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(0, 5074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__127);
  __Pyx_GIVEREF(__pyx_tuple__127);

  /* "cuda/_cuda/ccuda.pyx":5083
 *     if __cuMemsetD2D32_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D32_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned int, size_t, size_t) nogil> __cuMemsetD2D32_v2)(dstDevice, dstPitch, ui, Width, Height)
 *     return err
 */
  __pyx_tuple__128 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD2D32_v2_not_fo); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(0, 5083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__128);
  __Pyx_GIVEREF(__pyx_tuple__128);

  /* "cuda/_cuda/ccuda.pyx":5092
 *     if __cuMemsetD8Async == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD8Async" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, unsigned char, size_t, CUstream) nogil> __cuMemsetD8Async)(dstDevice, uc, N, hStream)
 *     return err
 */
  __pyx_tuple__129 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD8Async_not_fou); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(0, 5092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__129);
  __Pyx_GIVEREF(__pyx_tuple__129);

  /* "cuda/_cuda/ccuda.pyx":5101
 *     if __cuMemsetD16Async == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD16Async" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, unsigned short, size_t, CUstream) nogil> __cuMemsetD16Async)(dstDevice, us, N, hStream)
 *     return err
 */
  __pyx_tuple__130 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD16Async_not_fo); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(0, 5101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__130);
  __Pyx_GIVEREF(__pyx_tuple__130);

  /* "cuda/_cuda/ccuda.pyx":5110
 *     if __cuMemsetD32Async == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD32Async" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, unsigned int, size_t, CUstream) nogil> __cuMemsetD32Async)(dstDevice, ui, N, hStream)
 *     return err
 */
  __pyx_tuple__131 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD32Async_not_fo); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(0, 5110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__131);
  __Pyx_GIVEREF(__pyx_tuple__131);

  /* "cuda/_cuda/ccuda.pyx":5119
 *     if __cuMemsetD2D8Async == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D8Async" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned char, size_t, size_t, CUstream) nogil> __cuMemsetD2D8Async)(dstDevice, dstPitch, uc, Width, Height, hStream)
 *     return err
 */
  __pyx_tuple__132 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD2D8Async_not_f); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(0, 5119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__132);
  __Pyx_GIVEREF(__pyx_tuple__132);

  /* "cuda/_cuda/ccuda.pyx":5128
 *     if __cuMemsetD2D16Async == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D16Async" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned short, size_t, size_t, CUstream) nogil> __cuMemsetD2D16Async)(dstDevice, dstPitch, us, Width, Height, hStream)
 *     return err
 */
  __pyx_tuple__133 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD2D16Async_not); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(0, 5128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__133);
  __Pyx_GIVEREF(__pyx_tuple__133);

  /* "cuda/_cuda/ccuda.pyx":5137
 *     if __cuMemsetD2D32Async == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D32Async" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t, unsigned int, size_t, size_t, CUstream) nogil> __cuMemsetD2D32Async)(dstDevice, dstPitch, ui, Width, Height, hStream)
 *     return err
 */
  __pyx_tuple__134 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD2D32Async_not); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(0, 5137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__134);
  __Pyx_GIVEREF(__pyx_tuple__134);

  /* "cuda/_cuda/ccuda.pyx":5146
 *     if __cuArrayCreate_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuArrayCreate_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray*, const CUDA_ARRAY_DESCRIPTOR*) nogil> __cuArrayCreate_v2)(pHandle, pAllocateArray)
 *     return err
 */
  __pyx_tuple__135 = PyTuple_Pack(1, __pyx_kp_u_Function_cuArrayCreate_v2_not_fo); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(0, 5146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__135);
  __Pyx_GIVEREF(__pyx_tuple__135);

  /* "cuda/_cuda/ccuda.pyx":5155
 *     if __cuArrayGetDescriptor_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetDescriptor_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUDA_ARRAY_DESCRIPTOR*, CUarray) nogil> __cuArrayGetDescriptor_v2)(pArrayDescriptor, hArray)
 *     return err
 */
  __pyx_tuple__136 = PyTuple_Pack(1, __pyx_kp_u_Function_cuArrayGetDescriptor_v2); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(0, 5155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__136);
  __Pyx_GIVEREF(__pyx_tuple__136);

  /* "cuda/_cuda/ccuda.pyx":5164
 *     if __cuArrayGetSparseProperties == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetSparseProperties" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUDA_ARRAY_SPARSE_PROPERTIES*, CUarray) nogil> __cuArrayGetSparseProperties)(sparseProperties, array)
 *     return err
 */
  __pyx_tuple__137 = PyTuple_Pack(1, __pyx_kp_u_Function_cuArrayGetSparsePropert); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(0, 5164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__137);
  __Pyx_GIVEREF(__pyx_tuple__137);

  /* "cuda/_cuda/ccuda.pyx":5173
 *     if __cuMipmappedArrayGetSparseProperties == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayGetSparseProperties" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUDA_ARRAY_SPARSE_PROPERTIES*, CUmipmappedArray) nogil> __cuMipmappedArrayGetSparseProperties)(sparseProperties, mipmap)
 *     return err
 */
  __pyx_tuple__138 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMipmappedArrayGetSpar); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(0, 5173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__138);
  __Pyx_GIVEREF(__pyx_tuple__138);

  /* "cuda/_cuda/ccuda.pyx":5182
 *     if __cuArrayGetMemoryRequirements == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetMemoryRequirements" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUDA_ARRAY_MEMORY_REQUIREMENTS*, CUarray, CUdevice) nogil> __cuArrayGetMemoryRequirements)(memoryRequirements, array, device)
 *     return err
 */
  __pyx_tuple__139 = PyTuple_Pack(1, __pyx_kp_u_Function_cuArrayGetMemoryRequire); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(0, 5182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__139);
  __Pyx_GIVEREF(__pyx_tuple__139);

  /* "cuda/_cuda/ccuda.pyx":5191
 *     if __cuMipmappedArrayGetMemoryRequirements == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayGetMemoryRequirements" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUDA_ARRAY_MEMORY_REQUIREMENTS*, CUmipmappedArray, CUdevice) nogil> __cuMipmappedArrayGetMemoryRequirements)(memoryRequirements, mipmap, device)
 *     return err
 */
  __pyx_tuple__140 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMipmappedArrayGetMemo); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(0, 5191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__140);
  __Pyx_GIVEREF(__pyx_tuple__140);

  /* "cuda/_cuda/ccuda.pyx":5200
 *     if __cuArrayGetPlane == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetPlane" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray*, CUarray, unsigned int) nogil> __cuArrayGetPlane)(pPlaneArray, hArray, planeIdx)
 *     return err
 */
  __pyx_tuple__141 = PyTuple_Pack(1, __pyx_kp_u_Function_cuArrayGetPlane_not_fou); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(0, 5200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__141);
  __Pyx_GIVEREF(__pyx_tuple__141);

  /* "cuda/_cuda/ccuda.pyx":5209
 *     if __cuArrayDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuArrayDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray) nogil> __cuArrayDestroy)(hArray)
 *     return err
 */
  __pyx_tuple__142 = PyTuple_Pack(1, __pyx_kp_u_Function_cuArrayDestroy_not_foun); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(0, 5209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__142);
  __Pyx_GIVEREF(__pyx_tuple__142);

  /* "cuda/_cuda/ccuda.pyx":5218
 *     if __cuArray3DCreate_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuArray3DCreate_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray*, const CUDA_ARRAY3D_DESCRIPTOR*) nogil> __cuArray3DCreate_v2)(pHandle, pAllocateArray)
 *     return err
 */
  __pyx_tuple__143 = PyTuple_Pack(1, __pyx_kp_u_Function_cuArray3DCreate_v2_not); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(0, 5218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__143);
  __Pyx_GIVEREF(__pyx_tuple__143);

  /* "cuda/_cuda/ccuda.pyx":5227
 *     if __cuArray3DGetDescriptor_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuArray3DGetDescriptor_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUDA_ARRAY3D_DESCRIPTOR*, CUarray) nogil> __cuArray3DGetDescriptor_v2)(pArrayDescriptor, hArray)
 *     return err
 */
  __pyx_tuple__144 = PyTuple_Pack(1, __pyx_kp_u_Function_cuArray3DGetDescriptor); if (unlikely(!__pyx_tuple__144)) __PYX_ERR(0, 5227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__144);
  __Pyx_GIVEREF(__pyx_tuple__144);

  /* "cuda/_cuda/ccuda.pyx":5236
 *     if __cuMipmappedArrayCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmipmappedArray*, const CUDA_ARRAY3D_DESCRIPTOR*, unsigned int) nogil> __cuMipmappedArrayCreate)(pHandle, pMipmappedArrayDesc, numMipmapLevels)
 *     return err
 */
  __pyx_tuple__145 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMipmappedArrayCreate); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(0, 5236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__145);
  __Pyx_GIVEREF(__pyx_tuple__145);

  /* "cuda/_cuda/ccuda.pyx":5245
 *     if __cuMipmappedArrayGetLevel == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayGetLevel" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray*, CUmipmappedArray, unsigned int) nogil> __cuMipmappedArrayGetLevel)(pLevelArray, hMipmappedArray, level)
 *     return err
 */
  __pyx_tuple__146 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMipmappedArrayGetLeve); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(0, 5245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__146);
  __Pyx_GIVEREF(__pyx_tuple__146);

  /* "cuda/_cuda/ccuda.pyx":5254
 *     if __cuMipmappedArrayDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmipmappedArray) nogil> __cuMipmappedArrayDestroy)(hMipmappedArray)
 *     return err
 */
  __pyx_tuple__147 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMipmappedArrayDestroy); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(0, 5254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__147);
  __Pyx_GIVEREF(__pyx_tuple__147);

  /* "cuda/_cuda/ccuda.pyx":5263
 *     if __cuMemGetHandleForAddressRange == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetHandleForAddressRange" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*, CUdeviceptr, size_t, CUmemRangeHandleType, unsigned long long) nogil> __cuMemGetHandleForAddressRange)(handle, dptr, size, handleType, flags)
 *     return err
 */
  __pyx_tuple__148 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemGetHandleForAddres); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(0, 5263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__148);
  __Pyx_GIVEREF(__pyx_tuple__148);

  /* "cuda/_cuda/ccuda.pyx":5272
 *     if __cuMemAddressReserve == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemAddressReserve" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, size_t, size_t, CUdeviceptr, unsigned long long) nogil> __cuMemAddressReserve)(ptr, size, alignment, addr, flags)
 *     return err
 */
  __pyx_tuple__149 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAddressReserve_not); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(0, 5272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__149);
  __Pyx_GIVEREF(__pyx_tuple__149);

  /* "cuda/_cuda/ccuda.pyx":5281
 *     if __cuMemAddressFree == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemAddressFree" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t) nogil> __cuMemAddressFree)(ptr, size)
 *     return err
 */
  __pyx_tuple__150 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAddressFree_not_fo); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(0, 5281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__150);
  __Pyx_GIVEREF(__pyx_tuple__150);

  /* "cuda/_cuda/ccuda.pyx":5290
 *     if __cuMemCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, size_t, const CUmemAllocationProp*, unsigned long long) nogil> __cuMemCreate)(handle, size, prop, flags)
 *     return err
 */
  __pyx_tuple__151 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemCreate_not_found); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(0, 5290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__151);
  __Pyx_GIVEREF(__pyx_tuple__151);

  /* "cuda/_cuda/ccuda.pyx":5299
 *     if __cuMemRelease == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemRelease" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle) nogil> __cuMemRelease)(handle)
 *     return err
 */
  __pyx_tuple__152 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemRelease_not_found); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(0, 5299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__152);
  __Pyx_GIVEREF(__pyx_tuple__152);

  /* "cuda/_cuda/ccuda.pyx":5308
 *     if __cuMemMap == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemMap" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t, size_t, CUmemGenericAllocationHandle, unsigned long long) nogil> __cuMemMap)(ptr, size, offset, handle, flags)
 *     return err
 */
  __pyx_tuple__153 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemMap_not_found); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(0, 5308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__153);
  __Pyx_GIVEREF(__pyx_tuple__153);

  /* "cuda/_cuda/ccuda.pyx":5317
 *     if __cuMemMapArrayAsync == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemMapArrayAsync" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarrayMapInfo*, unsigned int, CUstream) nogil> __cuMemMapArrayAsync)(mapInfoList, count, hStream)
 *     return err
 */
  __pyx_tuple__154 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemMapArrayAsync_not); if (unlikely(!__pyx_tuple__154)) __PYX_ERR(0, 5317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__154);
  __Pyx_GIVEREF(__pyx_tuple__154);

  /* "cuda/_cuda/ccuda.pyx":5326
 *     if __cuMemUnmap == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemUnmap" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t) nogil> __cuMemUnmap)(ptr, size)
 *     return err
 */
  __pyx_tuple__155 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemUnmap_not_found); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(0, 5326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__155);
  __Pyx_GIVEREF(__pyx_tuple__155);

  /* "cuda/_cuda/ccuda.pyx":5335
 *     if __cuMemSetAccess == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemSetAccess" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t, const CUmemAccessDesc*, size_t) nogil> __cuMemSetAccess)(ptr, size, desc, count)
 *     return err
 */
  __pyx_tuple__156 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemSetAccess_not_foun); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(0, 5335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__156);
  __Pyx_GIVEREF(__pyx_tuple__156);

  /* "cuda/_cuda/ccuda.pyx":5344
 *     if __cuMemGetAccess == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAccess" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned long long*, const CUmemLocation*, CUdeviceptr) nogil> __cuMemGetAccess)(flags, location, ptr)
 *     return err
 */
  __pyx_tuple__157 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemGetAccess_not_foun); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(0, 5344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__157);
  __Pyx_GIVEREF(__pyx_tuple__157);

  /* "cuda/_cuda/ccuda.pyx":5353
 *     if __cuMemExportToShareableHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemExportToShareableHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*, CUmemGenericAllocationHandle, CUmemAllocationHandleType, unsigned long long) nogil> __cuMemExportToShareableHandle)(shareableHandle, handle, handleType, flags)
 *     return err
 */
  __pyx_tuple__158 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemExportToShareableH); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(0, 5353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__158);
  __Pyx_GIVEREF(__pyx_tuple__158);

  /* "cuda/_cuda/ccuda.pyx":5362
 *     if __cuMemImportFromShareableHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemImportFromShareableHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, void*, CUmemAllocationHandleType) nogil> __cuMemImportFromShareableHandle)(handle, osHandle, shHandleType)
 *     return err
 */
  __pyx_tuple__159 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemImportFromShareabl); if (unlikely(!__pyx_tuple__159)) __PYX_ERR(0, 5362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__159);
  __Pyx_GIVEREF(__pyx_tuple__159);

  /* "cuda/_cuda/ccuda.pyx":5371
 *     if __cuMemGetAllocationGranularity == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAllocationGranularity" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(size_t*, const CUmemAllocationProp*, CUmemAllocationGranularity_flags) nogil> __cuMemGetAllocationGranularity)(granularity, prop, option)
 *     return err
 */
  __pyx_tuple__160 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemGetAllocationGranu); if (unlikely(!__pyx_tuple__160)) __PYX_ERR(0, 5371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__160);
  __Pyx_GIVEREF(__pyx_tuple__160);

  /* "cuda/_cuda/ccuda.pyx":5380
 *     if __cuMemGetAllocationPropertiesFromHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAllocationPropertiesFromHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemAllocationProp*, CUmemGenericAllocationHandle) nogil> __cuMemGetAllocationPropertiesFromHandle)(prop, handle)
 *     return err
 */
  __pyx_tuple__161 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemGetAllocationPrope); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(0, 5380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__161);
  __Pyx_GIVEREF(__pyx_tuple__161);

  /* "cuda/_cuda/ccuda.pyx":5389
 *     if __cuMemRetainAllocationHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemRetainAllocationHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, void*) nogil> __cuMemRetainAllocationHandle)(handle, addr)
 *     return err
 */
  __pyx_tuple__162 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemRetainAllocationHa); if (unlikely(!__pyx_tuple__162)) __PYX_ERR(0, 5389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__162);
  __Pyx_GIVEREF(__pyx_tuple__162);

  /* "cuda/_cuda/ccuda.pyx":5398
 *     if __cuMemFreeAsync == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemFreeAsync" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, CUstream) nogil> __cuMemFreeAsync)(dptr, hStream)
 *     return err
 */
  __pyx_tuple__163 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemFreeAsync_not_foun); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(0, 5398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__163);
  __Pyx_GIVEREF(__pyx_tuple__163);

  /* "cuda/_cuda/ccuda.pyx":5407
 *     if __cuMemAllocAsync == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocAsync" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, size_t, CUstream) nogil> __cuMemAllocAsync)(dptr, bytesize, hStream)
 *     return err
 */
  __pyx_tuple__164 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAllocAsync_not_fou); if (unlikely(!__pyx_tuple__164)) __PYX_ERR(0, 5407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__164);
  __Pyx_GIVEREF(__pyx_tuple__164);

  /* "cuda/_cuda/ccuda.pyx":5416
 *     if __cuMemPoolTrimTo == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolTrimTo" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool, size_t) nogil> __cuMemPoolTrimTo)(pool, minBytesToKeep)
 *     return err
 */
  __pyx_tuple__165 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolTrimTo_not_fou); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(0, 5416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__165);
  __Pyx_GIVEREF(__pyx_tuple__165);

  /* "cuda/_cuda/ccuda.pyx":5425
 *     if __cuMemPoolSetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolSetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool, CUmemPool_attribute, void*) nogil> __cuMemPoolSetAttribute)(pool, attr, value)
 *     return err
 */
  __pyx_tuple__166 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolSetAttribute_n); if (unlikely(!__pyx_tuple__166)) __PYX_ERR(0, 5425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__166);
  __Pyx_GIVEREF(__pyx_tuple__166);

  /* "cuda/_cuda/ccuda.pyx":5434
 *     if __cuMemPoolGetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolGetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool, CUmemPool_attribute, void*) nogil> __cuMemPoolGetAttribute)(pool, attr, value)
 *     return err
 */
  __pyx_tuple__167 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolGetAttribute_n); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(0, 5434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__167);
  __Pyx_GIVEREF(__pyx_tuple__167);

  /* "cuda/_cuda/ccuda.pyx":5443
 *     if __cuMemPoolSetAccess == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolSetAccess" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool, const CUmemAccessDesc*, size_t) nogil> __cuMemPoolSetAccess)(pool, map, count)
 *     return err
 */
  __pyx_tuple__168 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolSetAccess_not); if (unlikely(!__pyx_tuple__168)) __PYX_ERR(0, 5443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__168);
  __Pyx_GIVEREF(__pyx_tuple__168);

  /* "cuda/_cuda/ccuda.pyx":5452
 *     if __cuMemPoolGetAccess == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolGetAccess" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemAccess_flags*, CUmemoryPool, CUmemLocation*) nogil> __cuMemPoolGetAccess)(flags, memPool, location)
 *     return err
 */
  __pyx_tuple__169 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolGetAccess_not); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(0, 5452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__169);
  __Pyx_GIVEREF(__pyx_tuple__169);

  /* "cuda/_cuda/ccuda.pyx":5461
 *     if __cuMemPoolCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool*, const CUmemPoolProps*) nogil> __cuMemPoolCreate)(pool, poolProps)
 *     return err
 */
  __pyx_tuple__170 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolCreate_not_fou); if (unlikely(!__pyx_tuple__170)) __PYX_ERR(0, 5461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__170);
  __Pyx_GIVEREF(__pyx_tuple__170);

  /* "cuda/_cuda/ccuda.pyx":5470
 *     if __cuMemPoolDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool) nogil> __cuMemPoolDestroy)(pool)
 *     return err
 */
  __pyx_tuple__171 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolDestroy_not_fo); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(0, 5470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__171);
  __Pyx_GIVEREF(__pyx_tuple__171);

  /* "cuda/_cuda/ccuda.pyx":5479
 *     if __cuMemAllocFromPoolAsync == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocFromPoolAsync" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, size_t, CUmemoryPool, CUstream) nogil> __cuMemAllocFromPoolAsync)(dptr, bytesize, pool, hStream)
 *     return err
 */
  __pyx_tuple__172 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAllocFromPoolAsync); if (unlikely(!__pyx_tuple__172)) __PYX_ERR(0, 5479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__172);
  __Pyx_GIVEREF(__pyx_tuple__172);

  /* "cuda/_cuda/ccuda.pyx":5488
 *     if __cuMemPoolExportToShareableHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolExportToShareableHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*, CUmemoryPool, CUmemAllocationHandleType, unsigned long long) nogil> __cuMemPoolExportToShareableHandle)(handle_out, pool, handleType, flags)
 *     return err
 */
  __pyx_tuple__173 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolExportToSharea); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(0, 5488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__173);
  __Pyx_GIVEREF(__pyx_tuple__173);

  /* "cuda/_cuda/ccuda.pyx":5497
 *     if __cuMemPoolImportFromShareableHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolImportFromShareableHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool*, void*, CUmemAllocationHandleType, unsigned long long) nogil> __cuMemPoolImportFromShareableHandle)(pool_out, handle, handleType, flags)
 *     return err
 */
  __pyx_tuple__174 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolImportFromShar); if (unlikely(!__pyx_tuple__174)) __PYX_ERR(0, 5497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__174);
  __Pyx_GIVEREF(__pyx_tuple__174);

  /* "cuda/_cuda/ccuda.pyx":5506
 *     if __cuMemPoolExportPointer == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolExportPointer" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemPoolPtrExportData*, CUdeviceptr) nogil> __cuMemPoolExportPointer)(shareData_out, ptr)
 *     return err
 */
  __pyx_tuple__175 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolExportPointer); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(0, 5506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__175);
  __Pyx_GIVEREF(__pyx_tuple__175);

  /* "cuda/_cuda/ccuda.pyx":5515
 *     if __cuMemPoolImportPointer == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolImportPointer" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, CUmemoryPool, CUmemPoolPtrExportData*) nogil> __cuMemPoolImportPointer)(ptr_out, pool, shareData)
 *     return err
 */
  __pyx_tuple__176 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolImportPointer); if (unlikely(!__pyx_tuple__176)) __PYX_ERR(0, 5515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__176);
  __Pyx_GIVEREF(__pyx_tuple__176);

  /* "cuda/_cuda/ccuda.pyx":5524
 *     if __cuMulticastCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, const CUmulticastObjectProp*) nogil> __cuMulticastCreate)(mcHandle, prop)
 *     return err
 */
  __pyx_tuple__177 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMulticastCreate_not_f); if (unlikely(!__pyx_tuple__177)) __PYX_ERR(0, 5524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__177);
  __Pyx_GIVEREF(__pyx_tuple__177);

  /* "cuda/_cuda/ccuda.pyx":5533
 *     if __cuMulticastAddDevice == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastAddDevice" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle, CUdevice) nogil> __cuMulticastAddDevice)(mcHandle, dev)
 *     return err
 */
  __pyx_tuple__178 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMulticastAddDevice_no); if (unlikely(!__pyx_tuple__178)) __PYX_ERR(0, 5533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__178);
  __Pyx_GIVEREF(__pyx_tuple__178);

  /* "cuda/_cuda/ccuda.pyx":5542
 *     if __cuMulticastBindMem == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastBindMem" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle, size_t, CUmemGenericAllocationHandle, size_t, size_t, unsigned long long) nogil> __cuMulticastBindMem)(mcHandle, mcOffset, memHandle, memOffset, size, flags)
 *     return err
 */
  __pyx_tuple__179 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMulticastBindMem_not); if (unlikely(!__pyx_tuple__179)) __PYX_ERR(0, 5542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__179);
  __Pyx_GIVEREF(__pyx_tuple__179);

  /* "cuda/_cuda/ccuda.pyx":5551
 *     if __cuMulticastBindAddr == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastBindAddr" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle, size_t, CUdeviceptr, size_t, unsigned long long) nogil> __cuMulticastBindAddr)(mcHandle, mcOffset, memptr, size, flags)
 *     return err
 */
  __pyx_tuple__180 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMulticastBindAddr_not); if (unlikely(!__pyx_tuple__180)) __PYX_ERR(0, 5551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__180);
  __Pyx_GIVEREF(__pyx_tuple__180);

  /* "cuda/_cuda/ccuda.pyx":5560
 *     if __cuMulticastUnbind == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastUnbind" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle, CUdevice, size_t, size_t) nogil> __cuMulticastUnbind)(mcHandle, dev, mcOffset, size)
 *     return err
 */
  __pyx_tuple__181 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMulticastUnbind_not_f); if (unlikely(!__pyx_tuple__181)) __PYX_ERR(0, 5560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__181);
  __Pyx_GIVEREF(__pyx_tuple__181);

  /* "cuda/_cuda/ccuda.pyx":5569
 *     if __cuMulticastGetGranularity == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMulticastGetGranularity" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(size_t*, const CUmulticastObjectProp*, CUmulticastGranularity_flags) nogil> __cuMulticastGetGranularity)(granularity, prop, option)
 *     return err
 */
  __pyx_tuple__182 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMulticastGetGranulari); if (unlikely(!__pyx_tuple__182)) __PYX_ERR(0, 5569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__182);
  __Pyx_GIVEREF(__pyx_tuple__182);

  /* "cuda/_cuda/ccuda.pyx":5578
 *     if __cuPointerGetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuPointerGetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*, CUpointer_attribute, CUdeviceptr) nogil> __cuPointerGetAttribute)(data, attribute, ptr)
 *     return err
 */
  __pyx_tuple__183 = PyTuple_Pack(1, __pyx_kp_u_Function_cuPointerGetAttribute_n); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(0, 5578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__183);
  __Pyx_GIVEREF(__pyx_tuple__183);

  /* "cuda/_cuda/ccuda.pyx":5587
 *     if __cuMemPrefetchAsync == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPrefetchAsync" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t, CUdevice, CUstream) nogil> __cuMemPrefetchAsync)(devPtr, count, dstDevice, hStream)
 *     return err
 */
  __pyx_tuple__184 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPrefetchAsync_not); if (unlikely(!__pyx_tuple__184)) __PYX_ERR(0, 5587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__184);
  __Pyx_GIVEREF(__pyx_tuple__184);

  /* "cuda/_cuda/ccuda.pyx":5596
 *     if __cuMemPrefetchAsync_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPrefetchAsync_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t, CUmemLocation, unsigned int, CUstream) nogil> __cuMemPrefetchAsync_v2)(devPtr, count, location, flags, hStream)
 *     return err
 */
  __pyx_tuple__185 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPrefetchAsync_v2_n); if (unlikely(!__pyx_tuple__185)) __PYX_ERR(0, 5596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__185);
  __Pyx_GIVEREF(__pyx_tuple__185);

  /* "cuda/_cuda/ccuda.pyx":5605
 *     if __cuMemAdvise == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemAdvise" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t, CUmem_advise, CUdevice) nogil> __cuMemAdvise)(devPtr, count, advice, device)
 *     return err
 */
  __pyx_tuple__186 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAdvise_not_found); if (unlikely(!__pyx_tuple__186)) __PYX_ERR(0, 5605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__186);
  __Pyx_GIVEREF(__pyx_tuple__186);

  /* "cuda/_cuda/ccuda.pyx":5614
 *     if __cuMemAdvise_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemAdvise_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t, CUmem_advise, CUmemLocation) nogil> __cuMemAdvise_v2)(devPtr, count, advice, location)
 *     return err
 */
  __pyx_tuple__187 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAdvise_v2_not_foun); if (unlikely(!__pyx_tuple__187)) __PYX_ERR(0, 5614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__187);
  __Pyx_GIVEREF(__pyx_tuple__187);

  /* "cuda/_cuda/ccuda.pyx":5623
 *     if __cuMemRangeGetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemRangeGetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*, size_t, CUmem_range_attribute, CUdeviceptr, size_t) nogil> __cuMemRangeGetAttribute)(data, dataSize, attribute, devPtr, count)
 *     return err
 */
  __pyx_tuple__188 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemRangeGetAttribute); if (unlikely(!__pyx_tuple__188)) __PYX_ERR(0, 5623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__188);
  __Pyx_GIVEREF(__pyx_tuple__188);

  /* "cuda/_cuda/ccuda.pyx":5632
 *     if __cuMemRangeGetAttributes == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemRangeGetAttributes" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void**, size_t*, CUmem_range_attribute*, size_t, CUdeviceptr, size_t) nogil> __cuMemRangeGetAttributes)(data, dataSizes, attributes, numAttributes, devPtr, count)
 *     return err
 */
  __pyx_tuple__189 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemRangeGetAttributes); if (unlikely(!__pyx_tuple__189)) __PYX_ERR(0, 5632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__189);
  __Pyx_GIVEREF(__pyx_tuple__189);

  /* "cuda/_cuda/ccuda.pyx":5641
 *     if __cuPointerSetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuPointerSetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const void*, CUpointer_attribute, CUdeviceptr) nogil> __cuPointerSetAttribute)(value, attribute, ptr)
 *     return err
 */
  __pyx_tuple__190 = PyTuple_Pack(1, __pyx_kp_u_Function_cuPointerSetAttribute_n); if (unlikely(!__pyx_tuple__190)) __PYX_ERR(0, 5641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__190);
  __Pyx_GIVEREF(__pyx_tuple__190);

  /* "cuda/_cuda/ccuda.pyx":5650
 *     if __cuPointerGetAttributes == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuPointerGetAttributes" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int, CUpointer_attribute*, void**, CUdeviceptr) nogil> __cuPointerGetAttributes)(numAttributes, attributes, data, ptr)
 *     return err
 */
  __pyx_tuple__191 = PyTuple_Pack(1, __pyx_kp_u_Function_cuPointerGetAttributes); if (unlikely(!__pyx_tuple__191)) __PYX_ERR(0, 5650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__191);
  __Pyx_GIVEREF(__pyx_tuple__191);

  /* "cuda/_cuda/ccuda.pyx":5659
 *     if __cuStreamCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream*, unsigned int) nogil> __cuStreamCreate)(phStream, Flags)
 *     return err
 */
  __pyx_tuple__192 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamCreate_not_foun); if (unlikely(!__pyx_tuple__192)) __PYX_ERR(0, 5659, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__192);
  __Pyx_GIVEREF(__pyx_tuple__192);

  /* "cuda/_cuda/ccuda.pyx":5668
 *     if __cuStreamCreateWithPriority == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCreateWithPriority" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream*, unsigned int, int) nogil> __cuStreamCreateWithPriority)(phStream, flags, priority)
 *     return err
 */
  __pyx_tuple__193 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamCreateWithPrior); if (unlikely(!__pyx_tuple__193)) __PYX_ERR(0, 5668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__193);
  __Pyx_GIVEREF(__pyx_tuple__193);

  /* "cuda/_cuda/ccuda.pyx":5677
 *     if __cuStreamGetPriority == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetPriority" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, int*) nogil> __cuStreamGetPriority)(hStream, priority)
 *     return err
 */
  __pyx_tuple__194 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamGetPriority_not); if (unlikely(!__pyx_tuple__194)) __PYX_ERR(0, 5677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__194);
  __Pyx_GIVEREF(__pyx_tuple__194);

  /* "cuda/_cuda/ccuda.pyx":5686
 *     if __cuStreamGetFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, unsigned int*) nogil> __cuStreamGetFlags)(hStream, flags)
 *     return err
 */
  __pyx_tuple__195 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamGetFlags_not_fo); if (unlikely(!__pyx_tuple__195)) __PYX_ERR(0, 5686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__195);
  __Pyx_GIVEREF(__pyx_tuple__195);

  /* "cuda/_cuda/ccuda.pyx":5695
 *     if __cuStreamGetId == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetId" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, unsigned long long*) nogil> __cuStreamGetId)(hStream, streamId)
 *     return err
 */
  __pyx_tuple__196 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamGetId_not_found); if (unlikely(!__pyx_tuple__196)) __PYX_ERR(0, 5695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__196);
  __Pyx_GIVEREF(__pyx_tuple__196);

  /* "cuda/_cuda/ccuda.pyx":5704
 *     if __cuStreamGetCtx == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetCtx" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUcontext*) nogil> __cuStreamGetCtx)(hStream, pctx)
 *     return err
 */
  __pyx_tuple__197 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamGetCtx_not_foun); if (unlikely(!__pyx_tuple__197)) __PYX_ERR(0, 5704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__197);
  __Pyx_GIVEREF(__pyx_tuple__197);

  /* "cuda/_cuda/ccuda.pyx":5713
 *     if __cuStreamWaitEvent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitEvent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUevent, unsigned int) nogil> __cuStreamWaitEvent)(hStream, hEvent, Flags)
 *     return err
 */
  __pyx_tuple__198 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamWaitEvent_not_f); if (unlikely(!__pyx_tuple__198)) __PYX_ERR(0, 5713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__198);
  __Pyx_GIVEREF(__pyx_tuple__198);

  /* "cuda/_cuda/ccuda.pyx":5722
 *     if __cuStreamAddCallback == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamAddCallback" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUstreamCallback, void*, unsigned int) nogil> __cuStreamAddCallback)(hStream, callback, userData, flags)
 *     return err
 */
  __pyx_tuple__199 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamAddCallback_not); if (unlikely(!__pyx_tuple__199)) __PYX_ERR(0, 5722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__199);
  __Pyx_GIVEREF(__pyx_tuple__199);

  /* "cuda/_cuda/ccuda.pyx":5731
 *     if __cuStreamBeginCapture_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamBeginCapture_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureMode) nogil> __cuStreamBeginCapture_v2)(hStream, mode)
 *     return err
 */
  __pyx_tuple__200 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamBeginCapture_v2); if (unlikely(!__pyx_tuple__200)) __PYX_ERR(0, 5731, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__200);
  __Pyx_GIVEREF(__pyx_tuple__200);

  /* "cuda/_cuda/ccuda.pyx":5740
 *     if __cuThreadExchangeStreamCaptureMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuThreadExchangeStreamCaptureMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstreamCaptureMode*) nogil> __cuThreadExchangeStreamCaptureMode)(mode)
 *     return err
 */
  __pyx_tuple__201 = PyTuple_Pack(1, __pyx_kp_u_Function_cuThreadExchangeStreamC); if (unlikely(!__pyx_tuple__201)) __PYX_ERR(0, 5740, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__201);
  __Pyx_GIVEREF(__pyx_tuple__201);

  /* "cuda/_cuda/ccuda.pyx":5749
 *     if __cuStreamEndCapture == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamEndCapture" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUgraph*) nogil> __cuStreamEndCapture)(hStream, phGraph)
 *     return err
 */
  __pyx_tuple__202 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamEndCapture_not); if (unlikely(!__pyx_tuple__202)) __PYX_ERR(0, 5749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__202);
  __Pyx_GIVEREF(__pyx_tuple__202);

  /* "cuda/_cuda/ccuda.pyx":5758
 *     if __cuStreamIsCapturing == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamIsCapturing" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureStatus*) nogil> __cuStreamIsCapturing)(hStream, captureStatus)
 *     return err
 */
  __pyx_tuple__203 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamIsCapturing_not); if (unlikely(!__pyx_tuple__203)) __PYX_ERR(0, 5758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__203);
  __Pyx_GIVEREF(__pyx_tuple__203);

  /* "cuda/_cuda/ccuda.pyx":5767
 *     if __cuStreamGetCaptureInfo_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetCaptureInfo_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureStatus*, cuuint64_t*, CUgraph*, const CUgraphNode**, size_t*) nogil> __cuStreamGetCaptureInfo_v2)(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out)
 *     return err
 */
  __pyx_tuple__204 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamGetCaptureInfo); if (unlikely(!__pyx_tuple__204)) __PYX_ERR(0, 5767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__204);
  __Pyx_GIVEREF(__pyx_tuple__204);

  /* "cuda/_cuda/ccuda.pyx":5776
 *     if __cuStreamUpdateCaptureDependencies == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamUpdateCaptureDependencies" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUgraphNode*, size_t, unsigned int) nogil> __cuStreamUpdateCaptureDependencies)(hStream, dependencies, numDependencies, flags)
 *     return err
 */
  __pyx_tuple__205 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamUpdateCaptureDe); if (unlikely(!__pyx_tuple__205)) __PYX_ERR(0, 5776, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__205);
  __Pyx_GIVEREF(__pyx_tuple__205);

  /* "cuda/_cuda/ccuda.pyx":5785
 *     if __cuStreamAttachMemAsync == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamAttachMemAsync" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, size_t, unsigned int) nogil> __cuStreamAttachMemAsync)(hStream, dptr, length, flags)
 *     return err
 */
  __pyx_tuple__206 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamAttachMemAsync); if (unlikely(!__pyx_tuple__206)) __PYX_ERR(0, 5785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__206);
  __Pyx_GIVEREF(__pyx_tuple__206);

  /* "cuda/_cuda/ccuda.pyx":5794
 *     if __cuStreamQuery == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamQuery" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamQuery)(hStream)
 *     return err
 */
  __pyx_tuple__207 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamQuery_not_found); if (unlikely(!__pyx_tuple__207)) __PYX_ERR(0, 5794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__207);
  __Pyx_GIVEREF(__pyx_tuple__207);

  /* "cuda/_cuda/ccuda.pyx":5803
 *     if __cuStreamSynchronize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamSynchronize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamSynchronize)(hStream)
 *     return err
 */
  __pyx_tuple__208 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamSynchronize_not); if (unlikely(!__pyx_tuple__208)) __PYX_ERR(0, 5803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__208);
  __Pyx_GIVEREF(__pyx_tuple__208);

  /* "cuda/_cuda/ccuda.pyx":5812
 *     if __cuStreamDestroy_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamDestroy_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamDestroy_v2)(hStream)
 *     return err
 */
  __pyx_tuple__209 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamDestroy_v2_not); if (unlikely(!__pyx_tuple__209)) __PYX_ERR(0, 5812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__209);
  __Pyx_GIVEREF(__pyx_tuple__209);

  /* "cuda/_cuda/ccuda.pyx":5821
 *     if __cuStreamCopyAttributes == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCopyAttributes" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUstream) nogil> __cuStreamCopyAttributes)(dst, src)
 *     return err
 */
  __pyx_tuple__210 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamCopyAttributes); if (unlikely(!__pyx_tuple__210)) __PYX_ERR(0, 5821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__210);
  __Pyx_GIVEREF(__pyx_tuple__210);

  /* "cuda/_cuda/ccuda.pyx":5830
 *     if __cuStreamGetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUstreamAttrID, CUstreamAttrValue*) nogil> __cuStreamGetAttribute)(hStream, attr, value_out)
 *     return err
 */
  __pyx_tuple__211 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamGetAttribute_no); if (unlikely(!__pyx_tuple__211)) __PYX_ERR(0, 5830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__211);
  __Pyx_GIVEREF(__pyx_tuple__211);

  /* "cuda/_cuda/ccuda.pyx":5839
 *     if __cuStreamSetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamSetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUstreamAttrID, const CUstreamAttrValue*) nogil> __cuStreamSetAttribute)(hStream, attr, value)
 *     return err
 */
  __pyx_tuple__212 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamSetAttribute_no); if (unlikely(!__pyx_tuple__212)) __PYX_ERR(0, 5839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__212);
  __Pyx_GIVEREF(__pyx_tuple__212);

  /* "cuda/_cuda/ccuda.pyx":5848
 *     if __cuEventCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent*, unsigned int) nogil> __cuEventCreate)(phEvent, Flags)
 *     return err
 */
  __pyx_tuple__213 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventCreate_not_found); if (unlikely(!__pyx_tuple__213)) __PYX_ERR(0, 5848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__213);
  __Pyx_GIVEREF(__pyx_tuple__213);

  /* "cuda/_cuda/ccuda.pyx":5857
 *     if __cuEventRecord == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventRecord" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent, CUstream) nogil> __cuEventRecord)(hEvent, hStream)
 *     return err
 */
  __pyx_tuple__214 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventRecord_not_found); if (unlikely(!__pyx_tuple__214)) __PYX_ERR(0, 5857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__214);
  __Pyx_GIVEREF(__pyx_tuple__214);

  /* "cuda/_cuda/ccuda.pyx":5866
 *     if __cuEventRecordWithFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventRecordWithFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent, CUstream, unsigned int) nogil> __cuEventRecordWithFlags)(hEvent, hStream, flags)
 *     return err
 */
  __pyx_tuple__215 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventRecordWithFlags); if (unlikely(!__pyx_tuple__215)) __PYX_ERR(0, 5866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__215);
  __Pyx_GIVEREF(__pyx_tuple__215);

  /* "cuda/_cuda/ccuda.pyx":5875
 *     if __cuEventQuery == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventQuery" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventQuery)(hEvent)
 *     return err
 */
  __pyx_tuple__216 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventQuery_not_found); if (unlikely(!__pyx_tuple__216)) __PYX_ERR(0, 5875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__216);
  __Pyx_GIVEREF(__pyx_tuple__216);

  /* "cuda/_cuda/ccuda.pyx":5884
 *     if __cuEventSynchronize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventSynchronize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventSynchronize)(hEvent)
 *     return err
 */
  __pyx_tuple__217 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventSynchronize_not); if (unlikely(!__pyx_tuple__217)) __PYX_ERR(0, 5884, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__217);
  __Pyx_GIVEREF(__pyx_tuple__217);

  /* "cuda/_cuda/ccuda.pyx":5893
 *     if __cuEventDestroy_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventDestroy_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventDestroy_v2)(hEvent)
 *     return err
 */
  __pyx_tuple__218 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventDestroy_v2_not_f); if (unlikely(!__pyx_tuple__218)) __PYX_ERR(0, 5893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__218);
  __Pyx_GIVEREF(__pyx_tuple__218);

  /* "cuda/_cuda/ccuda.pyx":5902
 *     if __cuEventElapsedTime == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventElapsedTime" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(float*, CUevent, CUevent) nogil> __cuEventElapsedTime)(pMilliseconds, hStart, hEnd)
 *     return err
 */
  __pyx_tuple__219 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventElapsedTime_not); if (unlikely(!__pyx_tuple__219)) __PYX_ERR(0, 5902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__219);
  __Pyx_GIVEREF(__pyx_tuple__219);

  /* "cuda/_cuda/ccuda.pyx":5911
 *     if __cuImportExternalMemory == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuImportExternalMemory" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUexternalMemory*, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC*) nogil> __cuImportExternalMemory)(extMem_out, memHandleDesc)
 *     return err
 */
  __pyx_tuple__220 = PyTuple_Pack(1, __pyx_kp_u_Function_cuImportExternalMemory); if (unlikely(!__pyx_tuple__220)) __PYX_ERR(0, 5911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__220);
  __Pyx_GIVEREF(__pyx_tuple__220);

  /* "cuda/_cuda/ccuda.pyx":5920
 *     if __cuExternalMemoryGetMappedBuffer == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuExternalMemoryGetMappedBuffer" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, CUexternalMemory, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC*) nogil> __cuExternalMemoryGetMappedBuffer)(devPtr, extMem, bufferDesc)
 *     return err
 */
  __pyx_tuple__221 = PyTuple_Pack(1, __pyx_kp_u_Function_cuExternalMemoryGetMapp); if (unlikely(!__pyx_tuple__221)) __PYX_ERR(0, 5920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__221);
  __Pyx_GIVEREF(__pyx_tuple__221);

  /* "cuda/_cuda/ccuda.pyx":5929
 *     if __cuExternalMemoryGetMappedMipmappedArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuExternalMemoryGetMappedMipmappedArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmipmappedArray*, CUexternalMemory, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC*) nogil> __cuExternalMemoryGetMappedMipmappedArray)(mipmap, extMem, mipmapDesc)
 *     return err
 */
  __pyx_tuple__222 = PyTuple_Pack(1, __pyx_kp_u_Function_cuExternalMemoryGetMapp_2); if (unlikely(!__pyx_tuple__222)) __PYX_ERR(0, 5929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__222);
  __Pyx_GIVEREF(__pyx_tuple__222);

  /* "cuda/_cuda/ccuda.pyx":5938
 *     if __cuDestroyExternalMemory == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDestroyExternalMemory" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUexternalMemory) nogil> __cuDestroyExternalMemory)(extMem)
 *     return err
 */
  __pyx_tuple__223 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDestroyExternalMemory); if (unlikely(!__pyx_tuple__223)) __PYX_ERR(0, 5938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__223);
  __Pyx_GIVEREF(__pyx_tuple__223);

  /* "cuda/_cuda/ccuda.pyx":5947
 *     if __cuImportExternalSemaphore == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuImportExternalSemaphore" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUexternalSemaphore*, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC*) nogil> __cuImportExternalSemaphore)(extSem_out, semHandleDesc)
 *     return err
 */
  __pyx_tuple__224 = PyTuple_Pack(1, __pyx_kp_u_Function_cuImportExternalSemapho); if (unlikely(!__pyx_tuple__224)) __PYX_ERR(0, 5947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__224);
  __Pyx_GIVEREF(__pyx_tuple__224);

  /* "cuda/_cuda/ccuda.pyx":5956
 *     if __cuSignalExternalSemaphoresAsync == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuSignalExternalSemaphoresAsync" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const CUexternalSemaphore*, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS*, unsigned int, CUstream) nogil> __cuSignalExternalSemaphoresAsync)(extSemArray, paramsArray, numExtSems, stream)
 *     return err
 */
  __pyx_tuple__225 = PyTuple_Pack(1, __pyx_kp_u_Function_cuSignalExternalSemapho); if (unlikely(!__pyx_tuple__225)) __PYX_ERR(0, 5956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__225);
  __Pyx_GIVEREF(__pyx_tuple__225);

  /* "cuda/_cuda/ccuda.pyx":5965
 *     if __cuWaitExternalSemaphoresAsync == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuWaitExternalSemaphoresAsync" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const CUexternalSemaphore*, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS*, unsigned int, CUstream) nogil> __cuWaitExternalSemaphoresAsync)(extSemArray, paramsArray, numExtSems, stream)
 *     return err
 */
  __pyx_tuple__226 = PyTuple_Pack(1, __pyx_kp_u_Function_cuWaitExternalSemaphore); if (unlikely(!__pyx_tuple__226)) __PYX_ERR(0, 5965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__226);
  __Pyx_GIVEREF(__pyx_tuple__226);

  /* "cuda/_cuda/ccuda.pyx":5974
 *     if __cuDestroyExternalSemaphore == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDestroyExternalSemaphore" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUexternalSemaphore) nogil> __cuDestroyExternalSemaphore)(extSem)
 *     return err
 */
  __pyx_tuple__227 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDestroyExternalSemaph); if (unlikely(!__pyx_tuple__227)) __PYX_ERR(0, 5974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__227);
  __Pyx_GIVEREF(__pyx_tuple__227);

  /* "cuda/_cuda/ccuda.pyx":5983
 *     if __cuStreamWaitValue32_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitValue32_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int) nogil> __cuStreamWaitValue32_v2)(stream, addr, value, flags)
 *     return err
 */
  __pyx_tuple__228 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamWaitValue32_v2); if (unlikely(!__pyx_tuple__228)) __PYX_ERR(0, 5983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__228);
  __Pyx_GIVEREF(__pyx_tuple__228);

  /* "cuda/_cuda/ccuda.pyx":5992
 *     if __cuStreamWaitValue64_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitValue64_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int) nogil> __cuStreamWaitValue64_v2)(stream, addr, value, flags)
 *     return err
 */
  __pyx_tuple__229 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamWaitValue64_v2); if (unlikely(!__pyx_tuple__229)) __PYX_ERR(0, 5992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__229);
  __Pyx_GIVEREF(__pyx_tuple__229);

  /* "cuda/_cuda/ccuda.pyx":6001
 *     if __cuStreamWriteValue32_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWriteValue32_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int) nogil> __cuStreamWriteValue32_v2)(stream, addr, value, flags)
 *     return err
 */
  __pyx_tuple__230 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamWriteValue32_v2); if (unlikely(!__pyx_tuple__230)) __PYX_ERR(0, 6001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__230);
  __Pyx_GIVEREF(__pyx_tuple__230);

  /* "cuda/_cuda/ccuda.pyx":6010
 *     if __cuStreamWriteValue64_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWriteValue64_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int) nogil> __cuStreamWriteValue64_v2)(stream, addr, value, flags)
 *     return err
 */
  __pyx_tuple__231 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamWriteValue64_v2); if (unlikely(!__pyx_tuple__231)) __PYX_ERR(0, 6010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__231);
  __Pyx_GIVEREF(__pyx_tuple__231);

  /* "cuda/_cuda/ccuda.pyx":6019
 *     if __cuStreamBatchMemOp_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamBatchMemOp_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, unsigned int, CUstreamBatchMemOpParams*, unsigned int) nogil> __cuStreamBatchMemOp_v2)(stream, count, paramArray, flags)
 *     return err
 */
  __pyx_tuple__232 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamBatchMemOp_v2_n); if (unlikely(!__pyx_tuple__232)) __PYX_ERR(0, 6019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__232);
  __Pyx_GIVEREF(__pyx_tuple__232);

  /* "cuda/_cuda/ccuda.pyx":6028
 *     if __cuFuncGetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFuncGetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, CUfunction_attribute, CUfunction) nogil> __cuFuncGetAttribute)(pi, attrib, hfunc)
 *     return err
 */
  __pyx_tuple__233 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFuncGetAttribute_not); if (unlikely(!__pyx_tuple__233)) __PYX_ERR(0, 6028, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__233);
  __Pyx_GIVEREF(__pyx_tuple__233);

  /* "cuda/_cuda/ccuda.pyx":6037
 *     if __cuFuncSetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, CUfunction_attribute, int) nogil> __cuFuncSetAttribute)(hfunc, attrib, value)
 *     return err
 */
  __pyx_tuple__234 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFuncSetAttribute_not); if (unlikely(!__pyx_tuple__234)) __PYX_ERR(0, 6037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__234);
  __Pyx_GIVEREF(__pyx_tuple__234);

  /* "cuda/_cuda/ccuda.pyx":6046
 *     if __cuFuncSetCacheConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetCacheConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, CUfunc_cache) nogil> __cuFuncSetCacheConfig)(hfunc, config)
 *     return err
 */
  __pyx_tuple__235 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFuncSetCacheConfig_no); if (unlikely(!__pyx_tuple__235)) __PYX_ERR(0, 6046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__235);
  __Pyx_GIVEREF(__pyx_tuple__235);

  /* "cuda/_cuda/ccuda.pyx":6055
 *     if __cuFuncSetSharedMemConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetSharedMemConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, CUsharedconfig) nogil> __cuFuncSetSharedMemConfig)(hfunc, config)
 *     return err
 */
  __pyx_tuple__236 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFuncSetSharedMemConfi); if (unlikely(!__pyx_tuple__236)) __PYX_ERR(0, 6055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__236);
  __Pyx_GIVEREF(__pyx_tuple__236);

  /* "cuda/_cuda/ccuda.pyx":6064
 *     if __cuFuncGetModule == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFuncGetModule" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule*, CUfunction) nogil> __cuFuncGetModule)(hmod, hfunc)
 *     return err
 */
  __pyx_tuple__237 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFuncGetModule_not_fou); if (unlikely(!__pyx_tuple__237)) __PYX_ERR(0, 6064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__237);
  __Pyx_GIVEREF(__pyx_tuple__237);

  /* "cuda/_cuda/ccuda.pyx":6073
 *     if __cuLaunchKernel == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchKernel" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void**, void**) nogil> __cuLaunchKernel)(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra)
 *     return err
 */
  __pyx_tuple__238 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunchKernel_not_foun); if (unlikely(!__pyx_tuple__238)) __PYX_ERR(0, 6073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__238);
  __Pyx_GIVEREF(__pyx_tuple__238);

  /* "cuda/_cuda/ccuda.pyx":6082
 *     if __cuLaunchKernelEx == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchKernelEx" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const CUlaunchConfig*, CUfunction, void**, void**) nogil> __cuLaunchKernelEx)(config, f, kernelParams, extra)
 *     return err
 */
  __pyx_tuple__239 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunchKernelEx_not_fo); if (unlikely(!__pyx_tuple__239)) __PYX_ERR(0, 6082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__239);
  __Pyx_GIVEREF(__pyx_tuple__239);

  /* "cuda/_cuda/ccuda.pyx":6091
 *     if __cuLaunchCooperativeKernel == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchCooperativeKernel" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void**) nogil> __cuLaunchCooperativeKernel)(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams)
 *     return err
 */
  __pyx_tuple__240 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunchCooperativeKern); if (unlikely(!__pyx_tuple__240)) __PYX_ERR(0, 6091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__240);
  __Pyx_GIVEREF(__pyx_tuple__240);

  /* "cuda/_cuda/ccuda.pyx":6100
 *     if __cuLaunchCooperativeKernelMultiDevice == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchCooperativeKernelMultiDevice" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUDA_LAUNCH_PARAMS*, unsigned int, unsigned int) nogil> __cuLaunchCooperativeKernelMultiDevice)(launchParamsList, numDevices, flags)
 *     return err
 */
  __pyx_tuple__241 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunchCooperativeKern_2); if (unlikely(!__pyx_tuple__241)) __PYX_ERR(0, 6100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__241);
  __Pyx_GIVEREF(__pyx_tuple__241);

  /* "cuda/_cuda/ccuda.pyx":6109
 *     if __cuLaunchHostFunc == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchHostFunc" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUhostFn, void*) nogil> __cuLaunchHostFunc)(hStream, fn, userData)
 *     return err
 */
  __pyx_tuple__242 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunchHostFunc_not_fo); if (unlikely(!__pyx_tuple__242)) __PYX_ERR(0, 6109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__242);
  __Pyx_GIVEREF(__pyx_tuple__242);

  /* "cuda/_cuda/ccuda.pyx":6118
 *     if __cuFuncSetBlockShape == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetBlockShape" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, int, int, int) nogil> __cuFuncSetBlockShape)(hfunc, x, y, z)
 *     return err
 */
  __pyx_tuple__243 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFuncSetBlockShape_not); if (unlikely(!__pyx_tuple__243)) __PYX_ERR(0, 6118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__243);
  __Pyx_GIVEREF(__pyx_tuple__243);

  /* "cuda/_cuda/ccuda.pyx":6127
 *     if __cuFuncSetSharedSize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetSharedSize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, unsigned int) nogil> __cuFuncSetSharedSize)(hfunc, numbytes)
 *     return err
 */
  __pyx_tuple__244 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFuncSetSharedSize_not); if (unlikely(!__pyx_tuple__244)) __PYX_ERR(0, 6127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__244);
  __Pyx_GIVEREF(__pyx_tuple__244);

  /* "cuda/_cuda/ccuda.pyx":6136
 *     if __cuParamSetSize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetSize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, unsigned int) nogil> __cuParamSetSize)(hfunc, numbytes)
 *     return err
 */
  __pyx_tuple__245 = PyTuple_Pack(1, __pyx_kp_u_Function_cuParamSetSize_not_foun); if (unlikely(!__pyx_tuple__245)) __PYX_ERR(0, 6136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__245);
  __Pyx_GIVEREF(__pyx_tuple__245);

  /* "cuda/_cuda/ccuda.pyx":6145
 *     if __cuParamSeti == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuParamSeti" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, int, unsigned int) nogil> __cuParamSeti)(hfunc, offset, value)
 *     return err
 */
  __pyx_tuple__246 = PyTuple_Pack(1, __pyx_kp_u_Function_cuParamSeti_not_found); if (unlikely(!__pyx_tuple__246)) __PYX_ERR(0, 6145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__246);
  __Pyx_GIVEREF(__pyx_tuple__246);

  /* "cuda/_cuda/ccuda.pyx":6154
 *     if __cuParamSetf == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetf" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, int, float) nogil> __cuParamSetf)(hfunc, offset, value)
 *     return err
 */
  __pyx_tuple__247 = PyTuple_Pack(1, __pyx_kp_u_Function_cuParamSetf_not_found); if (unlikely(!__pyx_tuple__247)) __PYX_ERR(0, 6154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__247);
  __Pyx_GIVEREF(__pyx_tuple__247);

  /* "cuda/_cuda/ccuda.pyx":6163
 *     if __cuParamSetv == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetv" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, int, void*, unsigned int) nogil> __cuParamSetv)(hfunc, offset, ptr, numbytes)
 *     return err
 */
  __pyx_tuple__248 = PyTuple_Pack(1, __pyx_kp_u_Function_cuParamSetv_not_found); if (unlikely(!__pyx_tuple__248)) __PYX_ERR(0, 6163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__248);
  __Pyx_GIVEREF(__pyx_tuple__248);

  /* "cuda/_cuda/ccuda.pyx":6172
 *     if __cuLaunch == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLaunch" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction) nogil> __cuLaunch)(f)
 *     return err
 */
  __pyx_tuple__249 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunch_not_found); if (unlikely(!__pyx_tuple__249)) __PYX_ERR(0, 6172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__249);
  __Pyx_GIVEREF(__pyx_tuple__249);

  /* "cuda/_cuda/ccuda.pyx":6181
 *     if __cuLaunchGrid == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchGrid" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, int, int) nogil> __cuLaunchGrid)(f, grid_width, grid_height)
 *     return err
 */
  __pyx_tuple__250 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunchGrid_not_found); if (unlikely(!__pyx_tuple__250)) __PYX_ERR(0, 6181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__250);
  __Pyx_GIVEREF(__pyx_tuple__250);

  /* "cuda/_cuda/ccuda.pyx":6190
 *     if __cuLaunchGridAsync == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchGridAsync" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, int, int, CUstream) nogil> __cuLaunchGridAsync)(f, grid_width, grid_height, hStream)
 *     return err
 */
  __pyx_tuple__251 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunchGridAsync_not_f); if (unlikely(!__pyx_tuple__251)) __PYX_ERR(0, 6190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__251);
  __Pyx_GIVEREF(__pyx_tuple__251);

  /* "cuda/_cuda/ccuda.pyx":6199
 *     if __cuParamSetTexRef == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetTexRef" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, int, CUtexref) nogil> __cuParamSetTexRef)(hfunc, texunit, hTexRef)
 *     return err
 */
  __pyx_tuple__252 = PyTuple_Pack(1, __pyx_kp_u_Function_cuParamSetTexRef_not_fo); if (unlikely(!__pyx_tuple__252)) __PYX_ERR(0, 6199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__252);
  __Pyx_GIVEREF(__pyx_tuple__252);

  /* "cuda/_cuda/ccuda.pyx":6208
 *     if __cuGraphCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph*, unsigned int) nogil> __cuGraphCreate)(phGraph, flags)
 *     return err
 */
  __pyx_tuple__253 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphCreate_not_found); if (unlikely(!__pyx_tuple__253)) __PYX_ERR(0, 6208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__253);
  __Pyx_GIVEREF(__pyx_tuple__253);

  /* "cuda/_cuda/ccuda.pyx":6217
 *     if __cuGraphAddKernelNode_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddKernelNode_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphAddKernelNode_v2)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 *     return err
 */
  __pyx_tuple__254 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddKernelNode_v2); if (unlikely(!__pyx_tuple__254)) __PYX_ERR(0, 6217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__254);
  __Pyx_GIVEREF(__pyx_tuple__254);

  /* "cuda/_cuda/ccuda.pyx":6226
 *     if __cuGraphKernelNodeGetParams_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeGetParams_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphKernelNodeGetParams_v2)(hNode, nodeParams)
 *     return err
 */
  __pyx_tuple__255 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphKernelNodeGetPar); if (unlikely(!__pyx_tuple__255)) __PYX_ERR(0, 6226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__255);
  __Pyx_GIVEREF(__pyx_tuple__255);

  /* "cuda/_cuda/ccuda.pyx":6235
 *     if __cuGraphKernelNodeSetParams_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeSetParams_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphKernelNodeSetParams_v2)(hNode, nodeParams)
 *     return err
 */
  __pyx_tuple__256 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphKernelNodeSetPar); if (unlikely(!__pyx_tuple__256)) __PYX_ERR(0, 6235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__256);
  __Pyx_GIVEREF(__pyx_tuple__256);

  /* "cuda/_cuda/ccuda.pyx":6244
 *     if __cuGraphAddMemcpyNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemcpyNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_MEMCPY3D*, CUcontext) nogil> __cuGraphAddMemcpyNode)(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx)
 *     return err
 */
  __pyx_tuple__257 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddMemcpyNode_no); if (unlikely(!__pyx_tuple__257)) __PYX_ERR(0, 6244, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__257);
  __Pyx_GIVEREF(__pyx_tuple__257);

  /* "cuda/_cuda/ccuda.pyx":6253
 *     if __cuGraphMemcpyNodeGetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemcpyNodeGetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUDA_MEMCPY3D*) nogil> __cuGraphMemcpyNodeGetParams)(hNode, nodeParams)
 *     return err
 */
  __pyx_tuple__258 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphMemcpyNodeGetPar); if (unlikely(!__pyx_tuple__258)) __PYX_ERR(0, 6253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__258);
  __Pyx_GIVEREF(__pyx_tuple__258);

  /* "cuda/_cuda/ccuda.pyx":6262
 *     if __cuGraphMemcpyNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemcpyNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_MEMCPY3D*) nogil> __cuGraphMemcpyNodeSetParams)(hNode, nodeParams)
 *     return err
 */
  __pyx_tuple__259 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphMemcpyNodeSetPar); if (unlikely(!__pyx_tuple__259)) __PYX_ERR(0, 6262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__259);
  __Pyx_GIVEREF(__pyx_tuple__259);

  /* "cuda/_cuda/ccuda.pyx":6271
 *     if __cuGraphAddMemsetNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemsetNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_MEMSET_NODE_PARAMS*, CUcontext) nogil> __cuGraphAddMemsetNode)(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx)
 *     return err
 */
  __pyx_tuple__260 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddMemsetNode_no); if (unlikely(!__pyx_tuple__260)) __PYX_ERR(0, 6271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__260);
  __Pyx_GIVEREF(__pyx_tuple__260);

  /* "cuda/_cuda/ccuda.pyx":6280
 *     if __cuGraphMemsetNodeGetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemsetNodeGetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUDA_MEMSET_NODE_PARAMS*) nogil> __cuGraphMemsetNodeGetParams)(hNode, nodeParams)
 *     return err
 */
  __pyx_tuple__261 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphMemsetNodeGetPar); if (unlikely(!__pyx_tuple__261)) __PYX_ERR(0, 6280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__261);
  __Pyx_GIVEREF(__pyx_tuple__261);

  /* "cuda/_cuda/ccuda.pyx":6289
 *     if __cuGraphMemsetNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemsetNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_MEMSET_NODE_PARAMS*) nogil> __cuGraphMemsetNodeSetParams)(hNode, nodeParams)
 *     return err
 */
  __pyx_tuple__262 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphMemsetNodeSetPar); if (unlikely(!__pyx_tuple__262)) __PYX_ERR(0, 6289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__262);
  __Pyx_GIVEREF(__pyx_tuple__262);

  /* "cuda/_cuda/ccuda.pyx":6298
 *     if __cuGraphAddHostNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddHostNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_HOST_NODE_PARAMS*) nogil> __cuGraphAddHostNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 *     return err
 */
  __pyx_tuple__263 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddHostNode_not); if (unlikely(!__pyx_tuple__263)) __PYX_ERR(0, 6298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__263);
  __Pyx_GIVEREF(__pyx_tuple__263);

  /* "cuda/_cuda/ccuda.pyx":6307
 *     if __cuGraphHostNodeGetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphHostNodeGetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUDA_HOST_NODE_PARAMS*) nogil> __cuGraphHostNodeGetParams)(hNode, nodeParams)
 *     return err
 */
  __pyx_tuple__264 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphHostNodeGetParam); if (unlikely(!__pyx_tuple__264)) __PYX_ERR(0, 6307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__264);
  __Pyx_GIVEREF(__pyx_tuple__264);

  /* "cuda/_cuda/ccuda.pyx":6316
 *     if __cuGraphHostNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphHostNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_HOST_NODE_PARAMS*) nogil> __cuGraphHostNodeSetParams)(hNode, nodeParams)
 *     return err
 */
  __pyx_tuple__265 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphHostNodeSetParam); if (unlikely(!__pyx_tuple__265)) __PYX_ERR(0, 6316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__265);
  __Pyx_GIVEREF(__pyx_tuple__265);

  /* "cuda/_cuda/ccuda.pyx":6325
 *     if __cuGraphAddChildGraphNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddChildGraphNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUgraph) nogil> __cuGraphAddChildGraphNode)(phGraphNode, hGraph, dependencies, numDependencies, childGraph)
 *     return err
 */
  __pyx_tuple__266 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddChildGraphNod); if (unlikely(!__pyx_tuple__266)) __PYX_ERR(0, 6325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__266);
  __Pyx_GIVEREF(__pyx_tuple__266);

  /* "cuda/_cuda/ccuda.pyx":6334
 *     if __cuGraphChildGraphNodeGetGraph == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphChildGraphNodeGetGraph" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUgraph*) nogil> __cuGraphChildGraphNodeGetGraph)(hNode, phGraph)
 *     return err
 */
  __pyx_tuple__267 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphChildGraphNodeGe); if (unlikely(!__pyx_tuple__267)) __PYX_ERR(0, 6334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__267);
  __Pyx_GIVEREF(__pyx_tuple__267);

  /* "cuda/_cuda/ccuda.pyx":6343
 *     if __cuGraphAddEmptyNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddEmptyNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t) nogil> __cuGraphAddEmptyNode)(phGraphNode, hGraph, dependencies, numDependencies)
 *     return err
 */
  __pyx_tuple__268 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddEmptyNode_not); if (unlikely(!__pyx_tuple__268)) __PYX_ERR(0, 6343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__268);
  __Pyx_GIVEREF(__pyx_tuple__268);

  /* "cuda/_cuda/ccuda.pyx":6352
 *     if __cuGraphAddEventRecordNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddEventRecordNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUevent) nogil> __cuGraphAddEventRecordNode)(phGraphNode, hGraph, dependencies, numDependencies, event)
 *     return err
 */
  __pyx_tuple__269 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddEventRecordNo); if (unlikely(!__pyx_tuple__269)) __PYX_ERR(0, 6352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__269);
  __Pyx_GIVEREF(__pyx_tuple__269);

  /* "cuda/_cuda/ccuda.pyx":6361
 *     if __cuGraphEventRecordNodeGetEvent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventRecordNodeGetEvent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUevent*) nogil> __cuGraphEventRecordNodeGetEvent)(hNode, event_out)
 *     return err
 */
  __pyx_tuple__270 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphEventRecordNodeG); if (unlikely(!__pyx_tuple__270)) __PYX_ERR(0, 6361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__270);
  __Pyx_GIVEREF(__pyx_tuple__270);

  /* "cuda/_cuda/ccuda.pyx":6370
 *     if __cuGraphEventRecordNodeSetEvent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventRecordNodeSetEvent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUevent) nogil> __cuGraphEventRecordNodeSetEvent)(hNode, event)
 *     return err
 */
  __pyx_tuple__271 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphEventRecordNodeS); if (unlikely(!__pyx_tuple__271)) __PYX_ERR(0, 6370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__271);
  __Pyx_GIVEREF(__pyx_tuple__271);

  /* "cuda/_cuda/ccuda.pyx":6379
 *     if __cuGraphAddEventWaitNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddEventWaitNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUevent) nogil> __cuGraphAddEventWaitNode)(phGraphNode, hGraph, dependencies, numDependencies, event)
 *     return err
 */
  __pyx_tuple__272 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddEventWaitNode); if (unlikely(!__pyx_tuple__272)) __PYX_ERR(0, 6379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__272);
  __Pyx_GIVEREF(__pyx_tuple__272);

  /* "cuda/_cuda/ccuda.pyx":6388
 *     if __cuGraphEventWaitNodeGetEvent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventWaitNodeGetEvent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUevent*) nogil> __cuGraphEventWaitNodeGetEvent)(hNode, event_out)
 *     return err
 */
  __pyx_tuple__273 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphEventWaitNodeGet); if (unlikely(!__pyx_tuple__273)) __PYX_ERR(0, 6388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__273);
  __Pyx_GIVEREF(__pyx_tuple__273);

  /* "cuda/_cuda/ccuda.pyx":6397
 *     if __cuGraphEventWaitNodeSetEvent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventWaitNodeSetEvent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUevent) nogil> __cuGraphEventWaitNodeSetEvent)(hNode, event)
 *     return err
 */
  __pyx_tuple__274 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphEventWaitNodeSet); if (unlikely(!__pyx_tuple__274)) __PYX_ERR(0, 6397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__274);
  __Pyx_GIVEREF(__pyx_tuple__274);

  /* "cuda/_cuda/ccuda.pyx":6406
 *     if __cuGraphAddExternalSemaphoresSignalNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddExternalSemaphoresSignalNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS*) nogil> __cuGraphAddExternalSemaphoresSignalNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 *     return err
 */
  __pyx_tuple__275 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddExternalSemap); if (unlikely(!__pyx_tuple__275)) __PYX_ERR(0, 6406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__275);
  __Pyx_GIVEREF(__pyx_tuple__275);

  /* "cuda/_cuda/ccuda.pyx":6415
 *     if __cuGraphExternalSemaphoresSignalNodeGetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeGetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS*) nogil> __cuGraphExternalSemaphoresSignalNodeGetParams)(hNode, params_out)
 *     return err
 */
  __pyx_tuple__276 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExternalSemaphor); if (unlikely(!__pyx_tuple__276)) __PYX_ERR(0, 6415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__276);
  __Pyx_GIVEREF(__pyx_tuple__276);

  /* "cuda/_cuda/ccuda.pyx":6424
 *     if __cuGraphExternalSemaphoresSignalNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS*) nogil> __cuGraphExternalSemaphoresSignalNodeSetParams)(hNode, nodeParams)
 *     return err
 */
  __pyx_tuple__277 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExternalSemaphor_2); if (unlikely(!__pyx_tuple__277)) __PYX_ERR(0, 6424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__277);
  __Pyx_GIVEREF(__pyx_tuple__277);

  /* "cuda/_cuda/ccuda.pyx":6433
 *     if __cuGraphAddExternalSemaphoresWaitNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddExternalSemaphoresWaitNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_EXT_SEM_WAIT_NODE_PARAMS*) nogil> __cuGraphAddExternalSemaphoresWaitNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 *     return err
 */
  __pyx_tuple__278 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddExternalSemap_2); if (unlikely(!__pyx_tuple__278)) __PYX_ERR(0, 6433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__278);
  __Pyx_GIVEREF(__pyx_tuple__278);

  /* "cuda/_cuda/ccuda.pyx":6442
 *     if __cuGraphExternalSemaphoresWaitNodeGetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeGetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS*) nogil> __cuGraphExternalSemaphoresWaitNodeGetParams)(hNode, params_out)
 *     return err
 */
  __pyx_tuple__279 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExternalSemaphor_3); if (unlikely(!__pyx_tuple__279)) __PYX_ERR(0, 6442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__279);
  __Pyx_GIVEREF(__pyx_tuple__279);

  /* "cuda/_cuda/ccuda.pyx":6451
 *     if __cuGraphExternalSemaphoresWaitNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS*) nogil> __cuGraphExternalSemaphoresWaitNodeSetParams)(hNode, nodeParams)
 *     return err
 */
  __pyx_tuple__280 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExternalSemaphor_4); if (unlikely(!__pyx_tuple__280)) __PYX_ERR(0, 6451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__280);
  __Pyx_GIVEREF(__pyx_tuple__280);

  /* "cuda/_cuda/ccuda.pyx":6460
 *     if __cuGraphAddBatchMemOpNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddBatchMemOpNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_BATCH_MEM_OP_NODE_PARAMS*) nogil> __cuGraphAddBatchMemOpNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 *     return err
 */
  __pyx_tuple__281 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddBatchMemOpNod); if (unlikely(!__pyx_tuple__281)) __PYX_ERR(0, 6460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__281);
  __Pyx_GIVEREF(__pyx_tuple__281);

  /* "cuda/_cuda/ccuda.pyx":6469
 *     if __cuGraphBatchMemOpNodeGetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphBatchMemOpNodeGetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS*) nogil> __cuGraphBatchMemOpNodeGetParams)(hNode, nodeParams_out)
 *     return err
 */
  __pyx_tuple__282 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphBatchMemOpNodeGe); if (unlikely(!__pyx_tuple__282)) __PYX_ERR(0, 6469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__282);
  __Pyx_GIVEREF(__pyx_tuple__282);

  /* "cuda/_cuda/ccuda.pyx":6478
 *     if __cuGraphBatchMemOpNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphBatchMemOpNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS*) nogil> __cuGraphBatchMemOpNodeSetParams)(hNode, nodeParams)
 *     return err
 */
  __pyx_tuple__283 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphBatchMemOpNodeSe); if (unlikely(!__pyx_tuple__283)) __PYX_ERR(0, 6478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__283);
  __Pyx_GIVEREF(__pyx_tuple__283);

  /* "cuda/_cuda/ccuda.pyx":6487
 *     if __cuGraphExecBatchMemOpNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecBatchMemOpNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS*) nogil> __cuGraphExecBatchMemOpNodeSetParams)(hGraphExec, hNode, nodeParams)
 *     return err
 */
  __pyx_tuple__284 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecBatchMemOpNo); if (unlikely(!__pyx_tuple__284)) __PYX_ERR(0, 6487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__284);
  __Pyx_GIVEREF(__pyx_tuple__284);

  /* "cuda/_cuda/ccuda.pyx":6496
 *     if __cuGraphAddMemAllocNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemAllocNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUDA_MEM_ALLOC_NODE_PARAMS*) nogil> __cuGraphAddMemAllocNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 *     return err
 */
  __pyx_tuple__285 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddMemAllocNode); if (unlikely(!__pyx_tuple__285)) __PYX_ERR(0, 6496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__285);
  __Pyx_GIVEREF(__pyx_tuple__285);

  /* "cuda/_cuda/ccuda.pyx":6505
 *     if __cuGraphMemAllocNodeGetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemAllocNodeGetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUDA_MEM_ALLOC_NODE_PARAMS*) nogil> __cuGraphMemAllocNodeGetParams)(hNode, params_out)
 *     return err
 */
  __pyx_tuple__286 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphMemAllocNodeGetP); if (unlikely(!__pyx_tuple__286)) __PYX_ERR(0, 6505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__286);
  __Pyx_GIVEREF(__pyx_tuple__286);

  /* "cuda/_cuda/ccuda.pyx":6514
 *     if __cuGraphAddMemFreeNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemFreeNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUdeviceptr) nogil> __cuGraphAddMemFreeNode)(phGraphNode, hGraph, dependencies, numDependencies, dptr)
 *     return err
 */
  __pyx_tuple__287 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddMemFreeNode_n); if (unlikely(!__pyx_tuple__287)) __PYX_ERR(0, 6514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__287);
  __Pyx_GIVEREF(__pyx_tuple__287);

  /* "cuda/_cuda/ccuda.pyx":6523
 *     if __cuGraphMemFreeNodeGetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemFreeNodeGetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUdeviceptr*) nogil> __cuGraphMemFreeNodeGetParams)(hNode, dptr_out)
 *     return err
 */
  __pyx_tuple__288 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphMemFreeNodeGetPa); if (unlikely(!__pyx_tuple__288)) __PYX_ERR(0, 6523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__288);
  __Pyx_GIVEREF(__pyx_tuple__288);

  /* "cuda/_cuda/ccuda.pyx":6532
 *     if __cuDeviceGraphMemTrim == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGraphMemTrim" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDeviceGraphMemTrim)(device)
 *     return err
 */
  __pyx_tuple__289 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGraphMemTrim_no); if (unlikely(!__pyx_tuple__289)) __PYX_ERR(0, 6532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__289);
  __Pyx_GIVEREF(__pyx_tuple__289);

  /* "cuda/_cuda/ccuda.pyx":6541
 *     if __cuDeviceGetGraphMemAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetGraphMemAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice, CUgraphMem_attribute, void*) nogil> __cuDeviceGetGraphMemAttribute)(device, attr, value)
 *     return err
 */
  __pyx_tuple__290 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetGraphMemAttr); if (unlikely(!__pyx_tuple__290)) __PYX_ERR(0, 6541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__290);
  __Pyx_GIVEREF(__pyx_tuple__290);

  /* "cuda/_cuda/ccuda.pyx":6550
 *     if __cuDeviceSetGraphMemAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceSetGraphMemAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice, CUgraphMem_attribute, void*) nogil> __cuDeviceSetGraphMemAttribute)(device, attr, value)
 *     return err
 */
  __pyx_tuple__291 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceSetGraphMemAttr); if (unlikely(!__pyx_tuple__291)) __PYX_ERR(0, 6550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__291);
  __Pyx_GIVEREF(__pyx_tuple__291);

  /* "cuda/_cuda/ccuda.pyx":6559
 *     if __cuGraphClone == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphClone" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph*, CUgraph) nogil> __cuGraphClone)(phGraphClone, originalGraph)
 *     return err
 */
  __pyx_tuple__292 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphClone_not_found); if (unlikely(!__pyx_tuple__292)) __PYX_ERR(0, 6559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__292);
  __Pyx_GIVEREF(__pyx_tuple__292);

  /* "cuda/_cuda/ccuda.pyx":6568
 *     if __cuGraphNodeFindInClone == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeFindInClone" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraphNode, CUgraph) nogil> __cuGraphNodeFindInClone)(phNode, hOriginalNode, hClonedGraph)
 *     return err
 */
  __pyx_tuple__293 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphNodeFindInClone); if (unlikely(!__pyx_tuple__293)) __PYX_ERR(0, 6568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__293);
  __Pyx_GIVEREF(__pyx_tuple__293);

  /* "cuda/_cuda/ccuda.pyx":6577
 *     if __cuGraphNodeGetType == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetType" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNodeType*) nogil> __cuGraphNodeGetType)(hNode, typename)
 *     return err
 */
  __pyx_tuple__294 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphNodeGetType_not); if (unlikely(!__pyx_tuple__294)) __PYX_ERR(0, 6577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__294);
  __Pyx_GIVEREF(__pyx_tuple__294);

  /* "cuda/_cuda/ccuda.pyx":6586
 *     if __cuGraphGetNodes == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphGetNodes" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph, CUgraphNode*, size_t*) nogil> __cuGraphGetNodes)(hGraph, nodes, numNodes)
 *     return err
 */
  __pyx_tuple__295 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphGetNodes_not_fou); if (unlikely(!__pyx_tuple__295)) __PYX_ERR(0, 6586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__295);
  __Pyx_GIVEREF(__pyx_tuple__295);

  /* "cuda/_cuda/ccuda.pyx":6595
 *     if __cuGraphGetRootNodes == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphGetRootNodes" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph, CUgraphNode*, size_t*) nogil> __cuGraphGetRootNodes)(hGraph, rootNodes, numRootNodes)
 *     return err
 */
  __pyx_tuple__296 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphGetRootNodes_not); if (unlikely(!__pyx_tuple__296)) __PYX_ERR(0, 6595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__296);
  __Pyx_GIVEREF(__pyx_tuple__296);

  /* "cuda/_cuda/ccuda.pyx":6604
 *     if __cuGraphGetEdges == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphGetEdges" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph, CUgraphNode*, CUgraphNode*, size_t*) nogil> __cuGraphGetEdges)(hGraph, from_, to, numEdges)
 *     return err
 */
  __pyx_tuple__297 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphGetEdges_not_fou); if (unlikely(!__pyx_tuple__297)) __PYX_ERR(0, 6604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__297);
  __Pyx_GIVEREF(__pyx_tuple__297);

  /* "cuda/_cuda/ccuda.pyx":6613
 *     if __cuGraphNodeGetDependencies == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetDependencies" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNode*, size_t*) nogil> __cuGraphNodeGetDependencies)(hNode, dependencies, numDependencies)
 *     return err
 */
  __pyx_tuple__298 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphNodeGetDependenc); if (unlikely(!__pyx_tuple__298)) __PYX_ERR(0, 6613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__298);
  __Pyx_GIVEREF(__pyx_tuple__298);

  /* "cuda/_cuda/ccuda.pyx":6622
 *     if __cuGraphNodeGetDependentNodes == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetDependentNodes" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNode*, size_t*) nogil> __cuGraphNodeGetDependentNodes)(hNode, dependentNodes, numDependentNodes)
 *     return err
 */
  __pyx_tuple__299 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphNodeGetDependent); if (unlikely(!__pyx_tuple__299)) __PYX_ERR(0, 6622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__299);
  __Pyx_GIVEREF(__pyx_tuple__299);

  /* "cuda/_cuda/ccuda.pyx":6631
 *     if __cuGraphAddDependencies == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddDependencies" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph, const CUgraphNode*, const CUgraphNode*, size_t) nogil> __cuGraphAddDependencies)(hGraph, from_, to, numDependencies)
 *     return err
 */
  __pyx_tuple__300 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddDependencies); if (unlikely(!__pyx_tuple__300)) __PYX_ERR(0, 6631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__300);
  __Pyx_GIVEREF(__pyx_tuple__300);

  /* "cuda/_cuda/ccuda.pyx":6640
 *     if __cuGraphRemoveDependencies == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphRemoveDependencies" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph, const CUgraphNode*, const CUgraphNode*, size_t) nogil> __cuGraphRemoveDependencies)(hGraph, from_, to, numDependencies)
 *     return err
 */
  __pyx_tuple__301 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphRemoveDependenci); if (unlikely(!__pyx_tuple__301)) __PYX_ERR(0, 6640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__301);
  __Pyx_GIVEREF(__pyx_tuple__301);

  /* "cuda/_cuda/ccuda.pyx":6649
 *     if __cuGraphDestroyNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDestroyNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode) nogil> __cuGraphDestroyNode)(hNode)
 *     return err
 */
  __pyx_tuple__302 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphDestroyNode_not); if (unlikely(!__pyx_tuple__302)) __PYX_ERR(0, 6649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__302);
  __Pyx_GIVEREF(__pyx_tuple__302);

  /* "cuda/_cuda/ccuda.pyx":6658
 *     if __cuGraphInstantiateWithFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphInstantiateWithFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec*, CUgraph, unsigned long long) nogil> __cuGraphInstantiateWithFlags)(phGraphExec, hGraph, flags)
 *     return err
 */
  __pyx_tuple__303 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphInstantiateWithF); if (unlikely(!__pyx_tuple__303)) __PYX_ERR(0, 6658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__303);
  __Pyx_GIVEREF(__pyx_tuple__303);

  /* "cuda/_cuda/ccuda.pyx":6667
 *     if __cuGraphInstantiateWithParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphInstantiateWithParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec*, CUgraph, CUDA_GRAPH_INSTANTIATE_PARAMS*) nogil> __cuGraphInstantiateWithParams)(phGraphExec, hGraph, instantiateParams)
 *     return err
 */
  __pyx_tuple__304 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphInstantiateWithP); if (unlikely(!__pyx_tuple__304)) __PYX_ERR(0, 6667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__304);
  __Pyx_GIVEREF(__pyx_tuple__304);

  /* "cuda/_cuda/ccuda.pyx":6676
 *     if __cuGraphExecGetFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecGetFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, cuuint64_t*) nogil> __cuGraphExecGetFlags)(hGraphExec, flags)
 *     return err
 */
  __pyx_tuple__305 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecGetFlags_not); if (unlikely(!__pyx_tuple__305)) __PYX_ERR(0, 6676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__305);
  __Pyx_GIVEREF(__pyx_tuple__305);

  /* "cuda/_cuda/ccuda.pyx":6685
 *     if __cuGraphExecKernelNodeSetParams_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecKernelNodeSetParams_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphExecKernelNodeSetParams_v2)(hGraphExec, hNode, nodeParams)
 *     return err
 */
  __pyx_tuple__306 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecKernelNodeSe); if (unlikely(!__pyx_tuple__306)) __PYX_ERR(0, 6685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__306);
  __Pyx_GIVEREF(__pyx_tuple__306);

  /* "cuda/_cuda/ccuda.pyx":6694
 *     if __cuGraphExecMemcpyNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecMemcpyNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_MEMCPY3D*, CUcontext) nogil> __cuGraphExecMemcpyNodeSetParams)(hGraphExec, hNode, copyParams, ctx)
 *     return err
 */
  __pyx_tuple__307 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecMemcpyNodeSe); if (unlikely(!__pyx_tuple__307)) __PYX_ERR(0, 6694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__307);
  __Pyx_GIVEREF(__pyx_tuple__307);

  /* "cuda/_cuda/ccuda.pyx":6703
 *     if __cuGraphExecMemsetNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecMemsetNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_MEMSET_NODE_PARAMS*, CUcontext) nogil> __cuGraphExecMemsetNodeSetParams)(hGraphExec, hNode, memsetParams, ctx)
 *     return err
 */
  __pyx_tuple__308 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecMemsetNodeSe); if (unlikely(!__pyx_tuple__308)) __PYX_ERR(0, 6703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__308);
  __Pyx_GIVEREF(__pyx_tuple__308);

  /* "cuda/_cuda/ccuda.pyx":6712
 *     if __cuGraphExecHostNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecHostNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_HOST_NODE_PARAMS*) nogil> __cuGraphExecHostNodeSetParams)(hGraphExec, hNode, nodeParams)
 *     return err
 */
  __pyx_tuple__309 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecHostNodeSetP); if (unlikely(!__pyx_tuple__309)) __PYX_ERR(0, 6712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__309);
  __Pyx_GIVEREF(__pyx_tuple__309);

  /* "cuda/_cuda/ccuda.pyx":6721
 *     if __cuGraphExecChildGraphNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecChildGraphNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, CUgraph) nogil> __cuGraphExecChildGraphNodeSetParams)(hGraphExec, hNode, childGraph)
 *     return err
 */
  __pyx_tuple__310 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecChildGraphNo); if (unlikely(!__pyx_tuple__310)) __PYX_ERR(0, 6721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__310);
  __Pyx_GIVEREF(__pyx_tuple__310);

  /* "cuda/_cuda/ccuda.pyx":6730
 *     if __cuGraphExecEventRecordNodeSetEvent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecEventRecordNodeSetEvent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, CUevent) nogil> __cuGraphExecEventRecordNodeSetEvent)(hGraphExec, hNode, event)
 *     return err
 */
  __pyx_tuple__311 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecEventRecordN); if (unlikely(!__pyx_tuple__311)) __PYX_ERR(0, 6730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__311);
  __Pyx_GIVEREF(__pyx_tuple__311);

  /* "cuda/_cuda/ccuda.pyx":6739
 *     if __cuGraphExecEventWaitNodeSetEvent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecEventWaitNodeSetEvent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, CUevent) nogil> __cuGraphExecEventWaitNodeSetEvent)(hGraphExec, hNode, event)
 *     return err
 */
  __pyx_tuple__312 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecEventWaitNod); if (unlikely(!__pyx_tuple__312)) __PYX_ERR(0, 6739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__312);
  __Pyx_GIVEREF(__pyx_tuple__312);

  /* "cuda/_cuda/ccuda.pyx":6748
 *     if __cuGraphExecExternalSemaphoresSignalNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecExternalSemaphoresSignalNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS*) nogil> __cuGraphExecExternalSemaphoresSignalNodeSetParams)(hGraphExec, hNode, nodeParams)
 *     return err
 */
  __pyx_tuple__313 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecExternalSema); if (unlikely(!__pyx_tuple__313)) __PYX_ERR(0, 6748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__313);
  __Pyx_GIVEREF(__pyx_tuple__313);

  /* "cuda/_cuda/ccuda.pyx":6757
 *     if __cuGraphExecExternalSemaphoresWaitNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecExternalSemaphoresWaitNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS*) nogil> __cuGraphExecExternalSemaphoresWaitNodeSetParams)(hGraphExec, hNode, nodeParams)
 *     return err
 */
  __pyx_tuple__314 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecExternalSema_2); if (unlikely(!__pyx_tuple__314)) __PYX_ERR(0, 6757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__314);
  __Pyx_GIVEREF(__pyx_tuple__314);

  /* "cuda/_cuda/ccuda.pyx":6766
 *     if __cuGraphNodeSetEnabled == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeSetEnabled" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, unsigned int) nogil> __cuGraphNodeSetEnabled)(hGraphExec, hNode, isEnabled)
 *     return err
 */
  __pyx_tuple__315 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphNodeSetEnabled_n); if (unlikely(!__pyx_tuple__315)) __PYX_ERR(0, 6766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__315);
  __Pyx_GIVEREF(__pyx_tuple__315);

  /* "cuda/_cuda/ccuda.pyx":6775
 *     if __cuGraphNodeGetEnabled == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetEnabled" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, unsigned int*) nogil> __cuGraphNodeGetEnabled)(hGraphExec, hNode, isEnabled)
 *     return err
 */
  __pyx_tuple__316 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphNodeGetEnabled_n); if (unlikely(!__pyx_tuple__316)) __PYX_ERR(0, 6775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__316);
  __Pyx_GIVEREF(__pyx_tuple__316);

  /* "cuda/_cuda/ccuda.pyx":6784
 *     if __cuGraphUpload == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphUpload" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUstream) nogil> __cuGraphUpload)(hGraphExec, hStream)
 *     return err
 */
  __pyx_tuple__317 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphUpload_not_found); if (unlikely(!__pyx_tuple__317)) __PYX_ERR(0, 6784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__317);
  __Pyx_GIVEREF(__pyx_tuple__317);

  /* "cuda/_cuda/ccuda.pyx":6793
 *     if __cuGraphLaunch == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphLaunch" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUstream) nogil> __cuGraphLaunch)(hGraphExec, hStream)
 *     return err
 */
  __pyx_tuple__318 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphLaunch_not_found); if (unlikely(!__pyx_tuple__318)) __PYX_ERR(0, 6793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__318);
  __Pyx_GIVEREF(__pyx_tuple__318);

  /* "cuda/_cuda/ccuda.pyx":6802
 *     if __cuGraphExecDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec) nogil> __cuGraphExecDestroy)(hGraphExec)
 *     return err
 */
  __pyx_tuple__319 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecDestroy_not); if (unlikely(!__pyx_tuple__319)) __PYX_ERR(0, 6802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__319);
  __Pyx_GIVEREF(__pyx_tuple__319);

  /* "cuda/_cuda/ccuda.pyx":6811
 *     if __cuGraphDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph) nogil> __cuGraphDestroy)(hGraph)
 *     return err
 */
  __pyx_tuple__320 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphDestroy_not_foun); if (unlikely(!__pyx_tuple__320)) __PYX_ERR(0, 6811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__320);
  __Pyx_GIVEREF(__pyx_tuple__320);

  /* "cuda/_cuda/ccuda.pyx":6820
 *     if __cuGraphExecUpdate_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecUpdate_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraph, CUgraphExecUpdateResultInfo*) nogil> __cuGraphExecUpdate_v2)(hGraphExec, hGraph, resultInfo)
 *     return err
 */
  __pyx_tuple__321 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecUpdate_v2_no); if (unlikely(!__pyx_tuple__321)) __PYX_ERR(0, 6820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__321);
  __Pyx_GIVEREF(__pyx_tuple__321);

  /* "cuda/_cuda/ccuda.pyx":6829
 *     if __cuGraphKernelNodeCopyAttributes == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeCopyAttributes" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNode) nogil> __cuGraphKernelNodeCopyAttributes)(dst, src)
 *     return err
 */
  __pyx_tuple__322 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphKernelNodeCopyAt); if (unlikely(!__pyx_tuple__322)) __PYX_ERR(0, 6829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__322);
  __Pyx_GIVEREF(__pyx_tuple__322);

  /* "cuda/_cuda/ccuda.pyx":6838
 *     if __cuGraphKernelNodeGetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeGetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue*) nogil> __cuGraphKernelNodeGetAttribute)(hNode, attr, value_out)
 *     return err
 */
  __pyx_tuple__323 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphKernelNodeGetAtt); if (unlikely(!__pyx_tuple__323)) __PYX_ERR(0, 6838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__323);
  __Pyx_GIVEREF(__pyx_tuple__323);

  /* "cuda/_cuda/ccuda.pyx":6847
 *     if __cuGraphKernelNodeSetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeSetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUkernelNodeAttrID, const CUkernelNodeAttrValue*) nogil> __cuGraphKernelNodeSetAttribute)(hNode, attr, value)
 *     return err
 */
  __pyx_tuple__324 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphKernelNodeSetAtt); if (unlikely(!__pyx_tuple__324)) __PYX_ERR(0, 6847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__324);
  __Pyx_GIVEREF(__pyx_tuple__324);

  /* "cuda/_cuda/ccuda.pyx":6856
 *     if __cuGraphDebugDotPrint == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDebugDotPrint" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph, const char*, unsigned int) nogil> __cuGraphDebugDotPrint)(hGraph, path, flags)
 *     return err
 */
  __pyx_tuple__325 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphDebugDotPrint_no); if (unlikely(!__pyx_tuple__325)) __PYX_ERR(0, 6856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__325);
  __Pyx_GIVEREF(__pyx_tuple__325);

  /* "cuda/_cuda/ccuda.pyx":6865
 *     if __cuUserObjectCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUuserObject*, void*, CUhostFn, unsigned int, unsigned int) nogil> __cuUserObjectCreate)(object_out, ptr, destroy, initialRefcount, flags)
 *     return err
 */
  __pyx_tuple__326 = PyTuple_Pack(1, __pyx_kp_u_Function_cuUserObjectCreate_not); if (unlikely(!__pyx_tuple__326)) __PYX_ERR(0, 6865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__326);
  __Pyx_GIVEREF(__pyx_tuple__326);

  /* "cuda/_cuda/ccuda.pyx":6874
 *     if __cuUserObjectRetain == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectRetain" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUuserObject, unsigned int) nogil> __cuUserObjectRetain)(object, count)
 *     return err
 */
  __pyx_tuple__327 = PyTuple_Pack(1, __pyx_kp_u_Function_cuUserObjectRetain_not); if (unlikely(!__pyx_tuple__327)) __PYX_ERR(0, 6874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__327);
  __Pyx_GIVEREF(__pyx_tuple__327);

  /* "cuda/_cuda/ccuda.pyx":6883
 *     if __cuUserObjectRelease == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectRelease" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUuserObject, unsigned int) nogil> __cuUserObjectRelease)(object, count)
 *     return err
 */
  __pyx_tuple__328 = PyTuple_Pack(1, __pyx_kp_u_Function_cuUserObjectRelease_not); if (unlikely(!__pyx_tuple__328)) __PYX_ERR(0, 6883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__328);
  __Pyx_GIVEREF(__pyx_tuple__328);

  /* "cuda/_cuda/ccuda.pyx":6892
 *     if __cuGraphRetainUserObject == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphRetainUserObject" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph, CUuserObject, unsigned int, unsigned int) nogil> __cuGraphRetainUserObject)(graph, object, count, flags)
 *     return err
 */
  __pyx_tuple__329 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphRetainUserObject); if (unlikely(!__pyx_tuple__329)) __PYX_ERR(0, 6892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__329);
  __Pyx_GIVEREF(__pyx_tuple__329);

  /* "cuda/_cuda/ccuda.pyx":6901
 *     if __cuGraphReleaseUserObject == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphReleaseUserObject" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph, CUuserObject, unsigned int) nogil> __cuGraphReleaseUserObject)(graph, object, count)
 *     return err
 */
  __pyx_tuple__330 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphReleaseUserObjec); if (unlikely(!__pyx_tuple__330)) __PYX_ERR(0, 6901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__330);
  __Pyx_GIVEREF(__pyx_tuple__330);

  /* "cuda/_cuda/ccuda.pyx":6910
 *     if __cuGraphAddNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, CUgraphNodeParams*) nogil> __cuGraphAddNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 *     return err
 */
  __pyx_tuple__331 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddNode_not_foun); if (unlikely(!__pyx_tuple__331)) __PYX_ERR(0, 6910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__331);
  __Pyx_GIVEREF(__pyx_tuple__331);

  /* "cuda/_cuda/ccuda.pyx":6919
 *     if __cuGraphNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNodeParams*) nogil> __cuGraphNodeSetParams)(hNode, nodeParams)
 *     return err
 */
  __pyx_tuple__332 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphNodeSetParams_no); if (unlikely(!__pyx_tuple__332)) __PYX_ERR(0, 6919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__332);
  __Pyx_GIVEREF(__pyx_tuple__332);

  /* "cuda/_cuda/ccuda.pyx":6928
 *     if __cuGraphExecNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, CUgraphNodeParams*) nogil> __cuGraphExecNodeSetParams)(hGraphExec, hNode, nodeParams)
 *     return err
 */
  __pyx_tuple__333 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecNodeSetParam); if (unlikely(!__pyx_tuple__333)) __PYX_ERR(0, 6928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__333);
  __Pyx_GIVEREF(__pyx_tuple__333);

  /* "cuda/_cuda/ccuda.pyx":6937
 *     if __cuOccupancyMaxActiveBlocksPerMultiprocessor == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessor" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, CUfunction, int, size_t) nogil> __cuOccupancyMaxActiveBlocksPerMultiprocessor)(numBlocks, func, blockSize, dynamicSMemSize)
 *     return err
 */
  __pyx_tuple__334 = PyTuple_Pack(1, __pyx_kp_u_Function_cuOccupancyMaxActiveBlo); if (unlikely(!__pyx_tuple__334)) __PYX_ERR(0, 6937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__334);
  __Pyx_GIVEREF(__pyx_tuple__334);

  /* "cuda/_cuda/ccuda.pyx":6946
 *     if __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, CUfunction, int, size_t, unsigned int) nogil> __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags)(numBlocks, func, blockSize, dynamicSMemSize, flags)
 *     return err
 */
  __pyx_tuple__335 = PyTuple_Pack(1, __pyx_kp_u_Function_cuOccupancyMaxActiveBlo_2); if (unlikely(!__pyx_tuple__335)) __PYX_ERR(0, 6946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__335);
  __Pyx_GIVEREF(__pyx_tuple__335);

  /* "cuda/_cuda/ccuda.pyx":6955
 *     if __cuOccupancyMaxPotentialBlockSize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, int*, CUfunction, CUoccupancyB2DSize, size_t, int) nogil> __cuOccupancyMaxPotentialBlockSize)(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit)
 *     return err
 */
  __pyx_tuple__336 = PyTuple_Pack(1, __pyx_kp_u_Function_cuOccupancyMaxPotential); if (unlikely(!__pyx_tuple__336)) __PYX_ERR(0, 6955, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__336);
  __Pyx_GIVEREF(__pyx_tuple__336);

  /* "cuda/_cuda/ccuda.pyx":6964
 *     if __cuOccupancyMaxPotentialBlockSizeWithFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSizeWithFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, int*, CUfunction, CUoccupancyB2DSize, size_t, int, unsigned int) nogil> __cuOccupancyMaxPotentialBlockSizeWithFlags)(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags)
 *     return err
 */
  __pyx_tuple__337 = PyTuple_Pack(1, __pyx_kp_u_Function_cuOccupancyMaxPotential_2); if (unlikely(!__pyx_tuple__337)) __PYX_ERR(0, 6964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__337);
  __Pyx_GIVEREF(__pyx_tuple__337);

  /* "cuda/_cuda/ccuda.pyx":6973
 *     if __cuOccupancyAvailableDynamicSMemPerBlock == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyAvailableDynamicSMemPerBlock" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(size_t*, CUfunction, int, int) nogil> __cuOccupancyAvailableDynamicSMemPerBlock)(dynamicSmemSize, func, numBlocks, blockSize)
 *     return err
 */
  __pyx_tuple__338 = PyTuple_Pack(1, __pyx_kp_u_Function_cuOccupancyAvailableDyn); if (unlikely(!__pyx_tuple__338)) __PYX_ERR(0, 6973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__338);
  __Pyx_GIVEREF(__pyx_tuple__338);

  /* "cuda/_cuda/ccuda.pyx":6982
 *     if __cuOccupancyMaxPotentialClusterSize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialClusterSize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, CUfunction, const CUlaunchConfig*) nogil> __cuOccupancyMaxPotentialClusterSize)(clusterSize, func, config)
 *     return err
 */
  __pyx_tuple__339 = PyTuple_Pack(1, __pyx_kp_u_Function_cuOccupancyMaxPotential_3); if (unlikely(!__pyx_tuple__339)) __PYX_ERR(0, 6982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__339);
  __Pyx_GIVEREF(__pyx_tuple__339);

  /* "cuda/_cuda/ccuda.pyx":6991
 *     if __cuOccupancyMaxActiveClusters == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxActiveClusters" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, CUfunction, const CUlaunchConfig*) nogil> __cuOccupancyMaxActiveClusters)(numClusters, func, config)
 *     return err
 */
  __pyx_tuple__340 = PyTuple_Pack(1, __pyx_kp_u_Function_cuOccupancyMaxActiveClu); if (unlikely(!__pyx_tuple__340)) __PYX_ERR(0, 6991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__340);
  __Pyx_GIVEREF(__pyx_tuple__340);

  /* "cuda/_cuda/ccuda.pyx":7000
 *     if __cuTexRefSetArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, CUarray, unsigned int) nogil> __cuTexRefSetArray)(hTexRef, hArray, Flags)
 *     return err
 */
  __pyx_tuple__341 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetArray_not_fo); if (unlikely(!__pyx_tuple__341)) __PYX_ERR(0, 7000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__341);
  __Pyx_GIVEREF(__pyx_tuple__341);

  /* "cuda/_cuda/ccuda.pyx":7009
 *     if __cuTexRefSetMipmappedArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmappedArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, CUmipmappedArray, unsigned int) nogil> __cuTexRefSetMipmappedArray)(hTexRef, hMipmappedArray, Flags)
 *     return err
 */
  __pyx_tuple__342 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetMipmappedArr); if (unlikely(!__pyx_tuple__342)) __PYX_ERR(0, 7009, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__342);
  __Pyx_GIVEREF(__pyx_tuple__342);

  /* "cuda/_cuda/ccuda.pyx":7018
 *     if __cuTexRefSetAddress_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetAddress_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(size_t*, CUtexref, CUdeviceptr, size_t) nogil> __cuTexRefSetAddress_v2)(ByteOffset, hTexRef, dptr, numbytes)
 *     return err
 */
  __pyx_tuple__343 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetAddress_v2_n); if (unlikely(!__pyx_tuple__343)) __PYX_ERR(0, 7018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__343);
  __Pyx_GIVEREF(__pyx_tuple__343);

  /* "cuda/_cuda/ccuda.pyx":7027
 *     if __cuTexRefSetAddress2D_v3 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetAddress2D_v3" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, const CUDA_ARRAY_DESCRIPTOR*, CUdeviceptr, size_t) nogil> __cuTexRefSetAddress2D_v3)(hTexRef, desc, dptr, Pitch)
 *     return err
 */
  __pyx_tuple__344 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetAddress2D_v3); if (unlikely(!__pyx_tuple__344)) __PYX_ERR(0, 7027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__344);
  __Pyx_GIVEREF(__pyx_tuple__344);

  /* "cuda/_cuda/ccuda.pyx":7036
 *     if __cuTexRefSetFormat == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFormat" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, CUarray_format, int) nogil> __cuTexRefSetFormat)(hTexRef, fmt, NumPackedComponents)
 *     return err
 */
  __pyx_tuple__345 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetFormat_not_f); if (unlikely(!__pyx_tuple__345)) __PYX_ERR(0, 7036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__345);
  __Pyx_GIVEREF(__pyx_tuple__345);

  /* "cuda/_cuda/ccuda.pyx":7045
 *     if __cuTexRefSetAddressMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetAddressMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, int, CUaddress_mode) nogil> __cuTexRefSetAddressMode)(hTexRef, dim, am)
 *     return err
 */
  __pyx_tuple__346 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetAddressMode); if (unlikely(!__pyx_tuple__346)) __PYX_ERR(0, 7045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__346);
  __Pyx_GIVEREF(__pyx_tuple__346);

  /* "cuda/_cuda/ccuda.pyx":7054
 *     if __cuTexRefSetFilterMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFilterMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, CUfilter_mode) nogil> __cuTexRefSetFilterMode)(hTexRef, fm)
 *     return err
 */
  __pyx_tuple__347 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetFilterMode_n); if (unlikely(!__pyx_tuple__347)) __PYX_ERR(0, 7054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__347);
  __Pyx_GIVEREF(__pyx_tuple__347);

  /* "cuda/_cuda/ccuda.pyx":7063
 *     if __cuTexRefSetMipmapFilterMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapFilterMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, CUfilter_mode) nogil> __cuTexRefSetMipmapFilterMode)(hTexRef, fm)
 *     return err
 */
  __pyx_tuple__348 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetMipmapFilter); if (unlikely(!__pyx_tuple__348)) __PYX_ERR(0, 7063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__348);
  __Pyx_GIVEREF(__pyx_tuple__348);

  /* "cuda/_cuda/ccuda.pyx":7072
 *     if __cuTexRefSetMipmapLevelBias == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapLevelBias" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, float) nogil> __cuTexRefSetMipmapLevelBias)(hTexRef, bias)
 *     return err
 */
  __pyx_tuple__349 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetMipmapLevelB); if (unlikely(!__pyx_tuple__349)) __PYX_ERR(0, 7072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__349);
  __Pyx_GIVEREF(__pyx_tuple__349);

  /* "cuda/_cuda/ccuda.pyx":7081
 *     if __cuTexRefSetMipmapLevelClamp == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapLevelClamp" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, float, float) nogil> __cuTexRefSetMipmapLevelClamp)(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp)
 *     return err
 */
  __pyx_tuple__350 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetMipmapLevelC); if (unlikely(!__pyx_tuple__350)) __PYX_ERR(0, 7081, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__350);
  __Pyx_GIVEREF(__pyx_tuple__350);

  /* "cuda/_cuda/ccuda.pyx":7090
 *     if __cuTexRefSetMaxAnisotropy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMaxAnisotropy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, unsigned int) nogil> __cuTexRefSetMaxAnisotropy)(hTexRef, maxAniso)
 *     return err
 */
  __pyx_tuple__351 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetMaxAnisotrop); if (unlikely(!__pyx_tuple__351)) __PYX_ERR(0, 7090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__351);
  __Pyx_GIVEREF(__pyx_tuple__351);

  /* "cuda/_cuda/ccuda.pyx":7099
 *     if __cuTexRefSetBorderColor == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetBorderColor" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, float*) nogil> __cuTexRefSetBorderColor)(hTexRef, pBorderColor)
 *     return err
 */
  __pyx_tuple__352 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetBorderColor); if (unlikely(!__pyx_tuple__352)) __PYX_ERR(0, 7099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__352);
  __Pyx_GIVEREF(__pyx_tuple__352);

  /* "cuda/_cuda/ccuda.pyx":7108
 *     if __cuTexRefSetFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, unsigned int) nogil> __cuTexRefSetFlags)(hTexRef, Flags)
 *     return err
 */
  __pyx_tuple__353 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetFlags_not_fo); if (unlikely(!__pyx_tuple__353)) __PYX_ERR(0, 7108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__353);
  __Pyx_GIVEREF(__pyx_tuple__353);

  /* "cuda/_cuda/ccuda.pyx":7117
 *     if __cuTexRefGetAddress_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetAddress_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, CUtexref) nogil> __cuTexRefGetAddress_v2)(pdptr, hTexRef)
 *     return err
 */
  __pyx_tuple__354 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetAddress_v2_n); if (unlikely(!__pyx_tuple__354)) __PYX_ERR(0, 7117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__354);
  __Pyx_GIVEREF(__pyx_tuple__354);

  /* "cuda/_cuda/ccuda.pyx":7126
 *     if __cuTexRefGetArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray*, CUtexref) nogil> __cuTexRefGetArray)(phArray, hTexRef)
 *     return err
 */
  __pyx_tuple__355 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetArray_not_fo); if (unlikely(!__pyx_tuple__355)) __PYX_ERR(0, 7126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__355);
  __Pyx_GIVEREF(__pyx_tuple__355);

  /* "cuda/_cuda/ccuda.pyx":7135
 *     if __cuTexRefGetMipmappedArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmappedArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmipmappedArray*, CUtexref) nogil> __cuTexRefGetMipmappedArray)(phMipmappedArray, hTexRef)
 *     return err
 */
  __pyx_tuple__356 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetMipmappedArr); if (unlikely(!__pyx_tuple__356)) __PYX_ERR(0, 7135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__356);
  __Pyx_GIVEREF(__pyx_tuple__356);

  /* "cuda/_cuda/ccuda.pyx":7144
 *     if __cuTexRefGetAddressMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetAddressMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUaddress_mode*, CUtexref, int) nogil> __cuTexRefGetAddressMode)(pam, hTexRef, dim)
 *     return err
 */
  __pyx_tuple__357 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetAddressMode); if (unlikely(!__pyx_tuple__357)) __PYX_ERR(0, 7144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__357);
  __Pyx_GIVEREF(__pyx_tuple__357);

  /* "cuda/_cuda/ccuda.pyx":7153
 *     if __cuTexRefGetFilterMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFilterMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfilter_mode*, CUtexref) nogil> __cuTexRefGetFilterMode)(pfm, hTexRef)
 *     return err
 */
  __pyx_tuple__358 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetFilterMode_n); if (unlikely(!__pyx_tuple__358)) __PYX_ERR(0, 7153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__358);
  __Pyx_GIVEREF(__pyx_tuple__358);

  /* "cuda/_cuda/ccuda.pyx":7162
 *     if __cuTexRefGetFormat == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFormat" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray_format*, int*, CUtexref) nogil> __cuTexRefGetFormat)(pFormat, pNumChannels, hTexRef)
 *     return err
 */
  __pyx_tuple__359 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetFormat_not_f); if (unlikely(!__pyx_tuple__359)) __PYX_ERR(0, 7162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__359);
  __Pyx_GIVEREF(__pyx_tuple__359);

  /* "cuda/_cuda/ccuda.pyx":7171
 *     if __cuTexRefGetMipmapFilterMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapFilterMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfilter_mode*, CUtexref) nogil> __cuTexRefGetMipmapFilterMode)(pfm, hTexRef)
 *     return err
 */
  __pyx_tuple__360 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetMipmapFilter); if (unlikely(!__pyx_tuple__360)) __PYX_ERR(0, 7171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__360);
  __Pyx_GIVEREF(__pyx_tuple__360);

  /* "cuda/_cuda/ccuda.pyx":7180
 *     if __cuTexRefGetMipmapLevelBias == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapLevelBias" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(float*, CUtexref) nogil> __cuTexRefGetMipmapLevelBias)(pbias, hTexRef)
 *     return err
 */
  __pyx_tuple__361 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetMipmapLevelB); if (unlikely(!__pyx_tuple__361)) __PYX_ERR(0, 7180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__361);
  __Pyx_GIVEREF(__pyx_tuple__361);

  /* "cuda/_cuda/ccuda.pyx":7189
 *     if __cuTexRefGetMipmapLevelClamp == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapLevelClamp" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(float*, float*, CUtexref) nogil> __cuTexRefGetMipmapLevelClamp)(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef)
 *     return err
 */
  __pyx_tuple__362 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetMipmapLevelC); if (unlikely(!__pyx_tuple__362)) __PYX_ERR(0, 7189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__362);
  __Pyx_GIVEREF(__pyx_tuple__362);

  /* "cuda/_cuda/ccuda.pyx":7198
 *     if __cuTexRefGetMaxAnisotropy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMaxAnisotropy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, CUtexref) nogil> __cuTexRefGetMaxAnisotropy)(pmaxAniso, hTexRef)
 *     return err
 */
  __pyx_tuple__363 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetMaxAnisotrop); if (unlikely(!__pyx_tuple__363)) __PYX_ERR(0, 7198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__363);
  __Pyx_GIVEREF(__pyx_tuple__363);

  /* "cuda/_cuda/ccuda.pyx":7207
 *     if __cuTexRefGetBorderColor == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetBorderColor" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(float*, CUtexref) nogil> __cuTexRefGetBorderColor)(pBorderColor, hTexRef)
 *     return err
 */
  __pyx_tuple__364 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetBorderColor); if (unlikely(!__pyx_tuple__364)) __PYX_ERR(0, 7207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__364);
  __Pyx_GIVEREF(__pyx_tuple__364);

  /* "cuda/_cuda/ccuda.pyx":7216
 *     if __cuTexRefGetFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int*, CUtexref) nogil> __cuTexRefGetFlags)(pFlags, hTexRef)
 *     return err
 */
  __pyx_tuple__365 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetFlags_not_fo); if (unlikely(!__pyx_tuple__365)) __PYX_ERR(0, 7216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__365);
  __Pyx_GIVEREF(__pyx_tuple__365);

  /* "cuda/_cuda/ccuda.pyx":7225
 *     if __cuTexRefCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref*) nogil> __cuTexRefCreate)(pTexRef)
 *     return err
 */
  __pyx_tuple__366 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefCreate_not_foun); if (unlikely(!__pyx_tuple__366)) __PYX_ERR(0, 7225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__366);
  __Pyx_GIVEREF(__pyx_tuple__366);

  /* "cuda/_cuda/ccuda.pyx":7234
 *     if __cuTexRefDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref) nogil> __cuTexRefDestroy)(hTexRef)
 *     return err
 */
  __pyx_tuple__367 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefDestroy_not_fou); if (unlikely(!__pyx_tuple__367)) __PYX_ERR(0, 7234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__367);
  __Pyx_GIVEREF(__pyx_tuple__367);

  /* "cuda/_cuda/ccuda.pyx":7243
 *     if __cuSurfRefSetArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuSurfRefSetArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUsurfref, CUarray, unsigned int) nogil> __cuSurfRefSetArray)(hSurfRef, hArray, Flags)
 *     return err
 */
  __pyx_tuple__368 = PyTuple_Pack(1, __pyx_kp_u_Function_cuSurfRefSetArray_not_f); if (unlikely(!__pyx_tuple__368)) __PYX_ERR(0, 7243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__368);
  __Pyx_GIVEREF(__pyx_tuple__368);

  /* "cuda/_cuda/ccuda.pyx":7252
 *     if __cuSurfRefGetArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuSurfRefGetArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray*, CUsurfref) nogil> __cuSurfRefGetArray)(phArray, hSurfRef)
 *     return err
 */
  __pyx_tuple__369 = PyTuple_Pack(1, __pyx_kp_u_Function_cuSurfRefGetArray_not_f); if (unlikely(!__pyx_tuple__369)) __PYX_ERR(0, 7252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__369);
  __Pyx_GIVEREF(__pyx_tuple__369);

  /* "cuda/_cuda/ccuda.pyx":7261
 *     if __cuTexObjectCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexObject*, const CUDA_RESOURCE_DESC*, const CUDA_TEXTURE_DESC*, const CUDA_RESOURCE_VIEW_DESC*) nogil> __cuTexObjectCreate)(pTexObject, pResDesc, pTexDesc, pResViewDesc)
 *     return err
 */
  __pyx_tuple__370 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexObjectCreate_not_f); if (unlikely(!__pyx_tuple__370)) __PYX_ERR(0, 7261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__370);
  __Pyx_GIVEREF(__pyx_tuple__370);

  /* "cuda/_cuda/ccuda.pyx":7270
 *     if __cuTexObjectDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexObject) nogil> __cuTexObjectDestroy)(texObject)
 *     return err
 */
  __pyx_tuple__371 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexObjectDestroy_not); if (unlikely(!__pyx_tuple__371)) __PYX_ERR(0, 7270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__371);
  __Pyx_GIVEREF(__pyx_tuple__371);

  /* "cuda/_cuda/ccuda.pyx":7279
 *     if __cuTexObjectGetResourceDesc == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectGetResourceDesc" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUDA_RESOURCE_DESC*, CUtexObject) nogil> __cuTexObjectGetResourceDesc)(pResDesc, texObject)
 *     return err
 */
  __pyx_tuple__372 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexObjectGetResourceD); if (unlikely(!__pyx_tuple__372)) __PYX_ERR(0, 7279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__372);
  __Pyx_GIVEREF(__pyx_tuple__372);

  /* "cuda/_cuda/ccuda.pyx":7288
 *     if __cuTexObjectGetTextureDesc == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectGetTextureDesc" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUDA_TEXTURE_DESC*, CUtexObject) nogil> __cuTexObjectGetTextureDesc)(pTexDesc, texObject)
 *     return err
 */
  __pyx_tuple__373 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexObjectGetTextureDe); if (unlikely(!__pyx_tuple__373)) __PYX_ERR(0, 7288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__373);
  __Pyx_GIVEREF(__pyx_tuple__373);

  /* "cuda/_cuda/ccuda.pyx":7297
 *     if __cuTexObjectGetResourceViewDesc == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectGetResourceViewDesc" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUDA_RESOURCE_VIEW_DESC*, CUtexObject) nogil> __cuTexObjectGetResourceViewDesc)(pResViewDesc, texObject)
 *     return err
 */
  __pyx_tuple__374 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexObjectGetResourceV); if (unlikely(!__pyx_tuple__374)) __PYX_ERR(0, 7297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__374);
  __Pyx_GIVEREF(__pyx_tuple__374);

  /* "cuda/_cuda/ccuda.pyx":7306
 *     if __cuSurfObjectCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUsurfObject*, const CUDA_RESOURCE_DESC*) nogil> __cuSurfObjectCreate)(pSurfObject, pResDesc)
 *     return err
 */
  __pyx_tuple__375 = PyTuple_Pack(1, __pyx_kp_u_Function_cuSurfObjectCreate_not); if (unlikely(!__pyx_tuple__375)) __PYX_ERR(0, 7306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__375);
  __Pyx_GIVEREF(__pyx_tuple__375);

  /* "cuda/_cuda/ccuda.pyx":7315
 *     if __cuSurfObjectDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUsurfObject) nogil> __cuSurfObjectDestroy)(surfObject)
 *     return err
 */
  __pyx_tuple__376 = PyTuple_Pack(1, __pyx_kp_u_Function_cuSurfObjectDestroy_not); if (unlikely(!__pyx_tuple__376)) __PYX_ERR(0, 7315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__376);
  __Pyx_GIVEREF(__pyx_tuple__376);

  /* "cuda/_cuda/ccuda.pyx":7324
 *     if __cuSurfObjectGetResourceDesc == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectGetResourceDesc" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUDA_RESOURCE_DESC*, CUsurfObject) nogil> __cuSurfObjectGetResourceDesc)(pResDesc, surfObject)
 *     return err
 */
  __pyx_tuple__377 = PyTuple_Pack(1, __pyx_kp_u_Function_cuSurfObjectGetResource); if (unlikely(!__pyx_tuple__377)) __PYX_ERR(0, 7324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__377);
  __Pyx_GIVEREF(__pyx_tuple__377);

  /* "cuda/_cuda/ccuda.pyx":7333
 *     if __cuTensorMapEncodeTiled == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTensorMapEncodeTiled" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtensorMap*, CUtensorMapDataType, cuuint32_t, void*, const cuuint64_t*, const cuuint64_t*, const cuuint32_t*, const cuuint32_t*, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill) nogil> __cuTensorMapEncodeTiled)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, boxDim, elementStrides, interleave, swizzle, l2Promotion, oobFill)
 *     return err
 */
  __pyx_tuple__378 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTensorMapEncodeTiled); if (unlikely(!__pyx_tuple__378)) __PYX_ERR(0, 7333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__378);
  __Pyx_GIVEREF(__pyx_tuple__378);

  /* "cuda/_cuda/ccuda.pyx":7342
 *     if __cuTensorMapEncodeIm2col == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTensorMapEncodeIm2col" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtensorMap*, CUtensorMapDataType, cuuint32_t, void*, const cuuint64_t*, const cuuint64_t*, const int*, const int*, cuuint32_t, cuuint32_t, const cuuint32_t*, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill) nogil> __cuTensorMapEncodeIm2col)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCorner, pixelBoxUpperCorner, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, swizzle, l2Promotion, oobFill)
 *     return err
 */
  __pyx_tuple__379 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTensorMapEncodeIm2col); if (unlikely(!__pyx_tuple__379)) __PYX_ERR(0, 7342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__379);
  __Pyx_GIVEREF(__pyx_tuple__379);

  /* "cuda/_cuda/ccuda.pyx":7351
 *     if __cuTensorMapReplaceAddress == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTensorMapReplaceAddress" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtensorMap*, void*) nogil> __cuTensorMapReplaceAddress)(tensorMap, globalAddress)
 *     return err
 */
  __pyx_tuple__380 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTensorMapReplaceAddre); if (unlikely(!__pyx_tuple__380)) __PYX_ERR(0, 7351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__380);
  __Pyx_GIVEREF(__pyx_tuple__380);

  /* "cuda/_cuda/ccuda.pyx":7360
 *     if __cuDeviceCanAccessPeer == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceCanAccessPeer" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, CUdevice, CUdevice) nogil> __cuDeviceCanAccessPeer)(canAccessPeer, dev, peerDev)
 *     return err
 */
  __pyx_tuple__381 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceCanAccessPeer_n); if (unlikely(!__pyx_tuple__381)) __PYX_ERR(0, 7360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__381);
  __Pyx_GIVEREF(__pyx_tuple__381);

  /* "cuda/_cuda/ccuda.pyx":7369
 *     if __cuCtxEnablePeerAccess == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxEnablePeerAccess" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext, unsigned int) nogil> __cuCtxEnablePeerAccess)(peerContext, Flags)
 *     return err
 */
  __pyx_tuple__382 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxEnablePeerAccess_n); if (unlikely(!__pyx_tuple__382)) __PYX_ERR(0, 7369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__382);
  __Pyx_GIVEREF(__pyx_tuple__382);

  /* "cuda/_cuda/ccuda.pyx":7378
 *     if __cuCtxDisablePeerAccess == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDisablePeerAccess" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDisablePeerAccess)(peerContext)
 *     return err
 */
  __pyx_tuple__383 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxDisablePeerAccess); if (unlikely(!__pyx_tuple__383)) __PYX_ERR(0, 7378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__383);
  __Pyx_GIVEREF(__pyx_tuple__383);

  /* "cuda/_cuda/ccuda.pyx":7387
 *     if __cuDeviceGetP2PAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetP2PAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, CUdevice_P2PAttribute, CUdevice, CUdevice) nogil> __cuDeviceGetP2PAttribute)(value, attrib, srcDevice, dstDevice)
 *     return err
 */
  __pyx_tuple__384 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetP2PAttribute); if (unlikely(!__pyx_tuple__384)) __PYX_ERR(0, 7387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__384);
  __Pyx_GIVEREF(__pyx_tuple__384);

  /* "cuda/_cuda/ccuda.pyx":7396
 *     if __cuGraphicsUnregisterResource == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsUnregisterResource" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphicsResource) nogil> __cuGraphicsUnregisterResource)(resource)
 *     return err
 */
  __pyx_tuple__385 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsUnregisterRes); if (unlikely(!__pyx_tuple__385)) __PYX_ERR(0, 7396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__385);
  __Pyx_GIVEREF(__pyx_tuple__385);

  /* "cuda/_cuda/ccuda.pyx":7405
 *     if __cuGraphicsSubResourceGetMappedArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsSubResourceGetMappedArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray*, CUgraphicsResource, unsigned int, unsigned int) nogil> __cuGraphicsSubResourceGetMappedArray)(pArray, resource, arrayIndex, mipLevel)
 *     return err
 */
  __pyx_tuple__386 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsSubResourceGe); if (unlikely(!__pyx_tuple__386)) __PYX_ERR(0, 7405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__386);
  __Pyx_GIVEREF(__pyx_tuple__386);

  /* "cuda/_cuda/ccuda.pyx":7414
 *     if __cuGraphicsResourceGetMappedMipmappedArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedMipmappedArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmipmappedArray*, CUgraphicsResource) nogil> __cuGraphicsResourceGetMappedMipmappedArray)(pMipmappedArray, resource)
 *     return err
 */
  __pyx_tuple__387 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsResourceGetMa); if (unlikely(!__pyx_tuple__387)) __PYX_ERR(0, 7414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__387);
  __Pyx_GIVEREF(__pyx_tuple__387);

  /* "cuda/_cuda/ccuda.pyx":7423
 *     if __cuGraphicsResourceGetMappedPointer_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedPointer_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr*, size_t*, CUgraphicsResource) nogil> __cuGraphicsResourceGetMappedPointer_v2)(pDevPtr, pSize, resource)
 *     return err
 */
  __pyx_tuple__388 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsResourceGetMa_2); if (unlikely(!__pyx_tuple__388)) __PYX_ERR(0, 7423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__388);
  __Pyx_GIVEREF(__pyx_tuple__388);

  /* "cuda/_cuda/ccuda.pyx":7432
 *     if __cuGraphicsResourceSetMapFlags_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceSetMapFlags_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphicsResource, unsigned int) nogil> __cuGraphicsResourceSetMapFlags_v2)(resource, flags)
 *     return err
 */
  __pyx_tuple__389 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsResourceSetMa); if (unlikely(!__pyx_tuple__389)) __PYX_ERR(0, 7432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__389);
  __Pyx_GIVEREF(__pyx_tuple__389);

  /* "cuda/_cuda/ccuda.pyx":7441
 *     if __cuGraphicsMapResources == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsMapResources" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int, CUgraphicsResource*, CUstream) nogil> __cuGraphicsMapResources)(count, resources, hStream)
 *     return err
 */
  __pyx_tuple__390 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsMapResources); if (unlikely(!__pyx_tuple__390)) __PYX_ERR(0, 7441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__390);
  __Pyx_GIVEREF(__pyx_tuple__390);

  /* "cuda/_cuda/ccuda.pyx":7450
 *     if __cuGraphicsUnmapResources == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsUnmapResources" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int, CUgraphicsResource*, CUstream) nogil> __cuGraphicsUnmapResources)(count, resources, hStream)
 *     return err
 */
  __pyx_tuple__391 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsUnmapResource); if (unlikely(!__pyx_tuple__391)) __PYX_ERR(0, 7450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__391);
  __Pyx_GIVEREF(__pyx_tuple__391);

  /* "cuda/_cuda/ccuda.pyx":7459
 *     if __cuGetProcAddress_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGetProcAddress_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const char*, void**, int, cuuint64_t, CUdriverProcAddressQueryResult*) nogil> __cuGetProcAddress_v2)(symbol, pfn, cudaVersion, flags, symbolStatus)
 *     return err
 */
  __pyx_tuple__392 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGetProcAddress_v2_not); if (unlikely(!__pyx_tuple__392)) __PYX_ERR(0, 7459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__392);
  __Pyx_GIVEREF(__pyx_tuple__392);

  /* "cuda/_cuda/ccuda.pyx":7468
 *     if __cuCoredumpGetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCoredumpGetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcoredumpSettings, void*, size_t*) nogil> __cuCoredumpGetAttribute)(attrib, value, size)
 *     return err
 */
  __pyx_tuple__393 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCoredumpGetAttribute); if (unlikely(!__pyx_tuple__393)) __PYX_ERR(0, 7468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__393);
  __Pyx_GIVEREF(__pyx_tuple__393);

  /* "cuda/_cuda/ccuda.pyx":7477
 *     if __cuCoredumpGetAttributeGlobal == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCoredumpGetAttributeGlobal" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcoredumpSettings, void*, size_t*) nogil> __cuCoredumpGetAttributeGlobal)(attrib, value, size)
 *     return err
 */
  __pyx_tuple__394 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCoredumpGetAttributeG); if (unlikely(!__pyx_tuple__394)) __PYX_ERR(0, 7477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__394);
  __Pyx_GIVEREF(__pyx_tuple__394);

  /* "cuda/_cuda/ccuda.pyx":7486
 *     if __cuCoredumpSetAttribute == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCoredumpSetAttribute" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcoredumpSettings, void*, size_t*) nogil> __cuCoredumpSetAttribute)(attrib, value, size)
 *     return err
 */
  __pyx_tuple__395 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCoredumpSetAttribute); if (unlikely(!__pyx_tuple__395)) __PYX_ERR(0, 7486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__395);
  __Pyx_GIVEREF(__pyx_tuple__395);

  /* "cuda/_cuda/ccuda.pyx":7495
 *     if __cuCoredumpSetAttributeGlobal == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCoredumpSetAttributeGlobal" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcoredumpSettings, void*, size_t*) nogil> __cuCoredumpSetAttributeGlobal)(attrib, value, size)
 *     return err
 */
  __pyx_tuple__396 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCoredumpSetAttributeG); if (unlikely(!__pyx_tuple__396)) __PYX_ERR(0, 7495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__396);
  __Pyx_GIVEREF(__pyx_tuple__396);

  /* "cuda/_cuda/ccuda.pyx":7504
 *     if __cuGetExportTable == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGetExportTable" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const void**, const CUuuid*) nogil> __cuGetExportTable)(ppExportTable, pExportTableId)
 *     return err
 */
  __pyx_tuple__397 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGetExportTable_not_fo); if (unlikely(!__pyx_tuple__397)) __PYX_ERR(0, 7504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__397);
  __Pyx_GIVEREF(__pyx_tuple__397);

  /* "cuda/_cuda/ccuda.pyx":7513
 *     if __cuProfilerStart == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuProfilerStart" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)() nogil> __cuProfilerStart)()
 *     return err
 */
  __pyx_tuple__398 = PyTuple_Pack(1, __pyx_kp_u_Function_cuProfilerStart_not_fou); if (unlikely(!__pyx_tuple__398)) __PYX_ERR(0, 7513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__398);
  __Pyx_GIVEREF(__pyx_tuple__398);

  /* "cuda/_cuda/ccuda.pyx":7522
 *     if __cuProfilerStop == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuProfilerStop" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)() nogil> __cuProfilerStop)()
 *     return err
 */
  __pyx_tuple__399 = PyTuple_Pack(1, __pyx_kp_u_Function_cuProfilerStop_not_foun); if (unlikely(!__pyx_tuple__399)) __PYX_ERR(0, 7522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__399);
  __Pyx_GIVEREF(__pyx_tuple__399);

  /* "cuda/_cuda/ccuda.pyx":7531
 *     if __cuGraphicsEGLRegisterImage == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsEGLRegisterImage" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphicsResource*, EGLImageKHR, unsigned int) nogil> __cuGraphicsEGLRegisterImage)(pCudaResource, image, flags)
 *     return err
 */
  __pyx_tuple__400 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsEGLRegisterIm); if (unlikely(!__pyx_tuple__400)) __PYX_ERR(0, 7531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__400);
  __Pyx_GIVEREF(__pyx_tuple__400);

  /* "cuda/_cuda/ccuda.pyx":7540
 *     if __cuEGLStreamConsumerConnect == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerConnect" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUeglStreamConnection*, EGLStreamKHR) nogil> __cuEGLStreamConsumerConnect)(conn, stream)
 *     return err
 */
  __pyx_tuple__401 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEGLStreamConsumerConn); if (unlikely(!__pyx_tuple__401)) __PYX_ERR(0, 7540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__401);
  __Pyx_GIVEREF(__pyx_tuple__401);

  /* "cuda/_cuda/ccuda.pyx":7549
 *     if __cuEGLStreamConsumerConnectWithFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerConnectWithFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUeglStreamConnection*, EGLStreamKHR, unsigned int) nogil> __cuEGLStreamConsumerConnectWithFlags)(conn, stream, flags)
 *     return err
 */
  __pyx_tuple__402 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEGLStreamConsumerConn_2); if (unlikely(!__pyx_tuple__402)) __PYX_ERR(0, 7549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__402);
  __Pyx_GIVEREF(__pyx_tuple__402);

  /* "cuda/_cuda/ccuda.pyx":7558
 *     if __cuEGLStreamConsumerDisconnect == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerDisconnect" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUeglStreamConnection*) nogil> __cuEGLStreamConsumerDisconnect)(conn)
 *     return err
 */
  __pyx_tuple__403 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEGLStreamConsumerDisc); if (unlikely(!__pyx_tuple__403)) __PYX_ERR(0, 7558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__403);
  __Pyx_GIVEREF(__pyx_tuple__403);

  /* "cuda/_cuda/ccuda.pyx":7567
 *     if __cuEGLStreamConsumerAcquireFrame == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerAcquireFrame" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUeglStreamConnection*, CUgraphicsResource*, CUstream*, unsigned int) nogil> __cuEGLStreamConsumerAcquireFrame)(conn, pCudaResource, pStream, timeout)
 *     return err
 */
  __pyx_tuple__404 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEGLStreamConsumerAcqu); if (unlikely(!__pyx_tuple__404)) __PYX_ERR(0, 7567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__404);
  __Pyx_GIVEREF(__pyx_tuple__404);

  /* "cuda/_cuda/ccuda.pyx":7576
 *     if __cuEGLStreamConsumerReleaseFrame == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerReleaseFrame" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUeglStreamConnection*, CUgraphicsResource, CUstream*) nogil> __cuEGLStreamConsumerReleaseFrame)(conn, pCudaResource, pStream)
 *     return err
 */
  __pyx_tuple__405 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEGLStreamConsumerRele); if (unlikely(!__pyx_tuple__405)) __PYX_ERR(0, 7576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__405);
  __Pyx_GIVEREF(__pyx_tuple__405);

  /* "cuda/_cuda/ccuda.pyx":7585
 *     if __cuEGLStreamProducerConnect == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerConnect" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUeglStreamConnection*, EGLStreamKHR, EGLint, EGLint) nogil> __cuEGLStreamProducerConnect)(conn, stream, width, height)
 *     return err
 */
  __pyx_tuple__406 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEGLStreamProducerConn); if (unlikely(!__pyx_tuple__406)) __PYX_ERR(0, 7585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__406);
  __Pyx_GIVEREF(__pyx_tuple__406);

  /* "cuda/_cuda/ccuda.pyx":7594
 *     if __cuEGLStreamProducerDisconnect == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerDisconnect" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUeglStreamConnection*) nogil> __cuEGLStreamProducerDisconnect)(conn)
 *     return err
 */
  __pyx_tuple__407 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEGLStreamProducerDisc); if (unlikely(!__pyx_tuple__407)) __PYX_ERR(0, 7594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__407);
  __Pyx_GIVEREF(__pyx_tuple__407);

  /* "cuda/_cuda/ccuda.pyx":7603
 *     if __cuEGLStreamProducerPresentFrame == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerPresentFrame" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUeglStreamConnection*, CUeglFrame, CUstream*) nogil> __cuEGLStreamProducerPresentFrame)(conn, eglframe, pStream)
 *     return err
 */
  __pyx_tuple__408 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEGLStreamProducerPres); if (unlikely(!__pyx_tuple__408)) __PYX_ERR(0, 7603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__408);
  __Pyx_GIVEREF(__pyx_tuple__408);

  /* "cuda/_cuda/ccuda.pyx":7612
 *     if __cuEGLStreamProducerReturnFrame == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerReturnFrame" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUeglStreamConnection*, CUeglFrame*, CUstream*) nogil> __cuEGLStreamProducerReturnFrame)(conn, eglframe, pStream)
 *     return err
 */
  __pyx_tuple__409 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEGLStreamProducerRetu); if (unlikely(!__pyx_tuple__409)) __PYX_ERR(0, 7612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__409);
  __Pyx_GIVEREF(__pyx_tuple__409);

  /* "cuda/_cuda/ccuda.pyx":7621
 *     if __cuGraphicsResourceGetMappedEglFrame == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedEglFrame" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUeglFrame*, CUgraphicsResource, unsigned int, unsigned int) nogil> __cuGraphicsResourceGetMappedEglFrame)(eglFrame, resource, index, mipLevel)
 *     return err
 */
  __pyx_tuple__410 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsResourceGetMa_3); if (unlikely(!__pyx_tuple__410)) __PYX_ERR(0, 7621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__410);
  __Pyx_GIVEREF(__pyx_tuple__410);

  /* "cuda/_cuda/ccuda.pyx":7630
 *     if __cuEventCreateFromEGLSync == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventCreateFromEGLSync" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent*, EGLSyncKHR, unsigned int) nogil> __cuEventCreateFromEGLSync)(phEvent, eglSync, flags)
 *     return err
 */
  __pyx_tuple__411 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventCreateFromEGLSyn); if (unlikely(!__pyx_tuple__411)) __PYX_ERR(0, 7630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__411);
  __Pyx_GIVEREF(__pyx_tuple__411);

  /* "cuda/_cuda/ccuda.pyx":7639
 *     if __cuGraphicsGLRegisterBuffer == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsGLRegisterBuffer" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphicsResource*, GLuint, unsigned int) nogil> __cuGraphicsGLRegisterBuffer)(pCudaResource, buffer, Flags)
 *     return err
 */
  __pyx_tuple__412 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsGLRegisterBuf); if (unlikely(!__pyx_tuple__412)) __PYX_ERR(0, 7639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__412);
  __Pyx_GIVEREF(__pyx_tuple__412);

  /* "cuda/_cuda/ccuda.pyx":7648
 *     if __cuGraphicsGLRegisterImage == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsGLRegisterImage" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphicsResource*, GLuint, GLenum, unsigned int) nogil> __cuGraphicsGLRegisterImage)(pCudaResource, image, target, Flags)
 *     return err
 */
  __pyx_tuple__413 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsGLRegisterIma); if (unlikely(!__pyx_tuple__413)) __PYX_ERR(0, 7648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__413);
  __Pyx_GIVEREF(__pyx_tuple__413);

  /* "cuda/_cuda/ccuda.pyx":7657
 *     if __cuGLGetDevices_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGLGetDevices_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int*, CUdevice*, unsigned int, CUGLDeviceList) nogil> __cuGLGetDevices_v2)(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList)
 *     return err
 */
  __pyx_tuple__414 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGLGetDevices_v2_not_f); if (unlikely(!__pyx_tuple__414)) __PYX_ERR(0, 7657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__414);
  __Pyx_GIVEREF(__pyx_tuple__414);

  /* "cuda/_cuda/ccuda.pyx":7666
 *     if __cuVDPAUGetDevice == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuVDPAUGetDevice" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice*, VdpDevice, VdpGetProcAddress*) nogil> __cuVDPAUGetDevice)(pDevice, vdpDevice, vdpGetProcAddress)
 *     return err
 */
  __pyx_tuple__415 = PyTuple_Pack(1, __pyx_kp_u_Function_cuVDPAUGetDevice_not_fo); if (unlikely(!__pyx_tuple__415)) __PYX_ERR(0, 7666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__415);
  __Pyx_GIVEREF(__pyx_tuple__415);

  /* "cuda/_cuda/ccuda.pyx":7675
 *     if __cuVDPAUCtxCreate_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuVDPAUCtxCreate_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*, unsigned int, CUdevice, VdpDevice, VdpGetProcAddress*) nogil> __cuVDPAUCtxCreate_v2)(pCtx, flags, device, vdpDevice, vdpGetProcAddress)
 *     return err
 */
  __pyx_tuple__416 = PyTuple_Pack(1, __pyx_kp_u_Function_cuVDPAUCtxCreate_v2_not); if (unlikely(!__pyx_tuple__416)) __PYX_ERR(0, 7675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__416);
  __Pyx_GIVEREF(__pyx_tuple__416);

  /* "cuda/_cuda/ccuda.pyx":7684
 *     if __cuGraphicsVDPAURegisterVideoSurface == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsVDPAURegisterVideoSurface" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphicsResource*, VdpVideoSurface, unsigned int) nogil> __cuGraphicsVDPAURegisterVideoSurface)(pCudaResource, vdpSurface, flags)
 *     return err
 */
  __pyx_tuple__417 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsVDPAURegister); if (unlikely(!__pyx_tuple__417)) __PYX_ERR(0, 7684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__417);
  __Pyx_GIVEREF(__pyx_tuple__417);

  /* "cuda/_cuda/ccuda.pyx":7693
 *     if __cuGraphicsVDPAURegisterOutputSurface == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsVDPAURegisterOutputSurface" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphicsResource*, VdpOutputSurface, unsigned int) nogil> __cuGraphicsVDPAURegisterOutputSurface)(pCudaResource, vdpSurface, flags)
 *     return err
 */
  __pyx_tuple__418 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsVDPAURegister_2); if (unlikely(!__pyx_tuple__418)) __PYX_ERR(0, 7693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__418);
  __Pyx_GIVEREF(__pyx_tuple__418);
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_4294967296 = PyInt_FromString((char *)"4294967296", 0, 0); if (unlikely(!__pyx_int_4294967296)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  if (__Pyx_ExportFunction("_cuGetErrorString", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGetErrorString, "CUresult (CUresult, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGetErrorName", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGetErrorName, "CUresult (CUresult, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuInit", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuInit, "CUresult (unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDriverGetVersion", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDriverGetVersion, "CUresult (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGet", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGet, "CUresult (CUdevice *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetCount", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetCount, "CUresult (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetName", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetName, "CUresult (char *, int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetUuid", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetUuid, "CUresult (CUuuid *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetUuid_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetUuid_v2, "CUresult (CUuuid *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetLuid", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetLuid, "CUresult (char *, unsigned int *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceTotalMem_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceTotalMem_v2, "CUresult (size_t *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetTexture1DLinearMaxWidth", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetTexture1DLinearMaxWidth, "CUresult (size_t *, CUarray_format, unsigned int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute, "CUresult (int *, CUdevice_attribute, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetNvSciSyncAttributes", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetNvSciSyncAttributes, "CUresult (void *, CUdevice, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceSetMemPool", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceSetMemPool, "CUresult (CUdevice, CUmemoryPool)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetMemPool", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetMemPool, "CUresult (CUmemoryPool *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetDefaultMemPool", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetDefaultMemPool, "CUresult (CUmemoryPool *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetExecAffinitySupport", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetExecAffinitySupport, "CUresult (int *, CUexecAffinityType, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuFlushGPUDirectRDMAWrites", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuFlushGPUDirectRDMAWrites, "CUresult (CUflushGPUDirectRDMAWritesTarget, CUflushGPUDirectRDMAWritesScope)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetProperties", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetProperties, "CUresult (CUdevprop *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceComputeCapability", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceComputeCapability, "CUresult (int *, int *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDevicePrimaryCtxRetain", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxRetain, "CUresult (CUcontext *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDevicePrimaryCtxRelease_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxRelease_v2, "CUresult (CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDevicePrimaryCtxSetFlags_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxSetFlags_v2, "CUresult (CUdevice, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDevicePrimaryCtxGetState", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxGetState, "CUresult (CUdevice, unsigned int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDevicePrimaryCtxReset_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxReset_v2, "CUresult (CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxCreate_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxCreate_v2, "CUresult (CUcontext *, unsigned int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxCreate_v3", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxCreate_v3, "CUresult (CUcontext *, CUexecAffinityParam *, int, unsigned int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxDestroy_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxDestroy_v2, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxPushCurrent_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxPushCurrent_v2, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxPopCurrent_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxPopCurrent_v2, "CUresult (CUcontext *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxSetCurrent", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetCurrent, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxGetCurrent", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetCurrent, "CUresult (CUcontext *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxGetDevice", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetDevice, "CUresult (CUdevice *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxGetFlags", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetFlags, "CUresult (unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxSetFlags", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetFlags, "CUresult (unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxGetId", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetId, "CUresult (CUcontext, unsigned PY_LONG_LONG *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxSynchronize", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxSynchronize, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxSetLimit", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetLimit, "CUresult (CUlimit, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxGetLimit", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetLimit, "CUresult (size_t *, CUlimit)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxGetCacheConfig", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetCacheConfig, "CUresult (CUfunc_cache *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxSetCacheConfig", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetCacheConfig, "CUresult (CUfunc_cache)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxGetSharedMemConfig", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetSharedMemConfig, "CUresult (CUsharedconfig *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxSetSharedMemConfig", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetSharedMemConfig, "CUresult (CUsharedconfig)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxGetApiVersion", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetApiVersion, "CUresult (CUcontext, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxGetStreamPriorityRange", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetStreamPriorityRange, "CUresult (int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxResetPersistingL2Cache", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxResetPersistingL2Cache, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxGetExecAffinity", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetExecAffinity, "CUresult (CUexecAffinityParam *, CUexecAffinityType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxAttach", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxAttach, "CUresult (CUcontext *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxDetach", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxDetach, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuModuleLoad", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoad, "CUresult (CUmodule *, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuModuleLoadData", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoadData, "CUresult (CUmodule *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuModuleLoadDataEx", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoadDataEx, "CUresult (CUmodule *, void const *, unsigned int, CUjit_option *, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuModuleLoadFatBinary", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoadFatBinary, "CUresult (CUmodule *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuModuleUnload", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuModuleUnload, "CUresult (CUmodule)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuModuleGetLoadingMode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetLoadingMode, "CUresult (CUmoduleLoadingMode *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuModuleGetFunction", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetFunction, "CUresult (CUfunction *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuModuleGetGlobal_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetGlobal_v2, "CUresult (CUdeviceptr *, size_t *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuLinkCreate_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuLinkCreate_v2, "CUresult (unsigned int, CUjit_option *, void **, CUlinkState *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuLinkAddData_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuLinkAddData_v2, "CUresult (CUlinkState, CUjitInputType, void *, size_t, char const *, unsigned int, CUjit_option *, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuLinkAddFile_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuLinkAddFile_v2, "CUresult (CUlinkState, CUjitInputType, char const *, unsigned int, CUjit_option *, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuLinkComplete", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuLinkComplete, "CUresult (CUlinkState, void **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuLinkDestroy", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuLinkDestroy, "CUresult (CUlinkState)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuModuleGetTexRef", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetTexRef, "CUresult (CUtexref *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuModuleGetSurfRef", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetSurfRef, "CUresult (CUsurfref *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuLibraryLoadData", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuLibraryLoadData, "CUresult (CUlibrary *, void const *, CUjit_option *, void **, unsigned int, CUlibraryOption *, void **, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuLibraryLoadFromFile", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuLibraryLoadFromFile, "CUresult (CUlibrary *, char const *, CUjit_option *, void **, unsigned int, CUlibraryOption *, void **, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuLibraryUnload", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuLibraryUnload, "CUresult (CUlibrary)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuLibraryGetKernel", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuLibraryGetKernel, "CUresult (CUkernel *, CUlibrary, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuLibraryGetModule", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuLibraryGetModule, "CUresult (CUmodule *, CUlibrary)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuKernelGetFunction", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuKernelGetFunction, "CUresult (CUfunction *, CUkernel)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuLibraryGetGlobal", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuLibraryGetGlobal, "CUresult (CUdeviceptr *, size_t *, CUlibrary, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuLibraryGetManaged", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuLibraryGetManaged, "CUresult (CUdeviceptr *, size_t *, CUlibrary, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuLibraryGetUnifiedFunction", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuLibraryGetUnifiedFunction, "CUresult (void **, CUlibrary, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuKernelGetAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuKernelGetAttribute, "CUresult (int *, CUfunction_attribute, CUkernel, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuKernelSetAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuKernelSetAttribute, "CUresult (CUfunction_attribute, int, CUkernel, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuKernelSetCacheConfig", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuKernelSetCacheConfig, "CUresult (CUkernel, CUfunc_cache, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemGetInfo_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemGetInfo_v2, "CUresult (size_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemAlloc_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemAlloc_v2, "CUresult (CUdeviceptr *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemAllocPitch_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocPitch_v2, "CUresult (CUdeviceptr *, size_t *, size_t, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemFree_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemFree_v2, "CUresult (CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemGetAddressRange_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAddressRange_v2, "CUresult (CUdeviceptr *, size_t *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemAllocHost_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocHost_v2, "CUresult (void **, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemFreeHost", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemFreeHost, "CUresult (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemHostAlloc", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemHostAlloc, "CUresult (void **, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemHostGetDevicePointer_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemHostGetDevicePointer_v2, "CUresult (CUdeviceptr *, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemHostGetFlags", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemHostGetFlags, "CUresult (unsigned int *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemAllocManaged", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocManaged, "CUresult (CUdeviceptr *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetByPCIBusId", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetByPCIBusId, "CUresult (CUdevice *, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetPCIBusId", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetPCIBusId, "CUresult (char *, int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuIpcGetEventHandle", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuIpcGetEventHandle, "CUresult (CUipcEventHandle *, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuIpcOpenEventHandle", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuIpcOpenEventHandle, "CUresult (CUevent *, CUipcEventHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuIpcGetMemHandle", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuIpcGetMemHandle, "CUresult (CUipcMemHandle *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuIpcOpenMemHandle_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuIpcOpenMemHandle_v2, "CUresult (CUdeviceptr *, CUipcMemHandle, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuIpcCloseMemHandle", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuIpcCloseMemHandle, "CUresult (CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemHostRegister_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemHostRegister_v2, "CUresult (void *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemHostUnregister", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemHostUnregister, "CUresult (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpy", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy, "CUresult (CUdeviceptr, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpyPeer", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyPeer, "CUresult (CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpyHtoD_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoD_v2, "CUresult (CUdeviceptr, void const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpyDtoH_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoH_v2, "CUresult (void *, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpyDtoD_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoD_v2, "CUresult (CUdeviceptr, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpyDtoA_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoA_v2, "CUresult (CUarray, size_t, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpyAtoD_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAtoD_v2, "CUresult (CUdeviceptr, CUarray, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpyHtoA_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoA_v2, "CUresult (CUarray, size_t, void const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpyAtoH_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAtoH_v2, "CUresult (void *, CUarray, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpyAtoA_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAtoA_v2, "CUresult (CUarray, size_t, CUarray, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpy2D_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy2D_v2, "CUresult (CUDA_MEMCPY2D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpy2DUnaligned_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy2DUnaligned_v2, "CUresult (CUDA_MEMCPY2D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpy3D_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3D_v2, "CUresult (CUDA_MEMCPY3D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpy3DPeer", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DPeer, "CUresult (CUDA_MEMCPY3D_PEER const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpyAsync", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAsync, "CUresult (CUdeviceptr, CUdeviceptr, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpyPeerAsync", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyPeerAsync, "CUresult (CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpyHtoDAsync_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoDAsync_v2, "CUresult (CUdeviceptr, void const *, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpyDtoHAsync_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoHAsync_v2, "CUresult (void *, CUdeviceptr, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpyDtoDAsync_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoDAsync_v2, "CUresult (CUdeviceptr, CUdeviceptr, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpyHtoAAsync_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoAAsync_v2, "CUresult (CUarray, size_t, void const *, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpyAtoHAsync_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAtoHAsync_v2, "CUresult (void *, CUarray, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpy2DAsync_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy2DAsync_v2, "CUresult (CUDA_MEMCPY2D const *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpy3DAsync_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DAsync_v2, "CUresult (CUDA_MEMCPY3D const *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemcpy3DPeerAsync", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DPeerAsync, "CUresult (CUDA_MEMCPY3D_PEER const *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemsetD8_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD8_v2, "CUresult (CUdeviceptr, unsigned char, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemsetD16_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD16_v2, "CUresult (CUdeviceptr, unsigned short, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemsetD32_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD32_v2, "CUresult (CUdeviceptr, unsigned int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemsetD2D8_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D8_v2, "CUresult (CUdeviceptr, size_t, unsigned char, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemsetD2D16_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D16_v2, "CUresult (CUdeviceptr, size_t, unsigned short, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemsetD2D32_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D32_v2, "CUresult (CUdeviceptr, size_t, unsigned int, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemsetD8Async", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD8Async, "CUresult (CUdeviceptr, unsigned char, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemsetD16Async", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD16Async, "CUresult (CUdeviceptr, unsigned short, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemsetD32Async", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD32Async, "CUresult (CUdeviceptr, unsigned int, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemsetD2D8Async", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D8Async, "CUresult (CUdeviceptr, size_t, unsigned char, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemsetD2D16Async", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D16Async, "CUresult (CUdeviceptr, size_t, unsigned short, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemsetD2D32Async", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D32Async, "CUresult (CUdeviceptr, size_t, unsigned int, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuArrayCreate_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuArrayCreate_v2, "CUresult (CUarray *, CUDA_ARRAY_DESCRIPTOR const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuArrayGetDescriptor_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetDescriptor_v2, "CUresult (CUDA_ARRAY_DESCRIPTOR *, CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuArrayGetSparseProperties", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetSparseProperties, "CUresult (CUDA_ARRAY_SPARSE_PROPERTIES *, CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMipmappedArrayGetSparseProperties", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayGetSparseProperties, "CUresult (CUDA_ARRAY_SPARSE_PROPERTIES *, CUmipmappedArray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuArrayGetMemoryRequirements", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetMemoryRequirements, "CUresult (CUDA_ARRAY_MEMORY_REQUIREMENTS *, CUarray, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMipmappedArrayGetMemoryRequirements", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayGetMemoryRequirements, "CUresult (CUDA_ARRAY_MEMORY_REQUIREMENTS *, CUmipmappedArray, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuArrayGetPlane", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetPlane, "CUresult (CUarray *, CUarray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuArrayDestroy", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuArrayDestroy, "CUresult (CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuArray3DCreate_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuArray3DCreate_v2, "CUresult (CUarray *, CUDA_ARRAY3D_DESCRIPTOR const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuArray3DGetDescriptor_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuArray3DGetDescriptor_v2, "CUresult (CUDA_ARRAY3D_DESCRIPTOR *, CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMipmappedArrayCreate", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayCreate, "CUresult (CUmipmappedArray *, CUDA_ARRAY3D_DESCRIPTOR const *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMipmappedArrayGetLevel", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayGetLevel, "CUresult (CUarray *, CUmipmappedArray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMipmappedArrayDestroy", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayDestroy, "CUresult (CUmipmappedArray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemGetHandleForAddressRange", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemGetHandleForAddressRange, "CUresult (void *, CUdeviceptr, size_t, CUmemRangeHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemAddressReserve", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemAddressReserve, "CUresult (CUdeviceptr *, size_t, size_t, CUdeviceptr, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemAddressFree", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemAddressFree, "CUresult (CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemCreate", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemCreate, "CUresult (CUmemGenericAllocationHandle *, size_t, CUmemAllocationProp const *, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemRelease", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemRelease, "CUresult (CUmemGenericAllocationHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemMap", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemMap, "CUresult (CUdeviceptr, size_t, size_t, CUmemGenericAllocationHandle, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemMapArrayAsync", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemMapArrayAsync, "CUresult (CUarrayMapInfo *, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemUnmap", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemUnmap, "CUresult (CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemSetAccess", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemSetAccess, "CUresult (CUdeviceptr, size_t, CUmemAccessDesc const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemGetAccess", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAccess, "CUresult (unsigned PY_LONG_LONG *, CUmemLocation const *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemExportToShareableHandle", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemExportToShareableHandle, "CUresult (void *, CUmemGenericAllocationHandle, CUmemAllocationHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemImportFromShareableHandle", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemImportFromShareableHandle, "CUresult (CUmemGenericAllocationHandle *, void *, CUmemAllocationHandleType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemGetAllocationGranularity", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAllocationGranularity, "CUresult (size_t *, CUmemAllocationProp const *, CUmemAllocationGranularity_flags)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemGetAllocationPropertiesFromHandle", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAllocationPropertiesFromHandle, "CUresult (CUmemAllocationProp *, CUmemGenericAllocationHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemRetainAllocationHandle", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemRetainAllocationHandle, "CUresult (CUmemGenericAllocationHandle *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemFreeAsync", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemFreeAsync, "CUresult (CUdeviceptr, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemAllocAsync", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocAsync, "CUresult (CUdeviceptr *, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemPoolTrimTo", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolTrimTo, "CUresult (CUmemoryPool, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemPoolSetAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolSetAttribute, "CUresult (CUmemoryPool, CUmemPool_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemPoolGetAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolGetAttribute, "CUresult (CUmemoryPool, CUmemPool_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemPoolSetAccess", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolSetAccess, "CUresult (CUmemoryPool, CUmemAccessDesc const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemPoolGetAccess", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolGetAccess, "CUresult (CUmemAccess_flags *, CUmemoryPool, CUmemLocation *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemPoolCreate", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolCreate, "CUresult (CUmemoryPool *, CUmemPoolProps const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemPoolDestroy", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolDestroy, "CUresult (CUmemoryPool)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemAllocFromPoolAsync", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocFromPoolAsync, "CUresult (CUdeviceptr *, size_t, CUmemoryPool, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemPoolExportToShareableHandle", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolExportToShareableHandle, "CUresult (void *, CUmemoryPool, CUmemAllocationHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemPoolImportFromShareableHandle", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolImportFromShareableHandle, "CUresult (CUmemoryPool *, void *, CUmemAllocationHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemPoolExportPointer", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolExportPointer, "CUresult (CUmemPoolPtrExportData *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemPoolImportPointer", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolImportPointer, "CUresult (CUdeviceptr *, CUmemoryPool, CUmemPoolPtrExportData *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMulticastCreate", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMulticastCreate, "CUresult (CUmemGenericAllocationHandle *, CUmulticastObjectProp const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMulticastAddDevice", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMulticastAddDevice, "CUresult (CUmemGenericAllocationHandle, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMulticastBindMem", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMulticastBindMem, "CUresult (CUmemGenericAllocationHandle, size_t, CUmemGenericAllocationHandle, size_t, size_t, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMulticastBindAddr", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMulticastBindAddr, "CUresult (CUmemGenericAllocationHandle, size_t, CUdeviceptr, size_t, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMulticastUnbind", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMulticastUnbind, "CUresult (CUmemGenericAllocationHandle, CUdevice, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMulticastGetGranularity", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMulticastGetGranularity, "CUresult (size_t *, CUmulticastObjectProp const *, CUmulticastGranularity_flags)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuPointerGetAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuPointerGetAttribute, "CUresult (void *, CUpointer_attribute, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemPrefetchAsync", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemPrefetchAsync, "CUresult (CUdeviceptr, size_t, CUdevice, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemPrefetchAsync_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemPrefetchAsync_v2, "CUresult (CUdeviceptr, size_t, CUmemLocation, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemAdvise", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemAdvise, "CUresult (CUdeviceptr, size_t, CUmem_advise, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemAdvise_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemAdvise_v2, "CUresult (CUdeviceptr, size_t, CUmem_advise, CUmemLocation)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemRangeGetAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemRangeGetAttribute, "CUresult (void *, size_t, CUmem_range_attribute, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuMemRangeGetAttributes", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuMemRangeGetAttributes, "CUresult (void **, size_t *, CUmem_range_attribute *, size_t, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuPointerSetAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuPointerSetAttribute, "CUresult (void const *, CUpointer_attribute, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuPointerGetAttributes", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuPointerGetAttributes, "CUresult (unsigned int, CUpointer_attribute *, void **, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamCreate", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamCreate, "CUresult (CUstream *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamCreateWithPriority", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamCreateWithPriority, "CUresult (CUstream *, unsigned int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamGetPriority", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetPriority, "CUresult (CUstream, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamGetFlags", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetFlags, "CUresult (CUstream, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamGetId", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetId, "CUresult (CUstream, unsigned PY_LONG_LONG *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamGetCtx", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCtx, "CUresult (CUstream, CUcontext *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamWaitEvent", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitEvent, "CUresult (CUstream, CUevent, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamAddCallback", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamAddCallback, "CUresult (CUstream, CUstreamCallback, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamBeginCapture_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamBeginCapture_v2, "CUresult (CUstream, CUstreamCaptureMode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuThreadExchangeStreamCaptureMode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuThreadExchangeStreamCaptureMode, "CUresult (CUstreamCaptureMode *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamEndCapture", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamEndCapture, "CUresult (CUstream, CUgraph *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamIsCapturing", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamIsCapturing, "CUresult (CUstream, CUstreamCaptureStatus *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamGetCaptureInfo_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCaptureInfo_v2, "CUresult (CUstream, CUstreamCaptureStatus *, cuuint64_t *, CUgraph *, CUgraphNode const **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamUpdateCaptureDependencies", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamUpdateCaptureDependencies, "CUresult (CUstream, CUgraphNode *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamAttachMemAsync", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamAttachMemAsync, "CUresult (CUstream, CUdeviceptr, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamQuery", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamQuery, "CUresult (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamSynchronize", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamSynchronize, "CUresult (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamDestroy_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamDestroy_v2, "CUresult (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamCopyAttributes", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamCopyAttributes, "CUresult (CUstream, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamGetAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetAttribute, "CUresult (CUstream, CUstreamAttrID, CUstreamAttrValue *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamSetAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamSetAttribute, "CUresult (CUstream, CUstreamAttrID, CUstreamAttrValue const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuEventCreate", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuEventCreate, "CUresult (CUevent *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuEventRecord", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuEventRecord, "CUresult (CUevent, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuEventRecordWithFlags", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuEventRecordWithFlags, "CUresult (CUevent, CUstream, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuEventQuery", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuEventQuery, "CUresult (CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuEventSynchronize", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuEventSynchronize, "CUresult (CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuEventDestroy_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuEventDestroy_v2, "CUresult (CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuEventElapsedTime", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuEventElapsedTime, "CUresult (float *, CUevent, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuImportExternalMemory", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuImportExternalMemory, "CUresult (CUexternalMemory *, CUDA_EXTERNAL_MEMORY_HANDLE_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuExternalMemoryGetMappedBuffer", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuExternalMemoryGetMappedBuffer, "CUresult (CUdeviceptr *, CUexternalMemory, CUDA_EXTERNAL_MEMORY_BUFFER_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuExternalMemoryGetMappedMipmappedArray", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuExternalMemoryGetMappedMipmappedArray, "CUresult (CUmipmappedArray *, CUexternalMemory, CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDestroyExternalMemory", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDestroyExternalMemory, "CUresult (CUexternalMemory)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuImportExternalSemaphore", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuImportExternalSemaphore, "CUresult (CUexternalSemaphore *, CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuSignalExternalSemaphoresAsync", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuSignalExternalSemaphoresAsync, "CUresult (CUexternalSemaphore const *, CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS const *, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuWaitExternalSemaphoresAsync", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuWaitExternalSemaphoresAsync, "CUresult (CUexternalSemaphore const *, CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS const *, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDestroyExternalSemaphore", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDestroyExternalSemaphore, "CUresult (CUexternalSemaphore)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamWaitValue32_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitValue32_v2, "CUresult (CUstream, CUdeviceptr, cuuint32_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamWaitValue64_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitValue64_v2, "CUresult (CUstream, CUdeviceptr, cuuint64_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamWriteValue32_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWriteValue32_v2, "CUresult (CUstream, CUdeviceptr, cuuint32_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamWriteValue64_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWriteValue64_v2, "CUresult (CUstream, CUdeviceptr, cuuint64_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamBatchMemOp_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamBatchMemOp_v2, "CUresult (CUstream, unsigned int, CUstreamBatchMemOpParams *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuFuncGetAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuFuncGetAttribute, "CUresult (int *, CUfunction_attribute, CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuFuncSetAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetAttribute, "CUresult (CUfunction, CUfunction_attribute, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuFuncSetCacheConfig", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetCacheConfig, "CUresult (CUfunction, CUfunc_cache)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuFuncSetSharedMemConfig", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetSharedMemConfig, "CUresult (CUfunction, CUsharedconfig)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuFuncGetModule", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuFuncGetModule, "CUresult (CUmodule *, CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuLaunchKernel", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchKernel, "CUresult (CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void **, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuLaunchKernelEx", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchKernelEx, "CUresult (CUlaunchConfig const *, CUfunction, void **, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuLaunchCooperativeKernel", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchCooperativeKernel, "CUresult (CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuLaunchCooperativeKernelMultiDevice", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchCooperativeKernelMultiDevice, "CUresult (CUDA_LAUNCH_PARAMS *, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuLaunchHostFunc", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchHostFunc, "CUresult (CUstream, CUhostFn, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuFuncSetBlockShape", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetBlockShape, "CUresult (CUfunction, int, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuFuncSetSharedSize", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetSharedSize, "CUresult (CUfunction, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuParamSetSize", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuParamSetSize, "CUresult (CUfunction, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuParamSeti", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuParamSeti, "CUresult (CUfunction, int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuParamSetf", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuParamSetf, "CUresult (CUfunction, int, float)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuParamSetv", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuParamSetv, "CUresult (CUfunction, int, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuLaunch", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuLaunch, "CUresult (CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuLaunchGrid", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchGrid, "CUresult (CUfunction, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuLaunchGridAsync", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchGridAsync, "CUresult (CUfunction, int, int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuParamSetTexRef", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuParamSetTexRef, "CUresult (CUfunction, int, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphCreate", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphCreate, "CUresult (CUgraph *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphAddKernelNode_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddKernelNode_v2, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_KERNEL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphKernelNodeGetParams_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeGetParams_v2, "CUresult (CUgraphNode, CUDA_KERNEL_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphKernelNodeSetParams_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeSetParams_v2, "CUresult (CUgraphNode, CUDA_KERNEL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphAddMemcpyNode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemcpyNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEMCPY3D const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphMemcpyNodeGetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemcpyNodeGetParams, "CUresult (CUgraphNode, CUDA_MEMCPY3D *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphMemcpyNodeSetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemcpyNodeSetParams, "CUresult (CUgraphNode, CUDA_MEMCPY3D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphAddMemsetNode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemsetNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEMSET_NODE_PARAMS const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphMemsetNodeGetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemsetNodeGetParams, "CUresult (CUgraphNode, CUDA_MEMSET_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphMemsetNodeSetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemsetNodeSetParams, "CUresult (CUgraphNode, CUDA_MEMSET_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphAddHostNode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddHostNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_HOST_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphHostNodeGetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphHostNodeGetParams, "CUresult (CUgraphNode, CUDA_HOST_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphHostNodeSetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphHostNodeSetParams, "CUresult (CUgraphNode, CUDA_HOST_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphAddChildGraphNode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddChildGraphNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphChildGraphNodeGetGraph", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphChildGraphNodeGetGraph, "CUresult (CUgraphNode, CUgraph *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphAddEmptyNode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddEmptyNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphAddEventRecordNode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddEventRecordNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphEventRecordNodeGetEvent", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventRecordNodeGetEvent, "CUresult (CUgraphNode, CUevent *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphEventRecordNodeSetEvent", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventRecordNodeSetEvent, "CUresult (CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphAddEventWaitNode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddEventWaitNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphEventWaitNodeGetEvent", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventWaitNodeGetEvent, "CUresult (CUgraphNode, CUevent *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphEventWaitNodeSetEvent", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventWaitNodeSetEvent, "CUresult (CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphAddExternalSemaphoresSignalNode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddExternalSemaphoresSignalNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphExternalSemaphoresSignalNodeGetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresSignalNodeGetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphExternalSemaphoresSignalNodeSetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresSignalNodeSetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphAddExternalSemaphoresWaitNode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddExternalSemaphoresWaitNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphExternalSemaphoresWaitNodeGetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresWaitNodeGetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphExternalSemaphoresWaitNodeSetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresWaitNodeSetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphAddBatchMemOpNode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddBatchMemOpNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_BATCH_MEM_OP_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphBatchMemOpNodeGetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphBatchMemOpNodeGetParams, "CUresult (CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphBatchMemOpNodeSetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphBatchMemOpNodeSetParams, "CUresult (CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphExecBatchMemOpNodeSetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecBatchMemOpNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphAddMemAllocNode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemAllocNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEM_ALLOC_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphMemAllocNodeGetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemAllocNodeGetParams, "CUresult (CUgraphNode, CUDA_MEM_ALLOC_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphAddMemFreeNode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemFreeNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphMemFreeNodeGetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemFreeNodeGetParams, "CUresult (CUgraphNode, CUdeviceptr *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGraphMemTrim", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGraphMemTrim, "CUresult (CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetGraphMemAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetGraphMemAttribute, "CUresult (CUdevice, CUgraphMem_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceSetGraphMemAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceSetGraphMemAttribute, "CUresult (CUdevice, CUgraphMem_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphClone", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphClone, "CUresult (CUgraph *, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphNodeFindInClone", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeFindInClone, "CUresult (CUgraphNode *, CUgraphNode, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphNodeGetType", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetType, "CUresult (CUgraphNode, CUgraphNodeType *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphGetNodes", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphGetNodes, "CUresult (CUgraph, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphGetRootNodes", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphGetRootNodes, "CUresult (CUgraph, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphGetEdges", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphGetEdges, "CUresult (CUgraph, CUgraphNode *, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphNodeGetDependencies", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetDependencies, "CUresult (CUgraphNode, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphNodeGetDependentNodes", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetDependentNodes, "CUresult (CUgraphNode, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphAddDependencies", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddDependencies, "CUresult (CUgraph, CUgraphNode const *, CUgraphNode const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphRemoveDependencies", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphRemoveDependencies, "CUresult (CUgraph, CUgraphNode const *, CUgraphNode const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphDestroyNode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphDestroyNode, "CUresult (CUgraphNode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphInstantiateWithFlags", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphInstantiateWithFlags, "CUresult (CUgraphExec *, CUgraph, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphInstantiateWithParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphInstantiateWithParams, "CUresult (CUgraphExec *, CUgraph, CUDA_GRAPH_INSTANTIATE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphExecGetFlags", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecGetFlags, "CUresult (CUgraphExec, cuuint64_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphExecKernelNodeSetParams_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecKernelNodeSetParams_v2, "CUresult (CUgraphExec, CUgraphNode, CUDA_KERNEL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphExecMemcpyNodeSetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecMemcpyNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_MEMCPY3D const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphExecMemsetNodeSetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecMemsetNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_MEMSET_NODE_PARAMS const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphExecHostNodeSetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecHostNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_HOST_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphExecChildGraphNodeSetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecChildGraphNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphExecEventRecordNodeSetEvent", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecEventRecordNodeSetEvent, "CUresult (CUgraphExec, CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphExecEventWaitNodeSetEvent", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecEventWaitNodeSetEvent, "CUresult (CUgraphExec, CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphExecExternalSemaphoresSignalNodeSetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecExternalSemaphoresSignalNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphExecExternalSemaphoresWaitNodeSetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecExternalSemaphoresWaitNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphNodeSetEnabled", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeSetEnabled, "CUresult (CUgraphExec, CUgraphNode, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphNodeGetEnabled", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetEnabled, "CUresult (CUgraphExec, CUgraphNode, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphUpload", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphUpload, "CUresult (CUgraphExec, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphLaunch", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphLaunch, "CUresult (CUgraphExec, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphExecDestroy", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecDestroy, "CUresult (CUgraphExec)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphDestroy", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphDestroy, "CUresult (CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphExecUpdate_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecUpdate_v2, "CUresult (CUgraphExec, CUgraph, CUgraphExecUpdateResultInfo *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphKernelNodeCopyAttributes", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeCopyAttributes, "CUresult (CUgraphNode, CUgraphNode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphKernelNodeGetAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeGetAttribute, "CUresult (CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphKernelNodeSetAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeSetAttribute, "CUresult (CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphDebugDotPrint", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphDebugDotPrint, "CUresult (CUgraph, char const *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuUserObjectCreate", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuUserObjectCreate, "CUresult (CUuserObject *, void *, CUhostFn, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuUserObjectRetain", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuUserObjectRetain, "CUresult (CUuserObject, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuUserObjectRelease", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuUserObjectRelease, "CUresult (CUuserObject, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphRetainUserObject", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphRetainUserObject, "CUresult (CUgraph, CUuserObject, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphReleaseUserObject", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphReleaseUserObject, "CUresult (CUgraph, CUuserObject, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphAddNode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUgraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphNodeSetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeSetParams, "CUresult (CUgraphNode, CUgraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphExecNodeSetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUgraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuOccupancyMaxActiveBlocksPerMultiprocessor", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxActiveBlocksPerMultiprocessor, "CUresult (int *, CUfunction, int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, "CUresult (int *, CUfunction, int, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuOccupancyMaxPotentialBlockSize", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxPotentialBlockSize, "CUresult (int *, int *, CUfunction, CUoccupancyB2DSize, size_t, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuOccupancyMaxPotentialBlockSizeWithFlags", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxPotentialBlockSizeWithFlags, "CUresult (int *, int *, CUfunction, CUoccupancyB2DSize, size_t, int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuOccupancyAvailableDynamicSMemPerBlock", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyAvailableDynamicSMemPerBlock, "CUresult (size_t *, CUfunction, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuOccupancyMaxPotentialClusterSize", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxPotentialClusterSize, "CUresult (int *, CUfunction, CUlaunchConfig const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuOccupancyMaxActiveClusters", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxActiveClusters, "CUresult (int *, CUfunction, CUlaunchConfig const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefSetArray", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetArray, "CUresult (CUtexref, CUarray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefSetMipmappedArray", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmappedArray, "CUresult (CUtexref, CUmipmappedArray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefSetAddress_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetAddress_v2, "CUresult (size_t *, CUtexref, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefSetAddress2D_v3", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetAddress2D_v3, "CUresult (CUtexref, CUDA_ARRAY_DESCRIPTOR const *, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefSetFormat", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetFormat, "CUresult (CUtexref, CUarray_format, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefSetAddressMode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetAddressMode, "CUresult (CUtexref, int, CUaddress_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefSetFilterMode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetFilterMode, "CUresult (CUtexref, CUfilter_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefSetMipmapFilterMode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmapFilterMode, "CUresult (CUtexref, CUfilter_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefSetMipmapLevelBias", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmapLevelBias, "CUresult (CUtexref, float)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefSetMipmapLevelClamp", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmapLevelClamp, "CUresult (CUtexref, float, float)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefSetMaxAnisotropy", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMaxAnisotropy, "CUresult (CUtexref, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefSetBorderColor", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetBorderColor, "CUresult (CUtexref, float *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefSetFlags", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetFlags, "CUresult (CUtexref, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefGetAddress_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetAddress_v2, "CUresult (CUdeviceptr *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefGetArray", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetArray, "CUresult (CUarray *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefGetMipmappedArray", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmappedArray, "CUresult (CUmipmappedArray *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefGetAddressMode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetAddressMode, "CUresult (CUaddress_mode *, CUtexref, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefGetFilterMode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetFilterMode, "CUresult (CUfilter_mode *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefGetFormat", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetFormat, "CUresult (CUarray_format *, int *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefGetMipmapFilterMode", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmapFilterMode, "CUresult (CUfilter_mode *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefGetMipmapLevelBias", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmapLevelBias, "CUresult (float *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefGetMipmapLevelClamp", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmapLevelClamp, "CUresult (float *, float *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefGetMaxAnisotropy", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMaxAnisotropy, "CUresult (int *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefGetBorderColor", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetBorderColor, "CUresult (float *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefGetFlags", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetFlags, "CUresult (unsigned int *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefCreate", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefCreate, "CUresult (CUtexref *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexRefDestroy", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefDestroy, "CUresult (CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuSurfRefSetArray", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuSurfRefSetArray, "CUresult (CUsurfref, CUarray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuSurfRefGetArray", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuSurfRefGetArray, "CUresult (CUarray *, CUsurfref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexObjectCreate", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectCreate, "CUresult (CUtexObject *, CUDA_RESOURCE_DESC const *, CUDA_TEXTURE_DESC const *, CUDA_RESOURCE_VIEW_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexObjectDestroy", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectDestroy, "CUresult (CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexObjectGetResourceDesc", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectGetResourceDesc, "CUresult (CUDA_RESOURCE_DESC *, CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexObjectGetTextureDesc", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectGetTextureDesc, "CUresult (CUDA_TEXTURE_DESC *, CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTexObjectGetResourceViewDesc", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectGetResourceViewDesc, "CUresult (CUDA_RESOURCE_VIEW_DESC *, CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuSurfObjectCreate", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuSurfObjectCreate, "CUresult (CUsurfObject *, CUDA_RESOURCE_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuSurfObjectDestroy", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuSurfObjectDestroy, "CUresult (CUsurfObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuSurfObjectGetResourceDesc", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuSurfObjectGetResourceDesc, "CUresult (CUDA_RESOURCE_DESC *, CUsurfObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTensorMapEncodeTiled", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTensorMapEncodeTiled, "CUresult (CUtensorMap *, CUtensorMapDataType, cuuint32_t, void *, cuuint64_t const *, cuuint64_t const *, cuuint32_t const *, cuuint32_t const *, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTensorMapEncodeIm2col", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTensorMapEncodeIm2col, "CUresult (CUtensorMap *, CUtensorMapDataType, cuuint32_t, void *, cuuint64_t const *, cuuint64_t const *, int const *, int const *, cuuint32_t, cuuint32_t, cuuint32_t const *, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuTensorMapReplaceAddress", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuTensorMapReplaceAddress, "CUresult (CUtensorMap *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceCanAccessPeer", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceCanAccessPeer, "CUresult (int *, CUdevice, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxEnablePeerAccess", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxEnablePeerAccess, "CUresult (CUcontext, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCtxDisablePeerAccess", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCtxDisablePeerAccess, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuDeviceGetP2PAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetP2PAttribute, "CUresult (int *, CUdevice_P2PAttribute, CUdevice, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphicsUnregisterResource", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsUnregisterResource, "CUresult (CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphicsSubResourceGetMappedArray", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsSubResourceGetMappedArray, "CUresult (CUarray *, CUgraphicsResource, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphicsResourceGetMappedMipmappedArray", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceGetMappedMipmappedArray, "CUresult (CUmipmappedArray *, CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphicsResourceGetMappedPointer_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceGetMappedPointer_v2, "CUresult (CUdeviceptr *, size_t *, CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphicsResourceSetMapFlags_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceSetMapFlags_v2, "CUresult (CUgraphicsResource, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphicsMapResources", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsMapResources, "CUresult (unsigned int, CUgraphicsResource *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphicsUnmapResources", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsUnmapResources, "CUresult (unsigned int, CUgraphicsResource *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGetProcAddress_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress_v2, "CUresult (char const *, void **, int, cuuint64_t, CUdriverProcAddressQueryResult *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCoredumpGetAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCoredumpGetAttribute, "CUresult (CUcoredumpSettings, void *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCoredumpGetAttributeGlobal", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCoredumpGetAttributeGlobal, "CUresult (CUcoredumpSettings, void *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCoredumpSetAttribute", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCoredumpSetAttribute, "CUresult (CUcoredumpSettings, void *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuCoredumpSetAttributeGlobal", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuCoredumpSetAttributeGlobal, "CUresult (CUcoredumpSettings, void *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGetExportTable", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGetExportTable, "CUresult (void const **, CUuuid const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuProfilerStart", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuProfilerStart, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuProfilerStop", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuProfilerStop, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphicsEGLRegisterImage", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsEGLRegisterImage, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_5ccuda_EGLImageKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuEGLStreamConsumerConnect", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerConnect, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_EGLStreamKHR)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuEGLStreamConsumerConnectWithFlags", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerConnectWithFlags, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_EGLStreamKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuEGLStreamConsumerDisconnect", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerDisconnect, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuEGLStreamConsumerAcquireFrame", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerAcquireFrame, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, CUgraphicsResource *, CUstream *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuEGLStreamConsumerReleaseFrame", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerReleaseFrame, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, CUgraphicsResource, CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuEGLStreamProducerConnect", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerConnect, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_EGLStreamKHR, __pyx_t_4cuda_5ccuda_EGLint, __pyx_t_4cuda_5ccuda_EGLint)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuEGLStreamProducerDisconnect", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerDisconnect, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuEGLStreamProducerPresentFrame", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerPresentFrame, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_CUeglFrame, CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuEGLStreamProducerReturnFrame", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerReturnFrame, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_CUeglFrame *, CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphicsResourceGetMappedEglFrame", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceGetMappedEglFrame, "CUresult (__pyx_t_4cuda_5ccuda_CUeglFrame *, CUgraphicsResource, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuEventCreateFromEGLSync", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuEventCreateFromEGLSync, "CUresult (CUevent *, __pyx_t_4cuda_5ccuda_EGLSyncKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphicsGLRegisterBuffer", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsGLRegisterBuffer, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_5ccuda_GLuint, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphicsGLRegisterImage", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsGLRegisterImage, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_5ccuda_GLuint, __pyx_t_4cuda_5ccuda_GLenum, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGLGetDevices_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGLGetDevices_v2, "CUresult (unsigned int *, CUdevice *, unsigned int, __pyx_t_4cuda_5ccuda_CUGLDeviceList)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuVDPAUGetDevice", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuVDPAUGetDevice, "CUresult (CUdevice *, __pyx_t_4cuda_5ccuda_VdpDevice, __pyx_t_4cuda_5ccuda_VdpGetProcAddress *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuVDPAUCtxCreate_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuVDPAUCtxCreate_v2, "CUresult (CUcontext *, unsigned int, CUdevice, __pyx_t_4cuda_5ccuda_VdpDevice, __pyx_t_4cuda_5ccuda_VdpGetProcAddress *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphicsVDPAURegisterVideoSurface", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsVDPAURegisterVideoSurface, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_5ccuda_VdpVideoSurface, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphicsVDPAURegisterOutputSurface", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsVDPAURegisterOutputSurface, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_5ccuda_VdpOutputSurface, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __pyx_t_1 = PyImport_ImportModule("cuda.ccuda"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_ImportFunction_0_29_35(__pyx_t_1, "cuGetProcAddress", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuGetProcAddress, "CUresult (char const *, void **, int, cuuint64_t, CUdriverProcAddressQueryResult *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}


#ifndef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#elif PY_MAJOR_VERSION < 3
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" void
#else
#define __Pyx_PyMODINIT_FUNC void
#endif
#else
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyObject *
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initccuda(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initccuda(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_ccuda(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_ccuda(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
            result = PyDict_SetItemString(moddict, to_name, value);
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    if (__Pyx_check_single_interpreter())
        return NULL;
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec_ccuda(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'ccuda' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  #if CYTHON_REFNANNY
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
if (!__Pyx_RefNanny) {
  PyErr_Clear();
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  if (!__Pyx_RefNanny)
      Py_FatalError("failed to import 'refnanny' module");
}
#endif
  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_ccuda(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  PyEval_InitThreads();
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("ccuda", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_b);
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_cython_runtime);
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_cuda___cuda__ccuda) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "cuda._cuda.ccuda")) {
      if (unlikely(PyDict_SetItemString(modules, "cuda._cuda.ccuda", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  if (unlikely(__Pyx_modinit_function_export_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_type_init_code();
  (void)__Pyx_modinit_type_import_code();
  (void)__Pyx_modinit_variable_import_code();
  if (unlikely(__Pyx_modinit_function_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __Pyx_TraceCall("__Pyx_PyMODINIT_FUNC PyInit_ccuda(void)", __pyx_f[0], 1, 0, __PYX_ERR(0, 1, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":8
 * # this software and related documentation outside the terms of the EULA
 * # is strictly prohibited.
 * import win32api             # <<<<<<<<<<<<<<
 * import struct
 * from pywintypes import error
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_win32api, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_win32api, __pyx_t_1) < 0) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/_cuda/ccuda.pyx":9
 * # is strictly prohibited.
 * import win32api
 * import struct             # <<<<<<<<<<<<<<
 * from pywintypes import error
 * import os
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_struct, __pyx_t_1) < 0) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cuda/_cuda/ccuda.pyx":10
 * import win32api
 * import struct
 * from pywintypes import error             # <<<<<<<<<<<<<<
 * import os
 * import sys
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_error);
  __Pyx_GIVEREF(__pyx_n_s_error);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_error);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_pywintypes, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_error, __pyx_t_1) < 0) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/_cuda/ccuda.pyx":11
 * import struct
 * from pywintypes import error
 * import os             # <<<<<<<<<<<<<<
 * import sys
 * cimport cuda._cuda.loader as loader
 */
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_os, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_2) < 0) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/_cuda/ccuda.pyx":12
 * from pywintypes import error
 * import os
 * import sys             # <<<<<<<<<<<<<<
 * cimport cuda._cuda.loader as loader
 * cdef bint __cuPythonInit = False
 */
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_sys, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cuda/_cuda/ccuda.pyx":14
 * import sys
 * cimport cuda._cuda.loader as loader
 * cdef bint __cuPythonInit = False             # <<<<<<<<<<<<<<
 * cdef void *__cuGetErrorString = NULL
 * cdef void *__cuGetErrorName = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuPythonInit = 0;

  /* "cuda/_cuda/ccuda.pyx":15
 * cimport cuda._cuda.loader as loader
 * cdef bint __cuPythonInit = False
 * cdef void *__cuGetErrorString = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGetErrorName = NULL
 * cdef void *__cuInit = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGetErrorString = NULL;

  /* "cuda/_cuda/ccuda.pyx":16
 * cdef bint __cuPythonInit = False
 * cdef void *__cuGetErrorString = NULL
 * cdef void *__cuGetErrorName = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuInit = NULL
 * cdef void *__cuDriverGetVersion = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGetErrorName = NULL;

  /* "cuda/_cuda/ccuda.pyx":17
 * cdef void *__cuGetErrorString = NULL
 * cdef void *__cuGetErrorName = NULL
 * cdef void *__cuInit = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDriverGetVersion = NULL
 * cdef void *__cuDeviceGet = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuInit = NULL;

  /* "cuda/_cuda/ccuda.pyx":18
 * cdef void *__cuGetErrorName = NULL
 * cdef void *__cuInit = NULL
 * cdef void *__cuDriverGetVersion = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDeviceGet = NULL
 * cdef void *__cuDeviceGetCount = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDriverGetVersion = NULL;

  /* "cuda/_cuda/ccuda.pyx":19
 * cdef void *__cuInit = NULL
 * cdef void *__cuDriverGetVersion = NULL
 * cdef void *__cuDeviceGet = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDeviceGetCount = NULL
 * cdef void *__cuDeviceGetName = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGet = NULL;

  /* "cuda/_cuda/ccuda.pyx":20
 * cdef void *__cuDriverGetVersion = NULL
 * cdef void *__cuDeviceGet = NULL
 * cdef void *__cuDeviceGetCount = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDeviceGetName = NULL
 * cdef void *__cuDeviceGetUuid = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetCount = NULL;

  /* "cuda/_cuda/ccuda.pyx":21
 * cdef void *__cuDeviceGet = NULL
 * cdef void *__cuDeviceGetCount = NULL
 * cdef void *__cuDeviceGetName = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDeviceGetUuid = NULL
 * cdef void *__cuDeviceGetUuid_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetName = NULL;

  /* "cuda/_cuda/ccuda.pyx":22
 * cdef void *__cuDeviceGetCount = NULL
 * cdef void *__cuDeviceGetName = NULL
 * cdef void *__cuDeviceGetUuid = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDeviceGetUuid_v2 = NULL
 * cdef void *__cuDeviceGetLuid = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetUuid = NULL;

  /* "cuda/_cuda/ccuda.pyx":23
 * cdef void *__cuDeviceGetName = NULL
 * cdef void *__cuDeviceGetUuid = NULL
 * cdef void *__cuDeviceGetUuid_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDeviceGetLuid = NULL
 * cdef void *__cuDeviceTotalMem_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetUuid_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":24
 * cdef void *__cuDeviceGetUuid = NULL
 * cdef void *__cuDeviceGetUuid_v2 = NULL
 * cdef void *__cuDeviceGetLuid = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDeviceTotalMem_v2 = NULL
 * cdef void *__cuDeviceGetTexture1DLinearMaxWidth = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetLuid = NULL;

  /* "cuda/_cuda/ccuda.pyx":25
 * cdef void *__cuDeviceGetUuid_v2 = NULL
 * cdef void *__cuDeviceGetLuid = NULL
 * cdef void *__cuDeviceTotalMem_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDeviceGetTexture1DLinearMaxWidth = NULL
 * cdef void *__cuDeviceGetAttribute = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceTotalMem_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":26
 * cdef void *__cuDeviceGetLuid = NULL
 * cdef void *__cuDeviceTotalMem_v2 = NULL
 * cdef void *__cuDeviceGetTexture1DLinearMaxWidth = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDeviceGetAttribute = NULL
 * cdef void *__cuDeviceGetNvSciSyncAttributes = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetTexture1DLinearMaxWidth = NULL;

  /* "cuda/_cuda/ccuda.pyx":27
 * cdef void *__cuDeviceTotalMem_v2 = NULL
 * cdef void *__cuDeviceGetTexture1DLinearMaxWidth = NULL
 * cdef void *__cuDeviceGetAttribute = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDeviceGetNvSciSyncAttributes = NULL
 * cdef void *__cuDeviceSetMemPool = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetAttribute = NULL;

  /* "cuda/_cuda/ccuda.pyx":28
 * cdef void *__cuDeviceGetTexture1DLinearMaxWidth = NULL
 * cdef void *__cuDeviceGetAttribute = NULL
 * cdef void *__cuDeviceGetNvSciSyncAttributes = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDeviceSetMemPool = NULL
 * cdef void *__cuDeviceGetMemPool = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetNvSciSyncAttributes = NULL;

  /* "cuda/_cuda/ccuda.pyx":29
 * cdef void *__cuDeviceGetAttribute = NULL
 * cdef void *__cuDeviceGetNvSciSyncAttributes = NULL
 * cdef void *__cuDeviceSetMemPool = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDeviceGetMemPool = NULL
 * cdef void *__cuDeviceGetDefaultMemPool = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceSetMemPool = NULL;

  /* "cuda/_cuda/ccuda.pyx":30
 * cdef void *__cuDeviceGetNvSciSyncAttributes = NULL
 * cdef void *__cuDeviceSetMemPool = NULL
 * cdef void *__cuDeviceGetMemPool = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDeviceGetDefaultMemPool = NULL
 * cdef void *__cuDeviceGetExecAffinitySupport = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetMemPool = NULL;

  /* "cuda/_cuda/ccuda.pyx":31
 * cdef void *__cuDeviceSetMemPool = NULL
 * cdef void *__cuDeviceGetMemPool = NULL
 * cdef void *__cuDeviceGetDefaultMemPool = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDeviceGetExecAffinitySupport = NULL
 * cdef void *__cuFlushGPUDirectRDMAWrites = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetDefaultMemPool = NULL;

  /* "cuda/_cuda/ccuda.pyx":32
 * cdef void *__cuDeviceGetMemPool = NULL
 * cdef void *__cuDeviceGetDefaultMemPool = NULL
 * cdef void *__cuDeviceGetExecAffinitySupport = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuFlushGPUDirectRDMAWrites = NULL
 * cdef void *__cuDeviceGetProperties = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetExecAffinitySupport = NULL;

  /* "cuda/_cuda/ccuda.pyx":33
 * cdef void *__cuDeviceGetDefaultMemPool = NULL
 * cdef void *__cuDeviceGetExecAffinitySupport = NULL
 * cdef void *__cuFlushGPUDirectRDMAWrites = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDeviceGetProperties = NULL
 * cdef void *__cuDeviceComputeCapability = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuFlushGPUDirectRDMAWrites = NULL;

  /* "cuda/_cuda/ccuda.pyx":34
 * cdef void *__cuDeviceGetExecAffinitySupport = NULL
 * cdef void *__cuFlushGPUDirectRDMAWrites = NULL
 * cdef void *__cuDeviceGetProperties = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDeviceComputeCapability = NULL
 * cdef void *__cuDevicePrimaryCtxRetain = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetProperties = NULL;

  /* "cuda/_cuda/ccuda.pyx":35
 * cdef void *__cuFlushGPUDirectRDMAWrites = NULL
 * cdef void *__cuDeviceGetProperties = NULL
 * cdef void *__cuDeviceComputeCapability = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDevicePrimaryCtxRetain = NULL
 * cdef void *__cuDevicePrimaryCtxRelease_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceComputeCapability = NULL;

  /* "cuda/_cuda/ccuda.pyx":36
 * cdef void *__cuDeviceGetProperties = NULL
 * cdef void *__cuDeviceComputeCapability = NULL
 * cdef void *__cuDevicePrimaryCtxRetain = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDevicePrimaryCtxRelease_v2 = NULL
 * cdef void *__cuDevicePrimaryCtxSetFlags_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxRetain = NULL;

  /* "cuda/_cuda/ccuda.pyx":37
 * cdef void *__cuDeviceComputeCapability = NULL
 * cdef void *__cuDevicePrimaryCtxRetain = NULL
 * cdef void *__cuDevicePrimaryCtxRelease_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDevicePrimaryCtxSetFlags_v2 = NULL
 * cdef void *__cuDevicePrimaryCtxGetState = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxRelease_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":38
 * cdef void *__cuDevicePrimaryCtxRetain = NULL
 * cdef void *__cuDevicePrimaryCtxRelease_v2 = NULL
 * cdef void *__cuDevicePrimaryCtxSetFlags_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDevicePrimaryCtxGetState = NULL
 * cdef void *__cuDevicePrimaryCtxReset_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxSetFlags_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":39
 * cdef void *__cuDevicePrimaryCtxRelease_v2 = NULL
 * cdef void *__cuDevicePrimaryCtxSetFlags_v2 = NULL
 * cdef void *__cuDevicePrimaryCtxGetState = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDevicePrimaryCtxReset_v2 = NULL
 * cdef void *__cuCtxCreate_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxGetState = NULL;

  /* "cuda/_cuda/ccuda.pyx":40
 * cdef void *__cuDevicePrimaryCtxSetFlags_v2 = NULL
 * cdef void *__cuDevicePrimaryCtxGetState = NULL
 * cdef void *__cuDevicePrimaryCtxReset_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxCreate_v2 = NULL
 * cdef void *__cuCtxCreate_v3 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxReset_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":41
 * cdef void *__cuDevicePrimaryCtxGetState = NULL
 * cdef void *__cuDevicePrimaryCtxReset_v2 = NULL
 * cdef void *__cuCtxCreate_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxCreate_v3 = NULL
 * cdef void *__cuCtxDestroy_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxCreate_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":42
 * cdef void *__cuDevicePrimaryCtxReset_v2 = NULL
 * cdef void *__cuCtxCreate_v2 = NULL
 * cdef void *__cuCtxCreate_v3 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxDestroy_v2 = NULL
 * cdef void *__cuCtxPushCurrent_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxCreate_v3 = NULL;

  /* "cuda/_cuda/ccuda.pyx":43
 * cdef void *__cuCtxCreate_v2 = NULL
 * cdef void *__cuCtxCreate_v3 = NULL
 * cdef void *__cuCtxDestroy_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxPushCurrent_v2 = NULL
 * cdef void *__cuCtxPopCurrent_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxDestroy_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":44
 * cdef void *__cuCtxCreate_v3 = NULL
 * cdef void *__cuCtxDestroy_v2 = NULL
 * cdef void *__cuCtxPushCurrent_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxPopCurrent_v2 = NULL
 * cdef void *__cuCtxSetCurrent = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxPushCurrent_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":45
 * cdef void *__cuCtxDestroy_v2 = NULL
 * cdef void *__cuCtxPushCurrent_v2 = NULL
 * cdef void *__cuCtxPopCurrent_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxSetCurrent = NULL
 * cdef void *__cuCtxGetCurrent = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxPopCurrent_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":46
 * cdef void *__cuCtxPushCurrent_v2 = NULL
 * cdef void *__cuCtxPopCurrent_v2 = NULL
 * cdef void *__cuCtxSetCurrent = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxGetCurrent = NULL
 * cdef void *__cuCtxGetDevice = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetCurrent = NULL;

  /* "cuda/_cuda/ccuda.pyx":47
 * cdef void *__cuCtxPopCurrent_v2 = NULL
 * cdef void *__cuCtxSetCurrent = NULL
 * cdef void *__cuCtxGetCurrent = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxGetDevice = NULL
 * cdef void *__cuCtxGetFlags = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetCurrent = NULL;

  /* "cuda/_cuda/ccuda.pyx":48
 * cdef void *__cuCtxSetCurrent = NULL
 * cdef void *__cuCtxGetCurrent = NULL
 * cdef void *__cuCtxGetDevice = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxGetFlags = NULL
 * cdef void *__cuCtxSetFlags = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetDevice = NULL;

  /* "cuda/_cuda/ccuda.pyx":49
 * cdef void *__cuCtxGetCurrent = NULL
 * cdef void *__cuCtxGetDevice = NULL
 * cdef void *__cuCtxGetFlags = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxSetFlags = NULL
 * cdef void *__cuCtxGetId = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetFlags = NULL;

  /* "cuda/_cuda/ccuda.pyx":50
 * cdef void *__cuCtxGetDevice = NULL
 * cdef void *__cuCtxGetFlags = NULL
 * cdef void *__cuCtxSetFlags = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxGetId = NULL
 * cdef void *__cuCtxSynchronize = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetFlags = NULL;

  /* "cuda/_cuda/ccuda.pyx":51
 * cdef void *__cuCtxGetFlags = NULL
 * cdef void *__cuCtxSetFlags = NULL
 * cdef void *__cuCtxGetId = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxSynchronize = NULL
 * cdef void *__cuCtxSetLimit = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetId = NULL;

  /* "cuda/_cuda/ccuda.pyx":52
 * cdef void *__cuCtxSetFlags = NULL
 * cdef void *__cuCtxGetId = NULL
 * cdef void *__cuCtxSynchronize = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxSetLimit = NULL
 * cdef void *__cuCtxGetLimit = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxSynchronize = NULL;

  /* "cuda/_cuda/ccuda.pyx":53
 * cdef void *__cuCtxGetId = NULL
 * cdef void *__cuCtxSynchronize = NULL
 * cdef void *__cuCtxSetLimit = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxGetLimit = NULL
 * cdef void *__cuCtxGetCacheConfig = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetLimit = NULL;

  /* "cuda/_cuda/ccuda.pyx":54
 * cdef void *__cuCtxSynchronize = NULL
 * cdef void *__cuCtxSetLimit = NULL
 * cdef void *__cuCtxGetLimit = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxGetCacheConfig = NULL
 * cdef void *__cuCtxSetCacheConfig = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetLimit = NULL;

  /* "cuda/_cuda/ccuda.pyx":55
 * cdef void *__cuCtxSetLimit = NULL
 * cdef void *__cuCtxGetLimit = NULL
 * cdef void *__cuCtxGetCacheConfig = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxSetCacheConfig = NULL
 * cdef void *__cuCtxGetSharedMemConfig = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetCacheConfig = NULL;

  /* "cuda/_cuda/ccuda.pyx":56
 * cdef void *__cuCtxGetLimit = NULL
 * cdef void *__cuCtxGetCacheConfig = NULL
 * cdef void *__cuCtxSetCacheConfig = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxGetSharedMemConfig = NULL
 * cdef void *__cuCtxSetSharedMemConfig = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetCacheConfig = NULL;

  /* "cuda/_cuda/ccuda.pyx":57
 * cdef void *__cuCtxGetCacheConfig = NULL
 * cdef void *__cuCtxSetCacheConfig = NULL
 * cdef void *__cuCtxGetSharedMemConfig = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxSetSharedMemConfig = NULL
 * cdef void *__cuCtxGetApiVersion = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetSharedMemConfig = NULL;

  /* "cuda/_cuda/ccuda.pyx":58
 * cdef void *__cuCtxSetCacheConfig = NULL
 * cdef void *__cuCtxGetSharedMemConfig = NULL
 * cdef void *__cuCtxSetSharedMemConfig = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxGetApiVersion = NULL
 * cdef void *__cuCtxGetStreamPriorityRange = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxSetSharedMemConfig = NULL;

  /* "cuda/_cuda/ccuda.pyx":59
 * cdef void *__cuCtxGetSharedMemConfig = NULL
 * cdef void *__cuCtxSetSharedMemConfig = NULL
 * cdef void *__cuCtxGetApiVersion = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxGetStreamPriorityRange = NULL
 * cdef void *__cuCtxResetPersistingL2Cache = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetApiVersion = NULL;

  /* "cuda/_cuda/ccuda.pyx":60
 * cdef void *__cuCtxSetSharedMemConfig = NULL
 * cdef void *__cuCtxGetApiVersion = NULL
 * cdef void *__cuCtxGetStreamPriorityRange = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxResetPersistingL2Cache = NULL
 * cdef void *__cuCtxGetExecAffinity = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetStreamPriorityRange = NULL;

  /* "cuda/_cuda/ccuda.pyx":61
 * cdef void *__cuCtxGetApiVersion = NULL
 * cdef void *__cuCtxGetStreamPriorityRange = NULL
 * cdef void *__cuCtxResetPersistingL2Cache = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxGetExecAffinity = NULL
 * cdef void *__cuCtxAttach = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxResetPersistingL2Cache = NULL;

  /* "cuda/_cuda/ccuda.pyx":62
 * cdef void *__cuCtxGetStreamPriorityRange = NULL
 * cdef void *__cuCtxResetPersistingL2Cache = NULL
 * cdef void *__cuCtxGetExecAffinity = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxAttach = NULL
 * cdef void *__cuCtxDetach = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetExecAffinity = NULL;

  /* "cuda/_cuda/ccuda.pyx":63
 * cdef void *__cuCtxResetPersistingL2Cache = NULL
 * cdef void *__cuCtxGetExecAffinity = NULL
 * cdef void *__cuCtxAttach = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxDetach = NULL
 * cdef void *__cuModuleLoad = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxAttach = NULL;

  /* "cuda/_cuda/ccuda.pyx":64
 * cdef void *__cuCtxGetExecAffinity = NULL
 * cdef void *__cuCtxAttach = NULL
 * cdef void *__cuCtxDetach = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuModuleLoad = NULL
 * cdef void *__cuModuleLoadData = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxDetach = NULL;

  /* "cuda/_cuda/ccuda.pyx":65
 * cdef void *__cuCtxAttach = NULL
 * cdef void *__cuCtxDetach = NULL
 * cdef void *__cuModuleLoad = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuModuleLoadData = NULL
 * cdef void *__cuModuleLoadDataEx = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoad = NULL;

  /* "cuda/_cuda/ccuda.pyx":66
 * cdef void *__cuCtxDetach = NULL
 * cdef void *__cuModuleLoad = NULL
 * cdef void *__cuModuleLoadData = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuModuleLoadDataEx = NULL
 * cdef void *__cuModuleLoadFatBinary = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadData = NULL;

  /* "cuda/_cuda/ccuda.pyx":67
 * cdef void *__cuModuleLoad = NULL
 * cdef void *__cuModuleLoadData = NULL
 * cdef void *__cuModuleLoadDataEx = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuModuleLoadFatBinary = NULL
 * cdef void *__cuModuleUnload = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadDataEx = NULL;

  /* "cuda/_cuda/ccuda.pyx":68
 * cdef void *__cuModuleLoadData = NULL
 * cdef void *__cuModuleLoadDataEx = NULL
 * cdef void *__cuModuleLoadFatBinary = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuModuleUnload = NULL
 * cdef void *__cuModuleGetLoadingMode = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuModuleLoadFatBinary = NULL;

  /* "cuda/_cuda/ccuda.pyx":69
 * cdef void *__cuModuleLoadDataEx = NULL
 * cdef void *__cuModuleLoadFatBinary = NULL
 * cdef void *__cuModuleUnload = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuModuleGetLoadingMode = NULL
 * cdef void *__cuModuleGetFunction = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuModuleUnload = NULL;

  /* "cuda/_cuda/ccuda.pyx":70
 * cdef void *__cuModuleLoadFatBinary = NULL
 * cdef void *__cuModuleUnload = NULL
 * cdef void *__cuModuleGetLoadingMode = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuModuleGetFunction = NULL
 * cdef void *__cuModuleGetGlobal_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetLoadingMode = NULL;

  /* "cuda/_cuda/ccuda.pyx":71
 * cdef void *__cuModuleUnload = NULL
 * cdef void *__cuModuleGetLoadingMode = NULL
 * cdef void *__cuModuleGetFunction = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuModuleGetGlobal_v2 = NULL
 * cdef void *__cuLinkCreate_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetFunction = NULL;

  /* "cuda/_cuda/ccuda.pyx":72
 * cdef void *__cuModuleGetLoadingMode = NULL
 * cdef void *__cuModuleGetFunction = NULL
 * cdef void *__cuModuleGetGlobal_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuLinkCreate_v2 = NULL
 * cdef void *__cuLinkAddData_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetGlobal_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":73
 * cdef void *__cuModuleGetFunction = NULL
 * cdef void *__cuModuleGetGlobal_v2 = NULL
 * cdef void *__cuLinkCreate_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuLinkAddData_v2 = NULL
 * cdef void *__cuLinkAddFile_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuLinkCreate_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":74
 * cdef void *__cuModuleGetGlobal_v2 = NULL
 * cdef void *__cuLinkCreate_v2 = NULL
 * cdef void *__cuLinkAddData_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuLinkAddFile_v2 = NULL
 * cdef void *__cuLinkComplete = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuLinkAddData_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":75
 * cdef void *__cuLinkCreate_v2 = NULL
 * cdef void *__cuLinkAddData_v2 = NULL
 * cdef void *__cuLinkAddFile_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuLinkComplete = NULL
 * cdef void *__cuLinkDestroy = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuLinkAddFile_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":76
 * cdef void *__cuLinkAddData_v2 = NULL
 * cdef void *__cuLinkAddFile_v2 = NULL
 * cdef void *__cuLinkComplete = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuLinkDestroy = NULL
 * cdef void *__cuModuleGetTexRef = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuLinkComplete = NULL;

  /* "cuda/_cuda/ccuda.pyx":77
 * cdef void *__cuLinkAddFile_v2 = NULL
 * cdef void *__cuLinkComplete = NULL
 * cdef void *__cuLinkDestroy = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuModuleGetTexRef = NULL
 * cdef void *__cuModuleGetSurfRef = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuLinkDestroy = NULL;

  /* "cuda/_cuda/ccuda.pyx":78
 * cdef void *__cuLinkComplete = NULL
 * cdef void *__cuLinkDestroy = NULL
 * cdef void *__cuModuleGetTexRef = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuModuleGetSurfRef = NULL
 * cdef void *__cuLibraryLoadData = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetTexRef = NULL;

  /* "cuda/_cuda/ccuda.pyx":79
 * cdef void *__cuLinkDestroy = NULL
 * cdef void *__cuModuleGetTexRef = NULL
 * cdef void *__cuModuleGetSurfRef = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuLibraryLoadData = NULL
 * cdef void *__cuLibraryLoadFromFile = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetSurfRef = NULL;

  /* "cuda/_cuda/ccuda.pyx":80
 * cdef void *__cuModuleGetTexRef = NULL
 * cdef void *__cuModuleGetSurfRef = NULL
 * cdef void *__cuLibraryLoadData = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuLibraryLoadFromFile = NULL
 * cdef void *__cuLibraryUnload = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuLibraryLoadData = NULL;

  /* "cuda/_cuda/ccuda.pyx":81
 * cdef void *__cuModuleGetSurfRef = NULL
 * cdef void *__cuLibraryLoadData = NULL
 * cdef void *__cuLibraryLoadFromFile = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuLibraryUnload = NULL
 * cdef void *__cuLibraryGetKernel = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuLibraryLoadFromFile = NULL;

  /* "cuda/_cuda/ccuda.pyx":82
 * cdef void *__cuLibraryLoadData = NULL
 * cdef void *__cuLibraryLoadFromFile = NULL
 * cdef void *__cuLibraryUnload = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuLibraryGetKernel = NULL
 * cdef void *__cuLibraryGetModule = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuLibraryUnload = NULL;

  /* "cuda/_cuda/ccuda.pyx":83
 * cdef void *__cuLibraryLoadFromFile = NULL
 * cdef void *__cuLibraryUnload = NULL
 * cdef void *__cuLibraryGetKernel = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuLibraryGetModule = NULL
 * cdef void *__cuKernelGetFunction = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetKernel = NULL;

  /* "cuda/_cuda/ccuda.pyx":84
 * cdef void *__cuLibraryUnload = NULL
 * cdef void *__cuLibraryGetKernel = NULL
 * cdef void *__cuLibraryGetModule = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuKernelGetFunction = NULL
 * cdef void *__cuLibraryGetGlobal = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetModule = NULL;

  /* "cuda/_cuda/ccuda.pyx":85
 * cdef void *__cuLibraryGetKernel = NULL
 * cdef void *__cuLibraryGetModule = NULL
 * cdef void *__cuKernelGetFunction = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuLibraryGetGlobal = NULL
 * cdef void *__cuLibraryGetManaged = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuKernelGetFunction = NULL;

  /* "cuda/_cuda/ccuda.pyx":86
 * cdef void *__cuLibraryGetModule = NULL
 * cdef void *__cuKernelGetFunction = NULL
 * cdef void *__cuLibraryGetGlobal = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuLibraryGetManaged = NULL
 * cdef void *__cuLibraryGetUnifiedFunction = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetGlobal = NULL;

  /* "cuda/_cuda/ccuda.pyx":87
 * cdef void *__cuKernelGetFunction = NULL
 * cdef void *__cuLibraryGetGlobal = NULL
 * cdef void *__cuLibraryGetManaged = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuLibraryGetUnifiedFunction = NULL
 * cdef void *__cuKernelGetAttribute = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetManaged = NULL;

  /* "cuda/_cuda/ccuda.pyx":88
 * cdef void *__cuLibraryGetGlobal = NULL
 * cdef void *__cuLibraryGetManaged = NULL
 * cdef void *__cuLibraryGetUnifiedFunction = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuKernelGetAttribute = NULL
 * cdef void *__cuKernelSetAttribute = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuLibraryGetUnifiedFunction = NULL;

  /* "cuda/_cuda/ccuda.pyx":89
 * cdef void *__cuLibraryGetManaged = NULL
 * cdef void *__cuLibraryGetUnifiedFunction = NULL
 * cdef void *__cuKernelGetAttribute = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuKernelSetAttribute = NULL
 * cdef void *__cuKernelSetCacheConfig = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuKernelGetAttribute = NULL;

  /* "cuda/_cuda/ccuda.pyx":90
 * cdef void *__cuLibraryGetUnifiedFunction = NULL
 * cdef void *__cuKernelGetAttribute = NULL
 * cdef void *__cuKernelSetAttribute = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuKernelSetCacheConfig = NULL
 * cdef void *__cuMemGetInfo_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuKernelSetAttribute = NULL;

  /* "cuda/_cuda/ccuda.pyx":91
 * cdef void *__cuKernelGetAttribute = NULL
 * cdef void *__cuKernelSetAttribute = NULL
 * cdef void *__cuKernelSetCacheConfig = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemGetInfo_v2 = NULL
 * cdef void *__cuMemAlloc_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuKernelSetCacheConfig = NULL;

  /* "cuda/_cuda/ccuda.pyx":92
 * cdef void *__cuKernelSetAttribute = NULL
 * cdef void *__cuKernelSetCacheConfig = NULL
 * cdef void *__cuMemGetInfo_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemAlloc_v2 = NULL
 * cdef void *__cuMemAllocPitch_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemGetInfo_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":93
 * cdef void *__cuKernelSetCacheConfig = NULL
 * cdef void *__cuMemGetInfo_v2 = NULL
 * cdef void *__cuMemAlloc_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemAllocPitch_v2 = NULL
 * cdef void *__cuMemFree_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemAlloc_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":94
 * cdef void *__cuMemGetInfo_v2 = NULL
 * cdef void *__cuMemAlloc_v2 = NULL
 * cdef void *__cuMemAllocPitch_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemFree_v2 = NULL
 * cdef void *__cuMemGetAddressRange_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocPitch_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":95
 * cdef void *__cuMemAlloc_v2 = NULL
 * cdef void *__cuMemAllocPitch_v2 = NULL
 * cdef void *__cuMemFree_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemGetAddressRange_v2 = NULL
 * cdef void *__cuMemAllocHost_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemFree_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":96
 * cdef void *__cuMemAllocPitch_v2 = NULL
 * cdef void *__cuMemFree_v2 = NULL
 * cdef void *__cuMemGetAddressRange_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemAllocHost_v2 = NULL
 * cdef void *__cuMemFreeHost = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAddressRange_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":97
 * cdef void *__cuMemFree_v2 = NULL
 * cdef void *__cuMemGetAddressRange_v2 = NULL
 * cdef void *__cuMemAllocHost_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemFreeHost = NULL
 * cdef void *__cuMemHostAlloc = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocHost_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":98
 * cdef void *__cuMemGetAddressRange_v2 = NULL
 * cdef void *__cuMemAllocHost_v2 = NULL
 * cdef void *__cuMemFreeHost = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemHostAlloc = NULL
 * cdef void *__cuMemHostGetDevicePointer_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemFreeHost = NULL;

  /* "cuda/_cuda/ccuda.pyx":99
 * cdef void *__cuMemAllocHost_v2 = NULL
 * cdef void *__cuMemFreeHost = NULL
 * cdef void *__cuMemHostAlloc = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemHostGetDevicePointer_v2 = NULL
 * cdef void *__cuMemHostGetFlags = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemHostAlloc = NULL;

  /* "cuda/_cuda/ccuda.pyx":100
 * cdef void *__cuMemFreeHost = NULL
 * cdef void *__cuMemHostAlloc = NULL
 * cdef void *__cuMemHostGetDevicePointer_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemHostGetFlags = NULL
 * cdef void *__cuMemAllocManaged = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemHostGetDevicePointer_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":101
 * cdef void *__cuMemHostAlloc = NULL
 * cdef void *__cuMemHostGetDevicePointer_v2 = NULL
 * cdef void *__cuMemHostGetFlags = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemAllocManaged = NULL
 * cdef void *__cuDeviceGetByPCIBusId = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemHostGetFlags = NULL;

  /* "cuda/_cuda/ccuda.pyx":102
 * cdef void *__cuMemHostGetDevicePointer_v2 = NULL
 * cdef void *__cuMemHostGetFlags = NULL
 * cdef void *__cuMemAllocManaged = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDeviceGetByPCIBusId = NULL
 * cdef void *__cuDeviceGetPCIBusId = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocManaged = NULL;

  /* "cuda/_cuda/ccuda.pyx":103
 * cdef void *__cuMemHostGetFlags = NULL
 * cdef void *__cuMemAllocManaged = NULL
 * cdef void *__cuDeviceGetByPCIBusId = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDeviceGetPCIBusId = NULL
 * cdef void *__cuIpcGetEventHandle = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetByPCIBusId = NULL;

  /* "cuda/_cuda/ccuda.pyx":104
 * cdef void *__cuMemAllocManaged = NULL
 * cdef void *__cuDeviceGetByPCIBusId = NULL
 * cdef void *__cuDeviceGetPCIBusId = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuIpcGetEventHandle = NULL
 * cdef void *__cuIpcOpenEventHandle = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetPCIBusId = NULL;

  /* "cuda/_cuda/ccuda.pyx":105
 * cdef void *__cuDeviceGetByPCIBusId = NULL
 * cdef void *__cuDeviceGetPCIBusId = NULL
 * cdef void *__cuIpcGetEventHandle = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuIpcOpenEventHandle = NULL
 * cdef void *__cuIpcGetMemHandle = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuIpcGetEventHandle = NULL;

  /* "cuda/_cuda/ccuda.pyx":106
 * cdef void *__cuDeviceGetPCIBusId = NULL
 * cdef void *__cuIpcGetEventHandle = NULL
 * cdef void *__cuIpcOpenEventHandle = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuIpcGetMemHandle = NULL
 * cdef void *__cuIpcOpenMemHandle_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuIpcOpenEventHandle = NULL;

  /* "cuda/_cuda/ccuda.pyx":107
 * cdef void *__cuIpcGetEventHandle = NULL
 * cdef void *__cuIpcOpenEventHandle = NULL
 * cdef void *__cuIpcGetMemHandle = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuIpcOpenMemHandle_v2 = NULL
 * cdef void *__cuIpcCloseMemHandle = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuIpcGetMemHandle = NULL;

  /* "cuda/_cuda/ccuda.pyx":108
 * cdef void *__cuIpcOpenEventHandle = NULL
 * cdef void *__cuIpcGetMemHandle = NULL
 * cdef void *__cuIpcOpenMemHandle_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuIpcCloseMemHandle = NULL
 * cdef void *__cuMemHostRegister_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuIpcOpenMemHandle_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":109
 * cdef void *__cuIpcGetMemHandle = NULL
 * cdef void *__cuIpcOpenMemHandle_v2 = NULL
 * cdef void *__cuIpcCloseMemHandle = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemHostRegister_v2 = NULL
 * cdef void *__cuMemHostUnregister = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuIpcCloseMemHandle = NULL;

  /* "cuda/_cuda/ccuda.pyx":110
 * cdef void *__cuIpcOpenMemHandle_v2 = NULL
 * cdef void *__cuIpcCloseMemHandle = NULL
 * cdef void *__cuMemHostRegister_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemHostUnregister = NULL
 * cdef void *__cuMemcpy = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemHostRegister_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":111
 * cdef void *__cuIpcCloseMemHandle = NULL
 * cdef void *__cuMemHostRegister_v2 = NULL
 * cdef void *__cuMemHostUnregister = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemcpy = NULL
 * cdef void *__cuMemcpyPeer = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemHostUnregister = NULL;

  /* "cuda/_cuda/ccuda.pyx":112
 * cdef void *__cuMemHostRegister_v2 = NULL
 * cdef void *__cuMemHostUnregister = NULL
 * cdef void *__cuMemcpy = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemcpyPeer = NULL
 * cdef void *__cuMemcpyHtoD_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy = NULL;

  /* "cuda/_cuda/ccuda.pyx":113
 * cdef void *__cuMemHostUnregister = NULL
 * cdef void *__cuMemcpy = NULL
 * cdef void *__cuMemcpyPeer = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemcpyHtoD_v2 = NULL
 * cdef void *__cuMemcpyDtoH_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyPeer = NULL;

  /* "cuda/_cuda/ccuda.pyx":114
 * cdef void *__cuMemcpy = NULL
 * cdef void *__cuMemcpyPeer = NULL
 * cdef void *__cuMemcpyHtoD_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemcpyDtoH_v2 = NULL
 * cdef void *__cuMemcpyDtoD_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoD_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":115
 * cdef void *__cuMemcpyPeer = NULL
 * cdef void *__cuMemcpyHtoD_v2 = NULL
 * cdef void *__cuMemcpyDtoH_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemcpyDtoD_v2 = NULL
 * cdef void *__cuMemcpyDtoA_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoH_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":116
 * cdef void *__cuMemcpyHtoD_v2 = NULL
 * cdef void *__cuMemcpyDtoH_v2 = NULL
 * cdef void *__cuMemcpyDtoD_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemcpyDtoA_v2 = NULL
 * cdef void *__cuMemcpyAtoD_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoD_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":117
 * cdef void *__cuMemcpyDtoH_v2 = NULL
 * cdef void *__cuMemcpyDtoD_v2 = NULL
 * cdef void *__cuMemcpyDtoA_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemcpyAtoD_v2 = NULL
 * cdef void *__cuMemcpyHtoA_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoA_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":118
 * cdef void *__cuMemcpyDtoD_v2 = NULL
 * cdef void *__cuMemcpyDtoA_v2 = NULL
 * cdef void *__cuMemcpyAtoD_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemcpyHtoA_v2 = NULL
 * cdef void *__cuMemcpyAtoH_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoD_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":119
 * cdef void *__cuMemcpyDtoA_v2 = NULL
 * cdef void *__cuMemcpyAtoD_v2 = NULL
 * cdef void *__cuMemcpyHtoA_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemcpyAtoH_v2 = NULL
 * cdef void *__cuMemcpyAtoA_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoA_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":120
 * cdef void *__cuMemcpyAtoD_v2 = NULL
 * cdef void *__cuMemcpyHtoA_v2 = NULL
 * cdef void *__cuMemcpyAtoH_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemcpyAtoA_v2 = NULL
 * cdef void *__cuMemcpy2D_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoH_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":121
 * cdef void *__cuMemcpyHtoA_v2 = NULL
 * cdef void *__cuMemcpyAtoH_v2 = NULL
 * cdef void *__cuMemcpyAtoA_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemcpy2D_v2 = NULL
 * cdef void *__cuMemcpy2DUnaligned_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoA_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":122
 * cdef void *__cuMemcpyAtoH_v2 = NULL
 * cdef void *__cuMemcpyAtoA_v2 = NULL
 * cdef void *__cuMemcpy2D_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemcpy2DUnaligned_v2 = NULL
 * cdef void *__cuMemcpy3D_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2D_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":123
 * cdef void *__cuMemcpyAtoA_v2 = NULL
 * cdef void *__cuMemcpy2D_v2 = NULL
 * cdef void *__cuMemcpy2DUnaligned_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemcpy3D_v2 = NULL
 * cdef void *__cuMemcpy3DPeer = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2DUnaligned_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":124
 * cdef void *__cuMemcpy2D_v2 = NULL
 * cdef void *__cuMemcpy2DUnaligned_v2 = NULL
 * cdef void *__cuMemcpy3D_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemcpy3DPeer = NULL
 * cdef void *__cuMemcpyAsync = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3D_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":125
 * cdef void *__cuMemcpy2DUnaligned_v2 = NULL
 * cdef void *__cuMemcpy3D_v2 = NULL
 * cdef void *__cuMemcpy3DPeer = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemcpyAsync = NULL
 * cdef void *__cuMemcpyPeerAsync = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DPeer = NULL;

  /* "cuda/_cuda/ccuda.pyx":126
 * cdef void *__cuMemcpy3D_v2 = NULL
 * cdef void *__cuMemcpy3DPeer = NULL
 * cdef void *__cuMemcpyAsync = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemcpyPeerAsync = NULL
 * cdef void *__cuMemcpyHtoDAsync_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAsync = NULL;

  /* "cuda/_cuda/ccuda.pyx":127
 * cdef void *__cuMemcpy3DPeer = NULL
 * cdef void *__cuMemcpyAsync = NULL
 * cdef void *__cuMemcpyPeerAsync = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemcpyHtoDAsync_v2 = NULL
 * cdef void *__cuMemcpyDtoHAsync_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyPeerAsync = NULL;

  /* "cuda/_cuda/ccuda.pyx":128
 * cdef void *__cuMemcpyAsync = NULL
 * cdef void *__cuMemcpyPeerAsync = NULL
 * cdef void *__cuMemcpyHtoDAsync_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemcpyDtoHAsync_v2 = NULL
 * cdef void *__cuMemcpyDtoDAsync_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoDAsync_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":129
 * cdef void *__cuMemcpyPeerAsync = NULL
 * cdef void *__cuMemcpyHtoDAsync_v2 = NULL
 * cdef void *__cuMemcpyDtoHAsync_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemcpyDtoDAsync_v2 = NULL
 * cdef void *__cuMemcpyHtoAAsync_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoHAsync_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":130
 * cdef void *__cuMemcpyHtoDAsync_v2 = NULL
 * cdef void *__cuMemcpyDtoHAsync_v2 = NULL
 * cdef void *__cuMemcpyDtoDAsync_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemcpyHtoAAsync_v2 = NULL
 * cdef void *__cuMemcpyAtoHAsync_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyDtoDAsync_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":131
 * cdef void *__cuMemcpyDtoHAsync_v2 = NULL
 * cdef void *__cuMemcpyDtoDAsync_v2 = NULL
 * cdef void *__cuMemcpyHtoAAsync_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemcpyAtoHAsync_v2 = NULL
 * cdef void *__cuMemcpy2DAsync_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyHtoAAsync_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":132
 * cdef void *__cuMemcpyDtoDAsync_v2 = NULL
 * cdef void *__cuMemcpyHtoAAsync_v2 = NULL
 * cdef void *__cuMemcpyAtoHAsync_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemcpy2DAsync_v2 = NULL
 * cdef void *__cuMemcpy3DAsync_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyAtoHAsync_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":133
 * cdef void *__cuMemcpyHtoAAsync_v2 = NULL
 * cdef void *__cuMemcpyAtoHAsync_v2 = NULL
 * cdef void *__cuMemcpy2DAsync_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemcpy3DAsync_v2 = NULL
 * cdef void *__cuMemcpy3DPeerAsync = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy2DAsync_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":134
 * cdef void *__cuMemcpyAtoHAsync_v2 = NULL
 * cdef void *__cuMemcpy2DAsync_v2 = NULL
 * cdef void *__cuMemcpy3DAsync_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemcpy3DPeerAsync = NULL
 * cdef void *__cuMemsetD8_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DAsync_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":135
 * cdef void *__cuMemcpy2DAsync_v2 = NULL
 * cdef void *__cuMemcpy3DAsync_v2 = NULL
 * cdef void *__cuMemcpy3DPeerAsync = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemsetD8_v2 = NULL
 * cdef void *__cuMemsetD16_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy3DPeerAsync = NULL;

  /* "cuda/_cuda/ccuda.pyx":136
 * cdef void *__cuMemcpy3DAsync_v2 = NULL
 * cdef void *__cuMemcpy3DPeerAsync = NULL
 * cdef void *__cuMemsetD8_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemsetD16_v2 = NULL
 * cdef void *__cuMemsetD32_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD8_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":137
 * cdef void *__cuMemcpy3DPeerAsync = NULL
 * cdef void *__cuMemsetD8_v2 = NULL
 * cdef void *__cuMemsetD16_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemsetD32_v2 = NULL
 * cdef void *__cuMemsetD2D8_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD16_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":138
 * cdef void *__cuMemsetD8_v2 = NULL
 * cdef void *__cuMemsetD16_v2 = NULL
 * cdef void *__cuMemsetD32_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemsetD2D8_v2 = NULL
 * cdef void *__cuMemsetD2D16_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD32_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":139
 * cdef void *__cuMemsetD16_v2 = NULL
 * cdef void *__cuMemsetD32_v2 = NULL
 * cdef void *__cuMemsetD2D8_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemsetD2D16_v2 = NULL
 * cdef void *__cuMemsetD2D32_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D8_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":140
 * cdef void *__cuMemsetD32_v2 = NULL
 * cdef void *__cuMemsetD2D8_v2 = NULL
 * cdef void *__cuMemsetD2D16_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemsetD2D32_v2 = NULL
 * cdef void *__cuMemsetD8Async = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D16_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":141
 * cdef void *__cuMemsetD2D8_v2 = NULL
 * cdef void *__cuMemsetD2D16_v2 = NULL
 * cdef void *__cuMemsetD2D32_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemsetD8Async = NULL
 * cdef void *__cuMemsetD16Async = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D32_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":142
 * cdef void *__cuMemsetD2D16_v2 = NULL
 * cdef void *__cuMemsetD2D32_v2 = NULL
 * cdef void *__cuMemsetD8Async = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemsetD16Async = NULL
 * cdef void *__cuMemsetD32Async = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD8Async = NULL;

  /* "cuda/_cuda/ccuda.pyx":143
 * cdef void *__cuMemsetD2D32_v2 = NULL
 * cdef void *__cuMemsetD8Async = NULL
 * cdef void *__cuMemsetD16Async = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemsetD32Async = NULL
 * cdef void *__cuMemsetD2D8Async = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD16Async = NULL;

  /* "cuda/_cuda/ccuda.pyx":144
 * cdef void *__cuMemsetD8Async = NULL
 * cdef void *__cuMemsetD16Async = NULL
 * cdef void *__cuMemsetD32Async = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemsetD2D8Async = NULL
 * cdef void *__cuMemsetD2D16Async = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD32Async = NULL;

  /* "cuda/_cuda/ccuda.pyx":145
 * cdef void *__cuMemsetD16Async = NULL
 * cdef void *__cuMemsetD32Async = NULL
 * cdef void *__cuMemsetD2D8Async = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemsetD2D16Async = NULL
 * cdef void *__cuMemsetD2D32Async = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D8Async = NULL;

  /* "cuda/_cuda/ccuda.pyx":146
 * cdef void *__cuMemsetD32Async = NULL
 * cdef void *__cuMemsetD2D8Async = NULL
 * cdef void *__cuMemsetD2D16Async = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemsetD2D32Async = NULL
 * cdef void *__cuArrayCreate_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D16Async = NULL;

  /* "cuda/_cuda/ccuda.pyx":147
 * cdef void *__cuMemsetD2D8Async = NULL
 * cdef void *__cuMemsetD2D16Async = NULL
 * cdef void *__cuMemsetD2D32Async = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuArrayCreate_v2 = NULL
 * cdef void *__cuArrayGetDescriptor_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemsetD2D32Async = NULL;

  /* "cuda/_cuda/ccuda.pyx":148
 * cdef void *__cuMemsetD2D16Async = NULL
 * cdef void *__cuMemsetD2D32Async = NULL
 * cdef void *__cuArrayCreate_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuArrayGetDescriptor_v2 = NULL
 * cdef void *__cuArrayGetSparseProperties = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuArrayCreate_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":149
 * cdef void *__cuMemsetD2D32Async = NULL
 * cdef void *__cuArrayCreate_v2 = NULL
 * cdef void *__cuArrayGetDescriptor_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuArrayGetSparseProperties = NULL
 * cdef void *__cuMipmappedArrayGetSparseProperties = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetDescriptor_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":150
 * cdef void *__cuArrayCreate_v2 = NULL
 * cdef void *__cuArrayGetDescriptor_v2 = NULL
 * cdef void *__cuArrayGetSparseProperties = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMipmappedArrayGetSparseProperties = NULL
 * cdef void *__cuArrayGetMemoryRequirements = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetSparseProperties = NULL;

  /* "cuda/_cuda/ccuda.pyx":151
 * cdef void *__cuArrayGetDescriptor_v2 = NULL
 * cdef void *__cuArrayGetSparseProperties = NULL
 * cdef void *__cuMipmappedArrayGetSparseProperties = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuArrayGetMemoryRequirements = NULL
 * cdef void *__cuMipmappedArrayGetMemoryRequirements = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetSparseProperties = NULL;

  /* "cuda/_cuda/ccuda.pyx":152
 * cdef void *__cuArrayGetSparseProperties = NULL
 * cdef void *__cuMipmappedArrayGetSparseProperties = NULL
 * cdef void *__cuArrayGetMemoryRequirements = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMipmappedArrayGetMemoryRequirements = NULL
 * cdef void *__cuArrayGetPlane = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetMemoryRequirements = NULL;

  /* "cuda/_cuda/ccuda.pyx":153
 * cdef void *__cuMipmappedArrayGetSparseProperties = NULL
 * cdef void *__cuArrayGetMemoryRequirements = NULL
 * cdef void *__cuMipmappedArrayGetMemoryRequirements = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuArrayGetPlane = NULL
 * cdef void *__cuArrayDestroy = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetMemoryRequirements = NULL;

  /* "cuda/_cuda/ccuda.pyx":154
 * cdef void *__cuArrayGetMemoryRequirements = NULL
 * cdef void *__cuMipmappedArrayGetMemoryRequirements = NULL
 * cdef void *__cuArrayGetPlane = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuArrayDestroy = NULL
 * cdef void *__cuArray3DCreate_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuArrayGetPlane = NULL;

  /* "cuda/_cuda/ccuda.pyx":155
 * cdef void *__cuMipmappedArrayGetMemoryRequirements = NULL
 * cdef void *__cuArrayGetPlane = NULL
 * cdef void *__cuArrayDestroy = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuArray3DCreate_v2 = NULL
 * cdef void *__cuArray3DGetDescriptor_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuArrayDestroy = NULL;

  /* "cuda/_cuda/ccuda.pyx":156
 * cdef void *__cuArrayGetPlane = NULL
 * cdef void *__cuArrayDestroy = NULL
 * cdef void *__cuArray3DCreate_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuArray3DGetDescriptor_v2 = NULL
 * cdef void *__cuMipmappedArrayCreate = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuArray3DCreate_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":157
 * cdef void *__cuArrayDestroy = NULL
 * cdef void *__cuArray3DCreate_v2 = NULL
 * cdef void *__cuArray3DGetDescriptor_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMipmappedArrayCreate = NULL
 * cdef void *__cuMipmappedArrayGetLevel = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuArray3DGetDescriptor_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":158
 * cdef void *__cuArray3DCreate_v2 = NULL
 * cdef void *__cuArray3DGetDescriptor_v2 = NULL
 * cdef void *__cuMipmappedArrayCreate = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMipmappedArrayGetLevel = NULL
 * cdef void *__cuMipmappedArrayDestroy = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayCreate = NULL;

  /* "cuda/_cuda/ccuda.pyx":159
 * cdef void *__cuArray3DGetDescriptor_v2 = NULL
 * cdef void *__cuMipmappedArrayCreate = NULL
 * cdef void *__cuMipmappedArrayGetLevel = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMipmappedArrayDestroy = NULL
 * cdef void *__cuMemGetHandleForAddressRange = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayGetLevel = NULL;

  /* "cuda/_cuda/ccuda.pyx":160
 * cdef void *__cuMipmappedArrayCreate = NULL
 * cdef void *__cuMipmappedArrayGetLevel = NULL
 * cdef void *__cuMipmappedArrayDestroy = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemGetHandleForAddressRange = NULL
 * cdef void *__cuMemAddressReserve = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMipmappedArrayDestroy = NULL;

  /* "cuda/_cuda/ccuda.pyx":161
 * cdef void *__cuMipmappedArrayGetLevel = NULL
 * cdef void *__cuMipmappedArrayDestroy = NULL
 * cdef void *__cuMemGetHandleForAddressRange = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemAddressReserve = NULL
 * cdef void *__cuMemAddressFree = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemGetHandleForAddressRange = NULL;

  /* "cuda/_cuda/ccuda.pyx":162
 * cdef void *__cuMipmappedArrayDestroy = NULL
 * cdef void *__cuMemGetHandleForAddressRange = NULL
 * cdef void *__cuMemAddressReserve = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemAddressFree = NULL
 * cdef void *__cuMemCreate = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemAddressReserve = NULL;

  /* "cuda/_cuda/ccuda.pyx":163
 * cdef void *__cuMemGetHandleForAddressRange = NULL
 * cdef void *__cuMemAddressReserve = NULL
 * cdef void *__cuMemAddressFree = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemCreate = NULL
 * cdef void *__cuMemRelease = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemAddressFree = NULL;

  /* "cuda/_cuda/ccuda.pyx":164
 * cdef void *__cuMemAddressReserve = NULL
 * cdef void *__cuMemAddressFree = NULL
 * cdef void *__cuMemCreate = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemRelease = NULL
 * cdef void *__cuMemMap = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemCreate = NULL;

  /* "cuda/_cuda/ccuda.pyx":165
 * cdef void *__cuMemAddressFree = NULL
 * cdef void *__cuMemCreate = NULL
 * cdef void *__cuMemRelease = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemMap = NULL
 * cdef void *__cuMemMapArrayAsync = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemRelease = NULL;

  /* "cuda/_cuda/ccuda.pyx":166
 * cdef void *__cuMemCreate = NULL
 * cdef void *__cuMemRelease = NULL
 * cdef void *__cuMemMap = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemMapArrayAsync = NULL
 * cdef void *__cuMemUnmap = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemMap = NULL;

  /* "cuda/_cuda/ccuda.pyx":167
 * cdef void *__cuMemRelease = NULL
 * cdef void *__cuMemMap = NULL
 * cdef void *__cuMemMapArrayAsync = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemUnmap = NULL
 * cdef void *__cuMemSetAccess = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemMapArrayAsync = NULL;

  /* "cuda/_cuda/ccuda.pyx":168
 * cdef void *__cuMemMap = NULL
 * cdef void *__cuMemMapArrayAsync = NULL
 * cdef void *__cuMemUnmap = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemSetAccess = NULL
 * cdef void *__cuMemGetAccess = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemUnmap = NULL;

  /* "cuda/_cuda/ccuda.pyx":169
 * cdef void *__cuMemMapArrayAsync = NULL
 * cdef void *__cuMemUnmap = NULL
 * cdef void *__cuMemSetAccess = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemGetAccess = NULL
 * cdef void *__cuMemExportToShareableHandle = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemSetAccess = NULL;

  /* "cuda/_cuda/ccuda.pyx":170
 * cdef void *__cuMemUnmap = NULL
 * cdef void *__cuMemSetAccess = NULL
 * cdef void *__cuMemGetAccess = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemExportToShareableHandle = NULL
 * cdef void *__cuMemImportFromShareableHandle = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAccess = NULL;

  /* "cuda/_cuda/ccuda.pyx":171
 * cdef void *__cuMemSetAccess = NULL
 * cdef void *__cuMemGetAccess = NULL
 * cdef void *__cuMemExportToShareableHandle = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemImportFromShareableHandle = NULL
 * cdef void *__cuMemGetAllocationGranularity = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemExportToShareableHandle = NULL;

  /* "cuda/_cuda/ccuda.pyx":172
 * cdef void *__cuMemGetAccess = NULL
 * cdef void *__cuMemExportToShareableHandle = NULL
 * cdef void *__cuMemImportFromShareableHandle = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemGetAllocationGranularity = NULL
 * cdef void *__cuMemGetAllocationPropertiesFromHandle = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemImportFromShareableHandle = NULL;

  /* "cuda/_cuda/ccuda.pyx":173
 * cdef void *__cuMemExportToShareableHandle = NULL
 * cdef void *__cuMemImportFromShareableHandle = NULL
 * cdef void *__cuMemGetAllocationGranularity = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemGetAllocationPropertiesFromHandle = NULL
 * cdef void *__cuMemRetainAllocationHandle = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAllocationGranularity = NULL;

  /* "cuda/_cuda/ccuda.pyx":174
 * cdef void *__cuMemImportFromShareableHandle = NULL
 * cdef void *__cuMemGetAllocationGranularity = NULL
 * cdef void *__cuMemGetAllocationPropertiesFromHandle = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemRetainAllocationHandle = NULL
 * cdef void *__cuMemFreeAsync = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemGetAllocationPropertiesFromHandle = NULL;

  /* "cuda/_cuda/ccuda.pyx":175
 * cdef void *__cuMemGetAllocationGranularity = NULL
 * cdef void *__cuMemGetAllocationPropertiesFromHandle = NULL
 * cdef void *__cuMemRetainAllocationHandle = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemFreeAsync = NULL
 * cdef void *__cuMemAllocAsync = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemRetainAllocationHandle = NULL;

  /* "cuda/_cuda/ccuda.pyx":176
 * cdef void *__cuMemGetAllocationPropertiesFromHandle = NULL
 * cdef void *__cuMemRetainAllocationHandle = NULL
 * cdef void *__cuMemFreeAsync = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemAllocAsync = NULL
 * cdef void *__cuMemPoolTrimTo = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemFreeAsync = NULL;

  /* "cuda/_cuda/ccuda.pyx":177
 * cdef void *__cuMemRetainAllocationHandle = NULL
 * cdef void *__cuMemFreeAsync = NULL
 * cdef void *__cuMemAllocAsync = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemPoolTrimTo = NULL
 * cdef void *__cuMemPoolSetAttribute = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocAsync = NULL;

  /* "cuda/_cuda/ccuda.pyx":178
 * cdef void *__cuMemFreeAsync = NULL
 * cdef void *__cuMemAllocAsync = NULL
 * cdef void *__cuMemPoolTrimTo = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemPoolSetAttribute = NULL
 * cdef void *__cuMemPoolGetAttribute = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolTrimTo = NULL;

  /* "cuda/_cuda/ccuda.pyx":179
 * cdef void *__cuMemAllocAsync = NULL
 * cdef void *__cuMemPoolTrimTo = NULL
 * cdef void *__cuMemPoolSetAttribute = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemPoolGetAttribute = NULL
 * cdef void *__cuMemPoolSetAccess = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolSetAttribute = NULL;

  /* "cuda/_cuda/ccuda.pyx":180
 * cdef void *__cuMemPoolTrimTo = NULL
 * cdef void *__cuMemPoolSetAttribute = NULL
 * cdef void *__cuMemPoolGetAttribute = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemPoolSetAccess = NULL
 * cdef void *__cuMemPoolGetAccess = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolGetAttribute = NULL;

  /* "cuda/_cuda/ccuda.pyx":181
 * cdef void *__cuMemPoolSetAttribute = NULL
 * cdef void *__cuMemPoolGetAttribute = NULL
 * cdef void *__cuMemPoolSetAccess = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemPoolGetAccess = NULL
 * cdef void *__cuMemPoolCreate = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolSetAccess = NULL;

  /* "cuda/_cuda/ccuda.pyx":182
 * cdef void *__cuMemPoolGetAttribute = NULL
 * cdef void *__cuMemPoolSetAccess = NULL
 * cdef void *__cuMemPoolGetAccess = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemPoolCreate = NULL
 * cdef void *__cuMemPoolDestroy = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolGetAccess = NULL;

  /* "cuda/_cuda/ccuda.pyx":183
 * cdef void *__cuMemPoolSetAccess = NULL
 * cdef void *__cuMemPoolGetAccess = NULL
 * cdef void *__cuMemPoolCreate = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemPoolDestroy = NULL
 * cdef void *__cuMemAllocFromPoolAsync = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolCreate = NULL;

  /* "cuda/_cuda/ccuda.pyx":184
 * cdef void *__cuMemPoolGetAccess = NULL
 * cdef void *__cuMemPoolCreate = NULL
 * cdef void *__cuMemPoolDestroy = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemAllocFromPoolAsync = NULL
 * cdef void *__cuMemPoolExportToShareableHandle = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolDestroy = NULL;

  /* "cuda/_cuda/ccuda.pyx":185
 * cdef void *__cuMemPoolCreate = NULL
 * cdef void *__cuMemPoolDestroy = NULL
 * cdef void *__cuMemAllocFromPoolAsync = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemPoolExportToShareableHandle = NULL
 * cdef void *__cuMemPoolImportFromShareableHandle = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemAllocFromPoolAsync = NULL;

  /* "cuda/_cuda/ccuda.pyx":186
 * cdef void *__cuMemPoolDestroy = NULL
 * cdef void *__cuMemAllocFromPoolAsync = NULL
 * cdef void *__cuMemPoolExportToShareableHandle = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemPoolImportFromShareableHandle = NULL
 * cdef void *__cuMemPoolExportPointer = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolExportToShareableHandle = NULL;

  /* "cuda/_cuda/ccuda.pyx":187
 * cdef void *__cuMemAllocFromPoolAsync = NULL
 * cdef void *__cuMemPoolExportToShareableHandle = NULL
 * cdef void *__cuMemPoolImportFromShareableHandle = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemPoolExportPointer = NULL
 * cdef void *__cuMemPoolImportPointer = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolImportFromShareableHandle = NULL;

  /* "cuda/_cuda/ccuda.pyx":188
 * cdef void *__cuMemPoolExportToShareableHandle = NULL
 * cdef void *__cuMemPoolImportFromShareableHandle = NULL
 * cdef void *__cuMemPoolExportPointer = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemPoolImportPointer = NULL
 * cdef void *__cuMulticastCreate = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolExportPointer = NULL;

  /* "cuda/_cuda/ccuda.pyx":189
 * cdef void *__cuMemPoolImportFromShareableHandle = NULL
 * cdef void *__cuMemPoolExportPointer = NULL
 * cdef void *__cuMemPoolImportPointer = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMulticastCreate = NULL
 * cdef void *__cuMulticastAddDevice = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolImportPointer = NULL;

  /* "cuda/_cuda/ccuda.pyx":190
 * cdef void *__cuMemPoolExportPointer = NULL
 * cdef void *__cuMemPoolImportPointer = NULL
 * cdef void *__cuMulticastCreate = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMulticastAddDevice = NULL
 * cdef void *__cuMulticastBindMem = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMulticastCreate = NULL;

  /* "cuda/_cuda/ccuda.pyx":191
 * cdef void *__cuMemPoolImportPointer = NULL
 * cdef void *__cuMulticastCreate = NULL
 * cdef void *__cuMulticastAddDevice = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMulticastBindMem = NULL
 * cdef void *__cuMulticastBindAddr = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMulticastAddDevice = NULL;

  /* "cuda/_cuda/ccuda.pyx":192
 * cdef void *__cuMulticastCreate = NULL
 * cdef void *__cuMulticastAddDevice = NULL
 * cdef void *__cuMulticastBindMem = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMulticastBindAddr = NULL
 * cdef void *__cuMulticastUnbind = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMulticastBindMem = NULL;

  /* "cuda/_cuda/ccuda.pyx":193
 * cdef void *__cuMulticastAddDevice = NULL
 * cdef void *__cuMulticastBindMem = NULL
 * cdef void *__cuMulticastBindAddr = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMulticastUnbind = NULL
 * cdef void *__cuMulticastGetGranularity = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMulticastBindAddr = NULL;

  /* "cuda/_cuda/ccuda.pyx":194
 * cdef void *__cuMulticastBindMem = NULL
 * cdef void *__cuMulticastBindAddr = NULL
 * cdef void *__cuMulticastUnbind = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMulticastGetGranularity = NULL
 * cdef void *__cuPointerGetAttribute = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMulticastUnbind = NULL;

  /* "cuda/_cuda/ccuda.pyx":195
 * cdef void *__cuMulticastBindAddr = NULL
 * cdef void *__cuMulticastUnbind = NULL
 * cdef void *__cuMulticastGetGranularity = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuPointerGetAttribute = NULL
 * cdef void *__cuMemPrefetchAsync = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMulticastGetGranularity = NULL;

  /* "cuda/_cuda/ccuda.pyx":196
 * cdef void *__cuMulticastUnbind = NULL
 * cdef void *__cuMulticastGetGranularity = NULL
 * cdef void *__cuPointerGetAttribute = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemPrefetchAsync = NULL
 * cdef void *__cuMemPrefetchAsync_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuPointerGetAttribute = NULL;

  /* "cuda/_cuda/ccuda.pyx":197
 * cdef void *__cuMulticastGetGranularity = NULL
 * cdef void *__cuPointerGetAttribute = NULL
 * cdef void *__cuMemPrefetchAsync = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemPrefetchAsync_v2 = NULL
 * cdef void *__cuMemAdvise = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemPrefetchAsync = NULL;

  /* "cuda/_cuda/ccuda.pyx":198
 * cdef void *__cuPointerGetAttribute = NULL
 * cdef void *__cuMemPrefetchAsync = NULL
 * cdef void *__cuMemPrefetchAsync_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemAdvise = NULL
 * cdef void *__cuMemAdvise_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemPrefetchAsync_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":199
 * cdef void *__cuMemPrefetchAsync = NULL
 * cdef void *__cuMemPrefetchAsync_v2 = NULL
 * cdef void *__cuMemAdvise = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemAdvise_v2 = NULL
 * cdef void *__cuMemRangeGetAttribute = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemAdvise = NULL;

  /* "cuda/_cuda/ccuda.pyx":200
 * cdef void *__cuMemPrefetchAsync_v2 = NULL
 * cdef void *__cuMemAdvise = NULL
 * cdef void *__cuMemAdvise_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemRangeGetAttribute = NULL
 * cdef void *__cuMemRangeGetAttributes = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemAdvise_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":201
 * cdef void *__cuMemAdvise = NULL
 * cdef void *__cuMemAdvise_v2 = NULL
 * cdef void *__cuMemRangeGetAttribute = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemRangeGetAttributes = NULL
 * cdef void *__cuPointerSetAttribute = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemRangeGetAttribute = NULL;

  /* "cuda/_cuda/ccuda.pyx":202
 * cdef void *__cuMemAdvise_v2 = NULL
 * cdef void *__cuMemRangeGetAttribute = NULL
 * cdef void *__cuMemRangeGetAttributes = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuPointerSetAttribute = NULL
 * cdef void *__cuPointerGetAttributes = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemRangeGetAttributes = NULL;

  /* "cuda/_cuda/ccuda.pyx":203
 * cdef void *__cuMemRangeGetAttribute = NULL
 * cdef void *__cuMemRangeGetAttributes = NULL
 * cdef void *__cuPointerSetAttribute = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuPointerGetAttributes = NULL
 * cdef void *__cuStreamCreate = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuPointerSetAttribute = NULL;

  /* "cuda/_cuda/ccuda.pyx":204
 * cdef void *__cuMemRangeGetAttributes = NULL
 * cdef void *__cuPointerSetAttribute = NULL
 * cdef void *__cuPointerGetAttributes = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamCreate = NULL
 * cdef void *__cuStreamCreateWithPriority = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuPointerGetAttributes = NULL;

  /* "cuda/_cuda/ccuda.pyx":205
 * cdef void *__cuPointerSetAttribute = NULL
 * cdef void *__cuPointerGetAttributes = NULL
 * cdef void *__cuStreamCreate = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamCreateWithPriority = NULL
 * cdef void *__cuStreamGetPriority = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamCreate = NULL;

  /* "cuda/_cuda/ccuda.pyx":206
 * cdef void *__cuPointerGetAttributes = NULL
 * cdef void *__cuStreamCreate = NULL
 * cdef void *__cuStreamCreateWithPriority = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamGetPriority = NULL
 * cdef void *__cuStreamGetFlags = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamCreateWithPriority = NULL;

  /* "cuda/_cuda/ccuda.pyx":207
 * cdef void *__cuStreamCreate = NULL
 * cdef void *__cuStreamCreateWithPriority = NULL
 * cdef void *__cuStreamGetPriority = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamGetFlags = NULL
 * cdef void *__cuStreamGetId = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetPriority = NULL;

  /* "cuda/_cuda/ccuda.pyx":208
 * cdef void *__cuStreamCreateWithPriority = NULL
 * cdef void *__cuStreamGetPriority = NULL
 * cdef void *__cuStreamGetFlags = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamGetId = NULL
 * cdef void *__cuStreamGetCtx = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetFlags = NULL;

  /* "cuda/_cuda/ccuda.pyx":209
 * cdef void *__cuStreamGetPriority = NULL
 * cdef void *__cuStreamGetFlags = NULL
 * cdef void *__cuStreamGetId = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamGetCtx = NULL
 * cdef void *__cuStreamWaitEvent = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetId = NULL;

  /* "cuda/_cuda/ccuda.pyx":210
 * cdef void *__cuStreamGetFlags = NULL
 * cdef void *__cuStreamGetId = NULL
 * cdef void *__cuStreamGetCtx = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamWaitEvent = NULL
 * cdef void *__cuStreamAddCallback = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCtx = NULL;

  /* "cuda/_cuda/ccuda.pyx":211
 * cdef void *__cuStreamGetId = NULL
 * cdef void *__cuStreamGetCtx = NULL
 * cdef void *__cuStreamWaitEvent = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamAddCallback = NULL
 * cdef void *__cuStreamBeginCapture_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitEvent = NULL;

  /* "cuda/_cuda/ccuda.pyx":212
 * cdef void *__cuStreamGetCtx = NULL
 * cdef void *__cuStreamWaitEvent = NULL
 * cdef void *__cuStreamAddCallback = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamBeginCapture_v2 = NULL
 * cdef void *__cuThreadExchangeStreamCaptureMode = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamAddCallback = NULL;

  /* "cuda/_cuda/ccuda.pyx":213
 * cdef void *__cuStreamWaitEvent = NULL
 * cdef void *__cuStreamAddCallback = NULL
 * cdef void *__cuStreamBeginCapture_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuThreadExchangeStreamCaptureMode = NULL
 * cdef void *__cuStreamEndCapture = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamBeginCapture_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":214
 * cdef void *__cuStreamAddCallback = NULL
 * cdef void *__cuStreamBeginCapture_v2 = NULL
 * cdef void *__cuThreadExchangeStreamCaptureMode = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamEndCapture = NULL
 * cdef void *__cuStreamIsCapturing = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuThreadExchangeStreamCaptureMode = NULL;

  /* "cuda/_cuda/ccuda.pyx":215
 * cdef void *__cuStreamBeginCapture_v2 = NULL
 * cdef void *__cuThreadExchangeStreamCaptureMode = NULL
 * cdef void *__cuStreamEndCapture = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamIsCapturing = NULL
 * cdef void *__cuStreamGetCaptureInfo_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamEndCapture = NULL;

  /* "cuda/_cuda/ccuda.pyx":216
 * cdef void *__cuThreadExchangeStreamCaptureMode = NULL
 * cdef void *__cuStreamEndCapture = NULL
 * cdef void *__cuStreamIsCapturing = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamGetCaptureInfo_v2 = NULL
 * cdef void *__cuStreamUpdateCaptureDependencies = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamIsCapturing = NULL;

  /* "cuda/_cuda/ccuda.pyx":217
 * cdef void *__cuStreamEndCapture = NULL
 * cdef void *__cuStreamIsCapturing = NULL
 * cdef void *__cuStreamGetCaptureInfo_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamUpdateCaptureDependencies = NULL
 * cdef void *__cuStreamAttachMemAsync = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCaptureInfo_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":218
 * cdef void *__cuStreamIsCapturing = NULL
 * cdef void *__cuStreamGetCaptureInfo_v2 = NULL
 * cdef void *__cuStreamUpdateCaptureDependencies = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamAttachMemAsync = NULL
 * cdef void *__cuStreamQuery = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamUpdateCaptureDependencies = NULL;

  /* "cuda/_cuda/ccuda.pyx":219
 * cdef void *__cuStreamGetCaptureInfo_v2 = NULL
 * cdef void *__cuStreamUpdateCaptureDependencies = NULL
 * cdef void *__cuStreamAttachMemAsync = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamQuery = NULL
 * cdef void *__cuStreamSynchronize = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamAttachMemAsync = NULL;

  /* "cuda/_cuda/ccuda.pyx":220
 * cdef void *__cuStreamUpdateCaptureDependencies = NULL
 * cdef void *__cuStreamAttachMemAsync = NULL
 * cdef void *__cuStreamQuery = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamSynchronize = NULL
 * cdef void *__cuStreamDestroy_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamQuery = NULL;

  /* "cuda/_cuda/ccuda.pyx":221
 * cdef void *__cuStreamAttachMemAsync = NULL
 * cdef void *__cuStreamQuery = NULL
 * cdef void *__cuStreamSynchronize = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamDestroy_v2 = NULL
 * cdef void *__cuStreamCopyAttributes = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamSynchronize = NULL;

  /* "cuda/_cuda/ccuda.pyx":222
 * cdef void *__cuStreamQuery = NULL
 * cdef void *__cuStreamSynchronize = NULL
 * cdef void *__cuStreamDestroy_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamCopyAttributes = NULL
 * cdef void *__cuStreamGetAttribute = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamDestroy_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":223
 * cdef void *__cuStreamSynchronize = NULL
 * cdef void *__cuStreamDestroy_v2 = NULL
 * cdef void *__cuStreamCopyAttributes = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamGetAttribute = NULL
 * cdef void *__cuStreamSetAttribute = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamCopyAttributes = NULL;

  /* "cuda/_cuda/ccuda.pyx":224
 * cdef void *__cuStreamDestroy_v2 = NULL
 * cdef void *__cuStreamCopyAttributes = NULL
 * cdef void *__cuStreamGetAttribute = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamSetAttribute = NULL
 * cdef void *__cuEventCreate = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetAttribute = NULL;

  /* "cuda/_cuda/ccuda.pyx":225
 * cdef void *__cuStreamCopyAttributes = NULL
 * cdef void *__cuStreamGetAttribute = NULL
 * cdef void *__cuStreamSetAttribute = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuEventCreate = NULL
 * cdef void *__cuEventRecord = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamSetAttribute = NULL;

  /* "cuda/_cuda/ccuda.pyx":226
 * cdef void *__cuStreamGetAttribute = NULL
 * cdef void *__cuStreamSetAttribute = NULL
 * cdef void *__cuEventCreate = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuEventRecord = NULL
 * cdef void *__cuEventRecordWithFlags = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuEventCreate = NULL;

  /* "cuda/_cuda/ccuda.pyx":227
 * cdef void *__cuStreamSetAttribute = NULL
 * cdef void *__cuEventCreate = NULL
 * cdef void *__cuEventRecord = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuEventRecordWithFlags = NULL
 * cdef void *__cuEventQuery = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuEventRecord = NULL;

  /* "cuda/_cuda/ccuda.pyx":228
 * cdef void *__cuEventCreate = NULL
 * cdef void *__cuEventRecord = NULL
 * cdef void *__cuEventRecordWithFlags = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuEventQuery = NULL
 * cdef void *__cuEventSynchronize = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuEventRecordWithFlags = NULL;

  /* "cuda/_cuda/ccuda.pyx":229
 * cdef void *__cuEventRecord = NULL
 * cdef void *__cuEventRecordWithFlags = NULL
 * cdef void *__cuEventQuery = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuEventSynchronize = NULL
 * cdef void *__cuEventDestroy_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuEventQuery = NULL;

  /* "cuda/_cuda/ccuda.pyx":230
 * cdef void *__cuEventRecordWithFlags = NULL
 * cdef void *__cuEventQuery = NULL
 * cdef void *__cuEventSynchronize = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuEventDestroy_v2 = NULL
 * cdef void *__cuEventElapsedTime = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuEventSynchronize = NULL;

  /* "cuda/_cuda/ccuda.pyx":231
 * cdef void *__cuEventQuery = NULL
 * cdef void *__cuEventSynchronize = NULL
 * cdef void *__cuEventDestroy_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuEventElapsedTime = NULL
 * cdef void *__cuImportExternalMemory = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuEventDestroy_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":232
 * cdef void *__cuEventSynchronize = NULL
 * cdef void *__cuEventDestroy_v2 = NULL
 * cdef void *__cuEventElapsedTime = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuImportExternalMemory = NULL
 * cdef void *__cuExternalMemoryGetMappedBuffer = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuEventElapsedTime = NULL;

  /* "cuda/_cuda/ccuda.pyx":233
 * cdef void *__cuEventDestroy_v2 = NULL
 * cdef void *__cuEventElapsedTime = NULL
 * cdef void *__cuImportExternalMemory = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuExternalMemoryGetMappedBuffer = NULL
 * cdef void *__cuExternalMemoryGetMappedMipmappedArray = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuImportExternalMemory = NULL;

  /* "cuda/_cuda/ccuda.pyx":234
 * cdef void *__cuEventElapsedTime = NULL
 * cdef void *__cuImportExternalMemory = NULL
 * cdef void *__cuExternalMemoryGetMappedBuffer = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuExternalMemoryGetMappedMipmappedArray = NULL
 * cdef void *__cuDestroyExternalMemory = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuExternalMemoryGetMappedBuffer = NULL;

  /* "cuda/_cuda/ccuda.pyx":235
 * cdef void *__cuImportExternalMemory = NULL
 * cdef void *__cuExternalMemoryGetMappedBuffer = NULL
 * cdef void *__cuExternalMemoryGetMappedMipmappedArray = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDestroyExternalMemory = NULL
 * cdef void *__cuImportExternalSemaphore = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuExternalMemoryGetMappedMipmappedArray = NULL;

  /* "cuda/_cuda/ccuda.pyx":236
 * cdef void *__cuExternalMemoryGetMappedBuffer = NULL
 * cdef void *__cuExternalMemoryGetMappedMipmappedArray = NULL
 * cdef void *__cuDestroyExternalMemory = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuImportExternalSemaphore = NULL
 * cdef void *__cuSignalExternalSemaphoresAsync = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDestroyExternalMemory = NULL;

  /* "cuda/_cuda/ccuda.pyx":237
 * cdef void *__cuExternalMemoryGetMappedMipmappedArray = NULL
 * cdef void *__cuDestroyExternalMemory = NULL
 * cdef void *__cuImportExternalSemaphore = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuSignalExternalSemaphoresAsync = NULL
 * cdef void *__cuWaitExternalSemaphoresAsync = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuImportExternalSemaphore = NULL;

  /* "cuda/_cuda/ccuda.pyx":238
 * cdef void *__cuDestroyExternalMemory = NULL
 * cdef void *__cuImportExternalSemaphore = NULL
 * cdef void *__cuSignalExternalSemaphoresAsync = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuWaitExternalSemaphoresAsync = NULL
 * cdef void *__cuDestroyExternalSemaphore = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuSignalExternalSemaphoresAsync = NULL;

  /* "cuda/_cuda/ccuda.pyx":239
 * cdef void *__cuImportExternalSemaphore = NULL
 * cdef void *__cuSignalExternalSemaphoresAsync = NULL
 * cdef void *__cuWaitExternalSemaphoresAsync = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDestroyExternalSemaphore = NULL
 * cdef void *__cuStreamWaitValue32_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuWaitExternalSemaphoresAsync = NULL;

  /* "cuda/_cuda/ccuda.pyx":240
 * cdef void *__cuSignalExternalSemaphoresAsync = NULL
 * cdef void *__cuWaitExternalSemaphoresAsync = NULL
 * cdef void *__cuDestroyExternalSemaphore = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamWaitValue32_v2 = NULL
 * cdef void *__cuStreamWaitValue64_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDestroyExternalSemaphore = NULL;

  /* "cuda/_cuda/ccuda.pyx":241
 * cdef void *__cuWaitExternalSemaphoresAsync = NULL
 * cdef void *__cuDestroyExternalSemaphore = NULL
 * cdef void *__cuStreamWaitValue32_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamWaitValue64_v2 = NULL
 * cdef void *__cuStreamWriteValue32_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue32_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":242
 * cdef void *__cuDestroyExternalSemaphore = NULL
 * cdef void *__cuStreamWaitValue32_v2 = NULL
 * cdef void *__cuStreamWaitValue64_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamWriteValue32_v2 = NULL
 * cdef void *__cuStreamWriteValue64_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue64_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":243
 * cdef void *__cuStreamWaitValue32_v2 = NULL
 * cdef void *__cuStreamWaitValue64_v2 = NULL
 * cdef void *__cuStreamWriteValue32_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamWriteValue64_v2 = NULL
 * cdef void *__cuStreamBatchMemOp_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue32_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":244
 * cdef void *__cuStreamWaitValue64_v2 = NULL
 * cdef void *__cuStreamWriteValue32_v2 = NULL
 * cdef void *__cuStreamWriteValue64_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamBatchMemOp_v2 = NULL
 * cdef void *__cuFuncGetAttribute = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue64_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":245
 * cdef void *__cuStreamWriteValue32_v2 = NULL
 * cdef void *__cuStreamWriteValue64_v2 = NULL
 * cdef void *__cuStreamBatchMemOp_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuFuncGetAttribute = NULL
 * cdef void *__cuFuncSetAttribute = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamBatchMemOp_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":246
 * cdef void *__cuStreamWriteValue64_v2 = NULL
 * cdef void *__cuStreamBatchMemOp_v2 = NULL
 * cdef void *__cuFuncGetAttribute = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuFuncSetAttribute = NULL
 * cdef void *__cuFuncSetCacheConfig = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuFuncGetAttribute = NULL;

  /* "cuda/_cuda/ccuda.pyx":247
 * cdef void *__cuStreamBatchMemOp_v2 = NULL
 * cdef void *__cuFuncGetAttribute = NULL
 * cdef void *__cuFuncSetAttribute = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuFuncSetCacheConfig = NULL
 * cdef void *__cuFuncSetSharedMemConfig = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetAttribute = NULL;

  /* "cuda/_cuda/ccuda.pyx":248
 * cdef void *__cuFuncGetAttribute = NULL
 * cdef void *__cuFuncSetAttribute = NULL
 * cdef void *__cuFuncSetCacheConfig = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuFuncSetSharedMemConfig = NULL
 * cdef void *__cuFuncGetModule = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetCacheConfig = NULL;

  /* "cuda/_cuda/ccuda.pyx":249
 * cdef void *__cuFuncSetAttribute = NULL
 * cdef void *__cuFuncSetCacheConfig = NULL
 * cdef void *__cuFuncSetSharedMemConfig = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuFuncGetModule = NULL
 * cdef void *__cuLaunchKernel = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetSharedMemConfig = NULL;

  /* "cuda/_cuda/ccuda.pyx":250
 * cdef void *__cuFuncSetCacheConfig = NULL
 * cdef void *__cuFuncSetSharedMemConfig = NULL
 * cdef void *__cuFuncGetModule = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuLaunchKernel = NULL
 * cdef void *__cuLaunchKernelEx = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuFuncGetModule = NULL;

  /* "cuda/_cuda/ccuda.pyx":251
 * cdef void *__cuFuncSetSharedMemConfig = NULL
 * cdef void *__cuFuncGetModule = NULL
 * cdef void *__cuLaunchKernel = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuLaunchKernelEx = NULL
 * cdef void *__cuLaunchCooperativeKernel = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchKernel = NULL;

  /* "cuda/_cuda/ccuda.pyx":252
 * cdef void *__cuFuncGetModule = NULL
 * cdef void *__cuLaunchKernel = NULL
 * cdef void *__cuLaunchKernelEx = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuLaunchCooperativeKernel = NULL
 * cdef void *__cuLaunchCooperativeKernelMultiDevice = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchKernelEx = NULL;

  /* "cuda/_cuda/ccuda.pyx":253
 * cdef void *__cuLaunchKernel = NULL
 * cdef void *__cuLaunchKernelEx = NULL
 * cdef void *__cuLaunchCooperativeKernel = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuLaunchCooperativeKernelMultiDevice = NULL
 * cdef void *__cuLaunchHostFunc = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchCooperativeKernel = NULL;

  /* "cuda/_cuda/ccuda.pyx":254
 * cdef void *__cuLaunchKernelEx = NULL
 * cdef void *__cuLaunchCooperativeKernel = NULL
 * cdef void *__cuLaunchCooperativeKernelMultiDevice = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuLaunchHostFunc = NULL
 * cdef void *__cuFuncSetBlockShape = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchCooperativeKernelMultiDevice = NULL;

  /* "cuda/_cuda/ccuda.pyx":255
 * cdef void *__cuLaunchCooperativeKernel = NULL
 * cdef void *__cuLaunchCooperativeKernelMultiDevice = NULL
 * cdef void *__cuLaunchHostFunc = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuFuncSetBlockShape = NULL
 * cdef void *__cuFuncSetSharedSize = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchHostFunc = NULL;

  /* "cuda/_cuda/ccuda.pyx":256
 * cdef void *__cuLaunchCooperativeKernelMultiDevice = NULL
 * cdef void *__cuLaunchHostFunc = NULL
 * cdef void *__cuFuncSetBlockShape = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuFuncSetSharedSize = NULL
 * cdef void *__cuParamSetSize = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetBlockShape = NULL;

  /* "cuda/_cuda/ccuda.pyx":257
 * cdef void *__cuLaunchHostFunc = NULL
 * cdef void *__cuFuncSetBlockShape = NULL
 * cdef void *__cuFuncSetSharedSize = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuParamSetSize = NULL
 * cdef void *__cuParamSeti = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuFuncSetSharedSize = NULL;

  /* "cuda/_cuda/ccuda.pyx":258
 * cdef void *__cuFuncSetBlockShape = NULL
 * cdef void *__cuFuncSetSharedSize = NULL
 * cdef void *__cuParamSetSize = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuParamSeti = NULL
 * cdef void *__cuParamSetf = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuParamSetSize = NULL;

  /* "cuda/_cuda/ccuda.pyx":259
 * cdef void *__cuFuncSetSharedSize = NULL
 * cdef void *__cuParamSetSize = NULL
 * cdef void *__cuParamSeti = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuParamSetf = NULL
 * cdef void *__cuParamSetv = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuParamSeti = NULL;

  /* "cuda/_cuda/ccuda.pyx":260
 * cdef void *__cuParamSetSize = NULL
 * cdef void *__cuParamSeti = NULL
 * cdef void *__cuParamSetf = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuParamSetv = NULL
 * cdef void *__cuLaunch = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuParamSetf = NULL;

  /* "cuda/_cuda/ccuda.pyx":261
 * cdef void *__cuParamSeti = NULL
 * cdef void *__cuParamSetf = NULL
 * cdef void *__cuParamSetv = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuLaunch = NULL
 * cdef void *__cuLaunchGrid = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuParamSetv = NULL;

  /* "cuda/_cuda/ccuda.pyx":262
 * cdef void *__cuParamSetf = NULL
 * cdef void *__cuParamSetv = NULL
 * cdef void *__cuLaunch = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuLaunchGrid = NULL
 * cdef void *__cuLaunchGridAsync = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuLaunch = NULL;

  /* "cuda/_cuda/ccuda.pyx":263
 * cdef void *__cuParamSetv = NULL
 * cdef void *__cuLaunch = NULL
 * cdef void *__cuLaunchGrid = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuLaunchGridAsync = NULL
 * cdef void *__cuParamSetTexRef = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchGrid = NULL;

  /* "cuda/_cuda/ccuda.pyx":264
 * cdef void *__cuLaunch = NULL
 * cdef void *__cuLaunchGrid = NULL
 * cdef void *__cuLaunchGridAsync = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuParamSetTexRef = NULL
 * cdef void *__cuGraphCreate = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuLaunchGridAsync = NULL;

  /* "cuda/_cuda/ccuda.pyx":265
 * cdef void *__cuLaunchGrid = NULL
 * cdef void *__cuLaunchGridAsync = NULL
 * cdef void *__cuParamSetTexRef = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphCreate = NULL
 * cdef void *__cuGraphAddKernelNode_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuParamSetTexRef = NULL;

  /* "cuda/_cuda/ccuda.pyx":266
 * cdef void *__cuLaunchGridAsync = NULL
 * cdef void *__cuParamSetTexRef = NULL
 * cdef void *__cuGraphCreate = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphAddKernelNode_v2 = NULL
 * cdef void *__cuGraphKernelNodeGetParams_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphCreate = NULL;

  /* "cuda/_cuda/ccuda.pyx":267
 * cdef void *__cuParamSetTexRef = NULL
 * cdef void *__cuGraphCreate = NULL
 * cdef void *__cuGraphAddKernelNode_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphKernelNodeGetParams_v2 = NULL
 * cdef void *__cuGraphKernelNodeSetParams_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddKernelNode_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":268
 * cdef void *__cuGraphCreate = NULL
 * cdef void *__cuGraphAddKernelNode_v2 = NULL
 * cdef void *__cuGraphKernelNodeGetParams_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphKernelNodeSetParams_v2 = NULL
 * cdef void *__cuGraphAddMemcpyNode = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeGetParams_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":269
 * cdef void *__cuGraphAddKernelNode_v2 = NULL
 * cdef void *__cuGraphKernelNodeGetParams_v2 = NULL
 * cdef void *__cuGraphKernelNodeSetParams_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphAddMemcpyNode = NULL
 * cdef void *__cuGraphMemcpyNodeGetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeSetParams_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":270
 * cdef void *__cuGraphKernelNodeGetParams_v2 = NULL
 * cdef void *__cuGraphKernelNodeSetParams_v2 = NULL
 * cdef void *__cuGraphAddMemcpyNode = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphMemcpyNodeGetParams = NULL
 * cdef void *__cuGraphMemcpyNodeSetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemcpyNode = NULL;

  /* "cuda/_cuda/ccuda.pyx":271
 * cdef void *__cuGraphKernelNodeSetParams_v2 = NULL
 * cdef void *__cuGraphAddMemcpyNode = NULL
 * cdef void *__cuGraphMemcpyNodeGetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphMemcpyNodeSetParams = NULL
 * cdef void *__cuGraphAddMemsetNode = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemcpyNodeGetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":272
 * cdef void *__cuGraphAddMemcpyNode = NULL
 * cdef void *__cuGraphMemcpyNodeGetParams = NULL
 * cdef void *__cuGraphMemcpyNodeSetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphAddMemsetNode = NULL
 * cdef void *__cuGraphMemsetNodeGetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemcpyNodeSetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":273
 * cdef void *__cuGraphMemcpyNodeGetParams = NULL
 * cdef void *__cuGraphMemcpyNodeSetParams = NULL
 * cdef void *__cuGraphAddMemsetNode = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphMemsetNodeGetParams = NULL
 * cdef void *__cuGraphMemsetNodeSetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemsetNode = NULL;

  /* "cuda/_cuda/ccuda.pyx":274
 * cdef void *__cuGraphMemcpyNodeSetParams = NULL
 * cdef void *__cuGraphAddMemsetNode = NULL
 * cdef void *__cuGraphMemsetNodeGetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphMemsetNodeSetParams = NULL
 * cdef void *__cuGraphAddHostNode = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemsetNodeGetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":275
 * cdef void *__cuGraphAddMemsetNode = NULL
 * cdef void *__cuGraphMemsetNodeGetParams = NULL
 * cdef void *__cuGraphMemsetNodeSetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphAddHostNode = NULL
 * cdef void *__cuGraphHostNodeGetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemsetNodeSetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":276
 * cdef void *__cuGraphMemsetNodeGetParams = NULL
 * cdef void *__cuGraphMemsetNodeSetParams = NULL
 * cdef void *__cuGraphAddHostNode = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphHostNodeGetParams = NULL
 * cdef void *__cuGraphHostNodeSetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddHostNode = NULL;

  /* "cuda/_cuda/ccuda.pyx":277
 * cdef void *__cuGraphMemsetNodeSetParams = NULL
 * cdef void *__cuGraphAddHostNode = NULL
 * cdef void *__cuGraphHostNodeGetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphHostNodeSetParams = NULL
 * cdef void *__cuGraphAddChildGraphNode = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphHostNodeGetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":278
 * cdef void *__cuGraphAddHostNode = NULL
 * cdef void *__cuGraphHostNodeGetParams = NULL
 * cdef void *__cuGraphHostNodeSetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphAddChildGraphNode = NULL
 * cdef void *__cuGraphChildGraphNodeGetGraph = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphHostNodeSetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":279
 * cdef void *__cuGraphHostNodeGetParams = NULL
 * cdef void *__cuGraphHostNodeSetParams = NULL
 * cdef void *__cuGraphAddChildGraphNode = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphChildGraphNodeGetGraph = NULL
 * cdef void *__cuGraphAddEmptyNode = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddChildGraphNode = NULL;

  /* "cuda/_cuda/ccuda.pyx":280
 * cdef void *__cuGraphHostNodeSetParams = NULL
 * cdef void *__cuGraphAddChildGraphNode = NULL
 * cdef void *__cuGraphChildGraphNodeGetGraph = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphAddEmptyNode = NULL
 * cdef void *__cuGraphAddEventRecordNode = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphChildGraphNodeGetGraph = NULL;

  /* "cuda/_cuda/ccuda.pyx":281
 * cdef void *__cuGraphAddChildGraphNode = NULL
 * cdef void *__cuGraphChildGraphNodeGetGraph = NULL
 * cdef void *__cuGraphAddEmptyNode = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphAddEventRecordNode = NULL
 * cdef void *__cuGraphEventRecordNodeGetEvent = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddEmptyNode = NULL;

  /* "cuda/_cuda/ccuda.pyx":282
 * cdef void *__cuGraphChildGraphNodeGetGraph = NULL
 * cdef void *__cuGraphAddEmptyNode = NULL
 * cdef void *__cuGraphAddEventRecordNode = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphEventRecordNodeGetEvent = NULL
 * cdef void *__cuGraphEventRecordNodeSetEvent = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddEventRecordNode = NULL;

  /* "cuda/_cuda/ccuda.pyx":283
 * cdef void *__cuGraphAddEmptyNode = NULL
 * cdef void *__cuGraphAddEventRecordNode = NULL
 * cdef void *__cuGraphEventRecordNodeGetEvent = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphEventRecordNodeSetEvent = NULL
 * cdef void *__cuGraphAddEventWaitNode = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventRecordNodeGetEvent = NULL;

  /* "cuda/_cuda/ccuda.pyx":284
 * cdef void *__cuGraphAddEventRecordNode = NULL
 * cdef void *__cuGraphEventRecordNodeGetEvent = NULL
 * cdef void *__cuGraphEventRecordNodeSetEvent = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphAddEventWaitNode = NULL
 * cdef void *__cuGraphEventWaitNodeGetEvent = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventRecordNodeSetEvent = NULL;

  /* "cuda/_cuda/ccuda.pyx":285
 * cdef void *__cuGraphEventRecordNodeGetEvent = NULL
 * cdef void *__cuGraphEventRecordNodeSetEvent = NULL
 * cdef void *__cuGraphAddEventWaitNode = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphEventWaitNodeGetEvent = NULL
 * cdef void *__cuGraphEventWaitNodeSetEvent = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddEventWaitNode = NULL;

  /* "cuda/_cuda/ccuda.pyx":286
 * cdef void *__cuGraphEventRecordNodeSetEvent = NULL
 * cdef void *__cuGraphAddEventWaitNode = NULL
 * cdef void *__cuGraphEventWaitNodeGetEvent = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphEventWaitNodeSetEvent = NULL
 * cdef void *__cuGraphAddExternalSemaphoresSignalNode = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventWaitNodeGetEvent = NULL;

  /* "cuda/_cuda/ccuda.pyx":287
 * cdef void *__cuGraphAddEventWaitNode = NULL
 * cdef void *__cuGraphEventWaitNodeGetEvent = NULL
 * cdef void *__cuGraphEventWaitNodeSetEvent = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphAddExternalSemaphoresSignalNode = NULL
 * cdef void *__cuGraphExternalSemaphoresSignalNodeGetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphEventWaitNodeSetEvent = NULL;

  /* "cuda/_cuda/ccuda.pyx":288
 * cdef void *__cuGraphEventWaitNodeGetEvent = NULL
 * cdef void *__cuGraphEventWaitNodeSetEvent = NULL
 * cdef void *__cuGraphAddExternalSemaphoresSignalNode = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphExternalSemaphoresSignalNodeGetParams = NULL
 * cdef void *__cuGraphExternalSemaphoresSignalNodeSetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddExternalSemaphoresSignalNode = NULL;

  /* "cuda/_cuda/ccuda.pyx":289
 * cdef void *__cuGraphEventWaitNodeSetEvent = NULL
 * cdef void *__cuGraphAddExternalSemaphoresSignalNode = NULL
 * cdef void *__cuGraphExternalSemaphoresSignalNodeGetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphExternalSemaphoresSignalNodeSetParams = NULL
 * cdef void *__cuGraphAddExternalSemaphoresWaitNode = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresSignalNodeGetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":290
 * cdef void *__cuGraphAddExternalSemaphoresSignalNode = NULL
 * cdef void *__cuGraphExternalSemaphoresSignalNodeGetParams = NULL
 * cdef void *__cuGraphExternalSemaphoresSignalNodeSetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphAddExternalSemaphoresWaitNode = NULL
 * cdef void *__cuGraphExternalSemaphoresWaitNodeGetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresSignalNodeSetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":291
 * cdef void *__cuGraphExternalSemaphoresSignalNodeGetParams = NULL
 * cdef void *__cuGraphExternalSemaphoresSignalNodeSetParams = NULL
 * cdef void *__cuGraphAddExternalSemaphoresWaitNode = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphExternalSemaphoresWaitNodeGetParams = NULL
 * cdef void *__cuGraphExternalSemaphoresWaitNodeSetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddExternalSemaphoresWaitNode = NULL;

  /* "cuda/_cuda/ccuda.pyx":292
 * cdef void *__cuGraphExternalSemaphoresSignalNodeSetParams = NULL
 * cdef void *__cuGraphAddExternalSemaphoresWaitNode = NULL
 * cdef void *__cuGraphExternalSemaphoresWaitNodeGetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphExternalSemaphoresWaitNodeSetParams = NULL
 * cdef void *__cuGraphAddBatchMemOpNode = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresWaitNodeGetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":293
 * cdef void *__cuGraphAddExternalSemaphoresWaitNode = NULL
 * cdef void *__cuGraphExternalSemaphoresWaitNodeGetParams = NULL
 * cdef void *__cuGraphExternalSemaphoresWaitNodeSetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphAddBatchMemOpNode = NULL
 * cdef void *__cuGraphBatchMemOpNodeGetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExternalSemaphoresWaitNodeSetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":294
 * cdef void *__cuGraphExternalSemaphoresWaitNodeGetParams = NULL
 * cdef void *__cuGraphExternalSemaphoresWaitNodeSetParams = NULL
 * cdef void *__cuGraphAddBatchMemOpNode = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphBatchMemOpNodeGetParams = NULL
 * cdef void *__cuGraphBatchMemOpNodeSetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddBatchMemOpNode = NULL;

  /* "cuda/_cuda/ccuda.pyx":295
 * cdef void *__cuGraphExternalSemaphoresWaitNodeSetParams = NULL
 * cdef void *__cuGraphAddBatchMemOpNode = NULL
 * cdef void *__cuGraphBatchMemOpNodeGetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphBatchMemOpNodeSetParams = NULL
 * cdef void *__cuGraphExecBatchMemOpNodeSetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphBatchMemOpNodeGetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":296
 * cdef void *__cuGraphAddBatchMemOpNode = NULL
 * cdef void *__cuGraphBatchMemOpNodeGetParams = NULL
 * cdef void *__cuGraphBatchMemOpNodeSetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphExecBatchMemOpNodeSetParams = NULL
 * cdef void *__cuGraphAddMemAllocNode = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphBatchMemOpNodeSetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":297
 * cdef void *__cuGraphBatchMemOpNodeGetParams = NULL
 * cdef void *__cuGraphBatchMemOpNodeSetParams = NULL
 * cdef void *__cuGraphExecBatchMemOpNodeSetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphAddMemAllocNode = NULL
 * cdef void *__cuGraphMemAllocNodeGetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecBatchMemOpNodeSetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":298
 * cdef void *__cuGraphBatchMemOpNodeSetParams = NULL
 * cdef void *__cuGraphExecBatchMemOpNodeSetParams = NULL
 * cdef void *__cuGraphAddMemAllocNode = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphMemAllocNodeGetParams = NULL
 * cdef void *__cuGraphAddMemFreeNode = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemAllocNode = NULL;

  /* "cuda/_cuda/ccuda.pyx":299
 * cdef void *__cuGraphExecBatchMemOpNodeSetParams = NULL
 * cdef void *__cuGraphAddMemAllocNode = NULL
 * cdef void *__cuGraphMemAllocNodeGetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphAddMemFreeNode = NULL
 * cdef void *__cuGraphMemFreeNodeGetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemAllocNodeGetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":300
 * cdef void *__cuGraphAddMemAllocNode = NULL
 * cdef void *__cuGraphMemAllocNodeGetParams = NULL
 * cdef void *__cuGraphAddMemFreeNode = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphMemFreeNodeGetParams = NULL
 * cdef void *__cuDeviceGraphMemTrim = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddMemFreeNode = NULL;

  /* "cuda/_cuda/ccuda.pyx":301
 * cdef void *__cuGraphMemAllocNodeGetParams = NULL
 * cdef void *__cuGraphAddMemFreeNode = NULL
 * cdef void *__cuGraphMemFreeNodeGetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDeviceGraphMemTrim = NULL
 * cdef void *__cuDeviceGetGraphMemAttribute = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphMemFreeNodeGetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":302
 * cdef void *__cuGraphAddMemFreeNode = NULL
 * cdef void *__cuGraphMemFreeNodeGetParams = NULL
 * cdef void *__cuDeviceGraphMemTrim = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDeviceGetGraphMemAttribute = NULL
 * cdef void *__cuDeviceSetGraphMemAttribute = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGraphMemTrim = NULL;

  /* "cuda/_cuda/ccuda.pyx":303
 * cdef void *__cuGraphMemFreeNodeGetParams = NULL
 * cdef void *__cuDeviceGraphMemTrim = NULL
 * cdef void *__cuDeviceGetGraphMemAttribute = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDeviceSetGraphMemAttribute = NULL
 * cdef void *__cuGraphClone = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetGraphMemAttribute = NULL;

  /* "cuda/_cuda/ccuda.pyx":304
 * cdef void *__cuDeviceGraphMemTrim = NULL
 * cdef void *__cuDeviceGetGraphMemAttribute = NULL
 * cdef void *__cuDeviceSetGraphMemAttribute = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphClone = NULL
 * cdef void *__cuGraphNodeFindInClone = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceSetGraphMemAttribute = NULL;

  /* "cuda/_cuda/ccuda.pyx":305
 * cdef void *__cuDeviceGetGraphMemAttribute = NULL
 * cdef void *__cuDeviceSetGraphMemAttribute = NULL
 * cdef void *__cuGraphClone = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphNodeFindInClone = NULL
 * cdef void *__cuGraphNodeGetType = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphClone = NULL;

  /* "cuda/_cuda/ccuda.pyx":306
 * cdef void *__cuDeviceSetGraphMemAttribute = NULL
 * cdef void *__cuGraphClone = NULL
 * cdef void *__cuGraphNodeFindInClone = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphNodeGetType = NULL
 * cdef void *__cuGraphGetNodes = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeFindInClone = NULL;

  /* "cuda/_cuda/ccuda.pyx":307
 * cdef void *__cuGraphClone = NULL
 * cdef void *__cuGraphNodeFindInClone = NULL
 * cdef void *__cuGraphNodeGetType = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphGetNodes = NULL
 * cdef void *__cuGraphGetRootNodes = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetType = NULL;

  /* "cuda/_cuda/ccuda.pyx":308
 * cdef void *__cuGraphNodeFindInClone = NULL
 * cdef void *__cuGraphNodeGetType = NULL
 * cdef void *__cuGraphGetNodes = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphGetRootNodes = NULL
 * cdef void *__cuGraphGetEdges = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphGetNodes = NULL;

  /* "cuda/_cuda/ccuda.pyx":309
 * cdef void *__cuGraphNodeGetType = NULL
 * cdef void *__cuGraphGetNodes = NULL
 * cdef void *__cuGraphGetRootNodes = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphGetEdges = NULL
 * cdef void *__cuGraphNodeGetDependencies = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphGetRootNodes = NULL;

  /* "cuda/_cuda/ccuda.pyx":310
 * cdef void *__cuGraphGetNodes = NULL
 * cdef void *__cuGraphGetRootNodes = NULL
 * cdef void *__cuGraphGetEdges = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphNodeGetDependencies = NULL
 * cdef void *__cuGraphNodeGetDependentNodes = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphGetEdges = NULL;

  /* "cuda/_cuda/ccuda.pyx":311
 * cdef void *__cuGraphGetRootNodes = NULL
 * cdef void *__cuGraphGetEdges = NULL
 * cdef void *__cuGraphNodeGetDependencies = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphNodeGetDependentNodes = NULL
 * cdef void *__cuGraphAddDependencies = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetDependencies = NULL;

  /* "cuda/_cuda/ccuda.pyx":312
 * cdef void *__cuGraphGetEdges = NULL
 * cdef void *__cuGraphNodeGetDependencies = NULL
 * cdef void *__cuGraphNodeGetDependentNodes = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphAddDependencies = NULL
 * cdef void *__cuGraphRemoveDependencies = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetDependentNodes = NULL;

  /* "cuda/_cuda/ccuda.pyx":313
 * cdef void *__cuGraphNodeGetDependencies = NULL
 * cdef void *__cuGraphNodeGetDependentNodes = NULL
 * cdef void *__cuGraphAddDependencies = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphRemoveDependencies = NULL
 * cdef void *__cuGraphDestroyNode = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddDependencies = NULL;

  /* "cuda/_cuda/ccuda.pyx":314
 * cdef void *__cuGraphNodeGetDependentNodes = NULL
 * cdef void *__cuGraphAddDependencies = NULL
 * cdef void *__cuGraphRemoveDependencies = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphDestroyNode = NULL
 * cdef void *__cuGraphInstantiateWithFlags = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphRemoveDependencies = NULL;

  /* "cuda/_cuda/ccuda.pyx":315
 * cdef void *__cuGraphAddDependencies = NULL
 * cdef void *__cuGraphRemoveDependencies = NULL
 * cdef void *__cuGraphDestroyNode = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphInstantiateWithFlags = NULL
 * cdef void *__cuGraphInstantiateWithParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphDestroyNode = NULL;

  /* "cuda/_cuda/ccuda.pyx":316
 * cdef void *__cuGraphRemoveDependencies = NULL
 * cdef void *__cuGraphDestroyNode = NULL
 * cdef void *__cuGraphInstantiateWithFlags = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphInstantiateWithParams = NULL
 * cdef void *__cuGraphExecGetFlags = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphInstantiateWithFlags = NULL;

  /* "cuda/_cuda/ccuda.pyx":317
 * cdef void *__cuGraphDestroyNode = NULL
 * cdef void *__cuGraphInstantiateWithFlags = NULL
 * cdef void *__cuGraphInstantiateWithParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphExecGetFlags = NULL
 * cdef void *__cuGraphExecKernelNodeSetParams_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphInstantiateWithParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":318
 * cdef void *__cuGraphInstantiateWithFlags = NULL
 * cdef void *__cuGraphInstantiateWithParams = NULL
 * cdef void *__cuGraphExecGetFlags = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphExecKernelNodeSetParams_v2 = NULL
 * cdef void *__cuGraphExecMemcpyNodeSetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecGetFlags = NULL;

  /* "cuda/_cuda/ccuda.pyx":319
 * cdef void *__cuGraphInstantiateWithParams = NULL
 * cdef void *__cuGraphExecGetFlags = NULL
 * cdef void *__cuGraphExecKernelNodeSetParams_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphExecMemcpyNodeSetParams = NULL
 * cdef void *__cuGraphExecMemsetNodeSetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecKernelNodeSetParams_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":320
 * cdef void *__cuGraphExecGetFlags = NULL
 * cdef void *__cuGraphExecKernelNodeSetParams_v2 = NULL
 * cdef void *__cuGraphExecMemcpyNodeSetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphExecMemsetNodeSetParams = NULL
 * cdef void *__cuGraphExecHostNodeSetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecMemcpyNodeSetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":321
 * cdef void *__cuGraphExecKernelNodeSetParams_v2 = NULL
 * cdef void *__cuGraphExecMemcpyNodeSetParams = NULL
 * cdef void *__cuGraphExecMemsetNodeSetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphExecHostNodeSetParams = NULL
 * cdef void *__cuGraphExecChildGraphNodeSetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecMemsetNodeSetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":322
 * cdef void *__cuGraphExecMemcpyNodeSetParams = NULL
 * cdef void *__cuGraphExecMemsetNodeSetParams = NULL
 * cdef void *__cuGraphExecHostNodeSetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphExecChildGraphNodeSetParams = NULL
 * cdef void *__cuGraphExecEventRecordNodeSetEvent = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecHostNodeSetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":323
 * cdef void *__cuGraphExecMemsetNodeSetParams = NULL
 * cdef void *__cuGraphExecHostNodeSetParams = NULL
 * cdef void *__cuGraphExecChildGraphNodeSetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphExecEventRecordNodeSetEvent = NULL
 * cdef void *__cuGraphExecEventWaitNodeSetEvent = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecChildGraphNodeSetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":324
 * cdef void *__cuGraphExecHostNodeSetParams = NULL
 * cdef void *__cuGraphExecChildGraphNodeSetParams = NULL
 * cdef void *__cuGraphExecEventRecordNodeSetEvent = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphExecEventWaitNodeSetEvent = NULL
 * cdef void *__cuGraphExecExternalSemaphoresSignalNodeSetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecEventRecordNodeSetEvent = NULL;

  /* "cuda/_cuda/ccuda.pyx":325
 * cdef void *__cuGraphExecChildGraphNodeSetParams = NULL
 * cdef void *__cuGraphExecEventRecordNodeSetEvent = NULL
 * cdef void *__cuGraphExecEventWaitNodeSetEvent = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphExecExternalSemaphoresSignalNodeSetParams = NULL
 * cdef void *__cuGraphExecExternalSemaphoresWaitNodeSetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecEventWaitNodeSetEvent = NULL;

  /* "cuda/_cuda/ccuda.pyx":326
 * cdef void *__cuGraphExecEventRecordNodeSetEvent = NULL
 * cdef void *__cuGraphExecEventWaitNodeSetEvent = NULL
 * cdef void *__cuGraphExecExternalSemaphoresSignalNodeSetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphExecExternalSemaphoresWaitNodeSetParams = NULL
 * cdef void *__cuGraphNodeSetEnabled = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecExternalSemaphoresSignalNodeSetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":327
 * cdef void *__cuGraphExecEventWaitNodeSetEvent = NULL
 * cdef void *__cuGraphExecExternalSemaphoresSignalNodeSetParams = NULL
 * cdef void *__cuGraphExecExternalSemaphoresWaitNodeSetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphNodeSetEnabled = NULL
 * cdef void *__cuGraphNodeGetEnabled = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecExternalSemaphoresWaitNodeSetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":328
 * cdef void *__cuGraphExecExternalSemaphoresSignalNodeSetParams = NULL
 * cdef void *__cuGraphExecExternalSemaphoresWaitNodeSetParams = NULL
 * cdef void *__cuGraphNodeSetEnabled = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphNodeGetEnabled = NULL
 * cdef void *__cuGraphUpload = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeSetEnabled = NULL;

  /* "cuda/_cuda/ccuda.pyx":329
 * cdef void *__cuGraphExecExternalSemaphoresWaitNodeSetParams = NULL
 * cdef void *__cuGraphNodeSetEnabled = NULL
 * cdef void *__cuGraphNodeGetEnabled = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphUpload = NULL
 * cdef void *__cuGraphLaunch = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeGetEnabled = NULL;

  /* "cuda/_cuda/ccuda.pyx":330
 * cdef void *__cuGraphNodeSetEnabled = NULL
 * cdef void *__cuGraphNodeGetEnabled = NULL
 * cdef void *__cuGraphUpload = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphLaunch = NULL
 * cdef void *__cuGraphExecDestroy = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphUpload = NULL;

  /* "cuda/_cuda/ccuda.pyx":331
 * cdef void *__cuGraphNodeGetEnabled = NULL
 * cdef void *__cuGraphUpload = NULL
 * cdef void *__cuGraphLaunch = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphExecDestroy = NULL
 * cdef void *__cuGraphDestroy = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphLaunch = NULL;

  /* "cuda/_cuda/ccuda.pyx":332
 * cdef void *__cuGraphUpload = NULL
 * cdef void *__cuGraphLaunch = NULL
 * cdef void *__cuGraphExecDestroy = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphDestroy = NULL
 * cdef void *__cuGraphExecUpdate_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecDestroy = NULL;

  /* "cuda/_cuda/ccuda.pyx":333
 * cdef void *__cuGraphLaunch = NULL
 * cdef void *__cuGraphExecDestroy = NULL
 * cdef void *__cuGraphDestroy = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphExecUpdate_v2 = NULL
 * cdef void *__cuGraphKernelNodeCopyAttributes = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphDestroy = NULL;

  /* "cuda/_cuda/ccuda.pyx":334
 * cdef void *__cuGraphExecDestroy = NULL
 * cdef void *__cuGraphDestroy = NULL
 * cdef void *__cuGraphExecUpdate_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphKernelNodeCopyAttributes = NULL
 * cdef void *__cuGraphKernelNodeGetAttribute = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecUpdate_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":335
 * cdef void *__cuGraphDestroy = NULL
 * cdef void *__cuGraphExecUpdate_v2 = NULL
 * cdef void *__cuGraphKernelNodeCopyAttributes = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphKernelNodeGetAttribute = NULL
 * cdef void *__cuGraphKernelNodeSetAttribute = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeCopyAttributes = NULL;

  /* "cuda/_cuda/ccuda.pyx":336
 * cdef void *__cuGraphExecUpdate_v2 = NULL
 * cdef void *__cuGraphKernelNodeCopyAttributes = NULL
 * cdef void *__cuGraphKernelNodeGetAttribute = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphKernelNodeSetAttribute = NULL
 * cdef void *__cuGraphDebugDotPrint = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeGetAttribute = NULL;

  /* "cuda/_cuda/ccuda.pyx":337
 * cdef void *__cuGraphKernelNodeCopyAttributes = NULL
 * cdef void *__cuGraphKernelNodeGetAttribute = NULL
 * cdef void *__cuGraphKernelNodeSetAttribute = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphDebugDotPrint = NULL
 * cdef void *__cuUserObjectCreate = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeSetAttribute = NULL;

  /* "cuda/_cuda/ccuda.pyx":338
 * cdef void *__cuGraphKernelNodeGetAttribute = NULL
 * cdef void *__cuGraphKernelNodeSetAttribute = NULL
 * cdef void *__cuGraphDebugDotPrint = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuUserObjectCreate = NULL
 * cdef void *__cuUserObjectRetain = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphDebugDotPrint = NULL;

  /* "cuda/_cuda/ccuda.pyx":339
 * cdef void *__cuGraphKernelNodeSetAttribute = NULL
 * cdef void *__cuGraphDebugDotPrint = NULL
 * cdef void *__cuUserObjectCreate = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuUserObjectRetain = NULL
 * cdef void *__cuUserObjectRelease = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuUserObjectCreate = NULL;

  /* "cuda/_cuda/ccuda.pyx":340
 * cdef void *__cuGraphDebugDotPrint = NULL
 * cdef void *__cuUserObjectCreate = NULL
 * cdef void *__cuUserObjectRetain = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuUserObjectRelease = NULL
 * cdef void *__cuGraphRetainUserObject = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuUserObjectRetain = NULL;

  /* "cuda/_cuda/ccuda.pyx":341
 * cdef void *__cuUserObjectCreate = NULL
 * cdef void *__cuUserObjectRetain = NULL
 * cdef void *__cuUserObjectRelease = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphRetainUserObject = NULL
 * cdef void *__cuGraphReleaseUserObject = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuUserObjectRelease = NULL;

  /* "cuda/_cuda/ccuda.pyx":342
 * cdef void *__cuUserObjectRetain = NULL
 * cdef void *__cuUserObjectRelease = NULL
 * cdef void *__cuGraphRetainUserObject = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphReleaseUserObject = NULL
 * cdef void *__cuGraphAddNode = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphRetainUserObject = NULL;

  /* "cuda/_cuda/ccuda.pyx":343
 * cdef void *__cuUserObjectRelease = NULL
 * cdef void *__cuGraphRetainUserObject = NULL
 * cdef void *__cuGraphReleaseUserObject = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphAddNode = NULL
 * cdef void *__cuGraphNodeSetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphReleaseUserObject = NULL;

  /* "cuda/_cuda/ccuda.pyx":344
 * cdef void *__cuGraphRetainUserObject = NULL
 * cdef void *__cuGraphReleaseUserObject = NULL
 * cdef void *__cuGraphAddNode = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphNodeSetParams = NULL
 * cdef void *__cuGraphExecNodeSetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddNode = NULL;

  /* "cuda/_cuda/ccuda.pyx":345
 * cdef void *__cuGraphReleaseUserObject = NULL
 * cdef void *__cuGraphAddNode = NULL
 * cdef void *__cuGraphNodeSetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphExecNodeSetParams = NULL
 * cdef void *__cuOccupancyMaxActiveBlocksPerMultiprocessor = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphNodeSetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":346
 * cdef void *__cuGraphAddNode = NULL
 * cdef void *__cuGraphNodeSetParams = NULL
 * cdef void *__cuGraphExecNodeSetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuOccupancyMaxActiveBlocksPerMultiprocessor = NULL
 * cdef void *__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecNodeSetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":347
 * cdef void *__cuGraphNodeSetParams = NULL
 * cdef void *__cuGraphExecNodeSetParams = NULL
 * cdef void *__cuOccupancyMaxActiveBlocksPerMultiprocessor = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = NULL
 * cdef void *__cuOccupancyMaxPotentialBlockSize = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxActiveBlocksPerMultiprocessor = NULL;

  /* "cuda/_cuda/ccuda.pyx":348
 * cdef void *__cuGraphExecNodeSetParams = NULL
 * cdef void *__cuOccupancyMaxActiveBlocksPerMultiprocessor = NULL
 * cdef void *__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuOccupancyMaxPotentialBlockSize = NULL
 * cdef void *__cuOccupancyMaxPotentialBlockSizeWithFlags = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = NULL;

  /* "cuda/_cuda/ccuda.pyx":349
 * cdef void *__cuOccupancyMaxActiveBlocksPerMultiprocessor = NULL
 * cdef void *__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = NULL
 * cdef void *__cuOccupancyMaxPotentialBlockSize = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuOccupancyMaxPotentialBlockSizeWithFlags = NULL
 * cdef void *__cuOccupancyAvailableDynamicSMemPerBlock = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxPotentialBlockSize = NULL;

  /* "cuda/_cuda/ccuda.pyx":350
 * cdef void *__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = NULL
 * cdef void *__cuOccupancyMaxPotentialBlockSize = NULL
 * cdef void *__cuOccupancyMaxPotentialBlockSizeWithFlags = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuOccupancyAvailableDynamicSMemPerBlock = NULL
 * cdef void *__cuOccupancyMaxPotentialClusterSize = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxPotentialBlockSizeWithFlags = NULL;

  /* "cuda/_cuda/ccuda.pyx":351
 * cdef void *__cuOccupancyMaxPotentialBlockSize = NULL
 * cdef void *__cuOccupancyMaxPotentialBlockSizeWithFlags = NULL
 * cdef void *__cuOccupancyAvailableDynamicSMemPerBlock = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuOccupancyMaxPotentialClusterSize = NULL
 * cdef void *__cuOccupancyMaxActiveClusters = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyAvailableDynamicSMemPerBlock = NULL;

  /* "cuda/_cuda/ccuda.pyx":352
 * cdef void *__cuOccupancyMaxPotentialBlockSizeWithFlags = NULL
 * cdef void *__cuOccupancyAvailableDynamicSMemPerBlock = NULL
 * cdef void *__cuOccupancyMaxPotentialClusterSize = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuOccupancyMaxActiveClusters = NULL
 * cdef void *__cuTexRefSetArray = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxPotentialClusterSize = NULL;

  /* "cuda/_cuda/ccuda.pyx":353
 * cdef void *__cuOccupancyAvailableDynamicSMemPerBlock = NULL
 * cdef void *__cuOccupancyMaxPotentialClusterSize = NULL
 * cdef void *__cuOccupancyMaxActiveClusters = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexRefSetArray = NULL
 * cdef void *__cuTexRefSetMipmappedArray = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuOccupancyMaxActiveClusters = NULL;

  /* "cuda/_cuda/ccuda.pyx":354
 * cdef void *__cuOccupancyMaxPotentialClusterSize = NULL
 * cdef void *__cuOccupancyMaxActiveClusters = NULL
 * cdef void *__cuTexRefSetArray = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexRefSetMipmappedArray = NULL
 * cdef void *__cuTexRefSetAddress_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetArray = NULL;

  /* "cuda/_cuda/ccuda.pyx":355
 * cdef void *__cuOccupancyMaxActiveClusters = NULL
 * cdef void *__cuTexRefSetArray = NULL
 * cdef void *__cuTexRefSetMipmappedArray = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexRefSetAddress_v2 = NULL
 * cdef void *__cuTexRefSetAddress2D_v3 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmappedArray = NULL;

  /* "cuda/_cuda/ccuda.pyx":356
 * cdef void *__cuTexRefSetArray = NULL
 * cdef void *__cuTexRefSetMipmappedArray = NULL
 * cdef void *__cuTexRefSetAddress_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexRefSetAddress2D_v3 = NULL
 * cdef void *__cuTexRefSetFormat = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetAddress_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":357
 * cdef void *__cuTexRefSetMipmappedArray = NULL
 * cdef void *__cuTexRefSetAddress_v2 = NULL
 * cdef void *__cuTexRefSetAddress2D_v3 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexRefSetFormat = NULL
 * cdef void *__cuTexRefSetAddressMode = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetAddress2D_v3 = NULL;

  /* "cuda/_cuda/ccuda.pyx":358
 * cdef void *__cuTexRefSetAddress_v2 = NULL
 * cdef void *__cuTexRefSetAddress2D_v3 = NULL
 * cdef void *__cuTexRefSetFormat = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexRefSetAddressMode = NULL
 * cdef void *__cuTexRefSetFilterMode = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFormat = NULL;

  /* "cuda/_cuda/ccuda.pyx":359
 * cdef void *__cuTexRefSetAddress2D_v3 = NULL
 * cdef void *__cuTexRefSetFormat = NULL
 * cdef void *__cuTexRefSetAddressMode = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexRefSetFilterMode = NULL
 * cdef void *__cuTexRefSetMipmapFilterMode = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetAddressMode = NULL;

  /* "cuda/_cuda/ccuda.pyx":360
 * cdef void *__cuTexRefSetFormat = NULL
 * cdef void *__cuTexRefSetAddressMode = NULL
 * cdef void *__cuTexRefSetFilterMode = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexRefSetMipmapFilterMode = NULL
 * cdef void *__cuTexRefSetMipmapLevelBias = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFilterMode = NULL;

  /* "cuda/_cuda/ccuda.pyx":361
 * cdef void *__cuTexRefSetAddressMode = NULL
 * cdef void *__cuTexRefSetFilterMode = NULL
 * cdef void *__cuTexRefSetMipmapFilterMode = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexRefSetMipmapLevelBias = NULL
 * cdef void *__cuTexRefSetMipmapLevelClamp = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapFilterMode = NULL;

  /* "cuda/_cuda/ccuda.pyx":362
 * cdef void *__cuTexRefSetFilterMode = NULL
 * cdef void *__cuTexRefSetMipmapFilterMode = NULL
 * cdef void *__cuTexRefSetMipmapLevelBias = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexRefSetMipmapLevelClamp = NULL
 * cdef void *__cuTexRefSetMaxAnisotropy = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapLevelBias = NULL;

  /* "cuda/_cuda/ccuda.pyx":363
 * cdef void *__cuTexRefSetMipmapFilterMode = NULL
 * cdef void *__cuTexRefSetMipmapLevelBias = NULL
 * cdef void *__cuTexRefSetMipmapLevelClamp = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexRefSetMaxAnisotropy = NULL
 * cdef void *__cuTexRefSetBorderColor = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMipmapLevelClamp = NULL;

  /* "cuda/_cuda/ccuda.pyx":364
 * cdef void *__cuTexRefSetMipmapLevelBias = NULL
 * cdef void *__cuTexRefSetMipmapLevelClamp = NULL
 * cdef void *__cuTexRefSetMaxAnisotropy = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexRefSetBorderColor = NULL
 * cdef void *__cuTexRefSetFlags = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetMaxAnisotropy = NULL;

  /* "cuda/_cuda/ccuda.pyx":365
 * cdef void *__cuTexRefSetMipmapLevelClamp = NULL
 * cdef void *__cuTexRefSetMaxAnisotropy = NULL
 * cdef void *__cuTexRefSetBorderColor = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexRefSetFlags = NULL
 * cdef void *__cuTexRefGetAddress_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetBorderColor = NULL;

  /* "cuda/_cuda/ccuda.pyx":366
 * cdef void *__cuTexRefSetMaxAnisotropy = NULL
 * cdef void *__cuTexRefSetBorderColor = NULL
 * cdef void *__cuTexRefSetFlags = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexRefGetAddress_v2 = NULL
 * cdef void *__cuTexRefGetArray = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefSetFlags = NULL;

  /* "cuda/_cuda/ccuda.pyx":367
 * cdef void *__cuTexRefSetBorderColor = NULL
 * cdef void *__cuTexRefSetFlags = NULL
 * cdef void *__cuTexRefGetAddress_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexRefGetArray = NULL
 * cdef void *__cuTexRefGetMipmappedArray = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetAddress_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":368
 * cdef void *__cuTexRefSetFlags = NULL
 * cdef void *__cuTexRefGetAddress_v2 = NULL
 * cdef void *__cuTexRefGetArray = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexRefGetMipmappedArray = NULL
 * cdef void *__cuTexRefGetAddressMode = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetArray = NULL;

  /* "cuda/_cuda/ccuda.pyx":369
 * cdef void *__cuTexRefGetAddress_v2 = NULL
 * cdef void *__cuTexRefGetArray = NULL
 * cdef void *__cuTexRefGetMipmappedArray = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexRefGetAddressMode = NULL
 * cdef void *__cuTexRefGetFilterMode = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmappedArray = NULL;

  /* "cuda/_cuda/ccuda.pyx":370
 * cdef void *__cuTexRefGetArray = NULL
 * cdef void *__cuTexRefGetMipmappedArray = NULL
 * cdef void *__cuTexRefGetAddressMode = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexRefGetFilterMode = NULL
 * cdef void *__cuTexRefGetFormat = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetAddressMode = NULL;

  /* "cuda/_cuda/ccuda.pyx":371
 * cdef void *__cuTexRefGetMipmappedArray = NULL
 * cdef void *__cuTexRefGetAddressMode = NULL
 * cdef void *__cuTexRefGetFilterMode = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexRefGetFormat = NULL
 * cdef void *__cuTexRefGetMipmapFilterMode = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFilterMode = NULL;

  /* "cuda/_cuda/ccuda.pyx":372
 * cdef void *__cuTexRefGetAddressMode = NULL
 * cdef void *__cuTexRefGetFilterMode = NULL
 * cdef void *__cuTexRefGetFormat = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexRefGetMipmapFilterMode = NULL
 * cdef void *__cuTexRefGetMipmapLevelBias = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFormat = NULL;

  /* "cuda/_cuda/ccuda.pyx":373
 * cdef void *__cuTexRefGetFilterMode = NULL
 * cdef void *__cuTexRefGetFormat = NULL
 * cdef void *__cuTexRefGetMipmapFilterMode = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexRefGetMipmapLevelBias = NULL
 * cdef void *__cuTexRefGetMipmapLevelClamp = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapFilterMode = NULL;

  /* "cuda/_cuda/ccuda.pyx":374
 * cdef void *__cuTexRefGetFormat = NULL
 * cdef void *__cuTexRefGetMipmapFilterMode = NULL
 * cdef void *__cuTexRefGetMipmapLevelBias = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexRefGetMipmapLevelClamp = NULL
 * cdef void *__cuTexRefGetMaxAnisotropy = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapLevelBias = NULL;

  /* "cuda/_cuda/ccuda.pyx":375
 * cdef void *__cuTexRefGetMipmapFilterMode = NULL
 * cdef void *__cuTexRefGetMipmapLevelBias = NULL
 * cdef void *__cuTexRefGetMipmapLevelClamp = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexRefGetMaxAnisotropy = NULL
 * cdef void *__cuTexRefGetBorderColor = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMipmapLevelClamp = NULL;

  /* "cuda/_cuda/ccuda.pyx":376
 * cdef void *__cuTexRefGetMipmapLevelBias = NULL
 * cdef void *__cuTexRefGetMipmapLevelClamp = NULL
 * cdef void *__cuTexRefGetMaxAnisotropy = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexRefGetBorderColor = NULL
 * cdef void *__cuTexRefGetFlags = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetMaxAnisotropy = NULL;

  /* "cuda/_cuda/ccuda.pyx":377
 * cdef void *__cuTexRefGetMipmapLevelClamp = NULL
 * cdef void *__cuTexRefGetMaxAnisotropy = NULL
 * cdef void *__cuTexRefGetBorderColor = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexRefGetFlags = NULL
 * cdef void *__cuTexRefCreate = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetBorderColor = NULL;

  /* "cuda/_cuda/ccuda.pyx":378
 * cdef void *__cuTexRefGetMaxAnisotropy = NULL
 * cdef void *__cuTexRefGetBorderColor = NULL
 * cdef void *__cuTexRefGetFlags = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexRefCreate = NULL
 * cdef void *__cuTexRefDestroy = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefGetFlags = NULL;

  /* "cuda/_cuda/ccuda.pyx":379
 * cdef void *__cuTexRefGetBorderColor = NULL
 * cdef void *__cuTexRefGetFlags = NULL
 * cdef void *__cuTexRefCreate = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexRefDestroy = NULL
 * cdef void *__cuSurfRefSetArray = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefCreate = NULL;

  /* "cuda/_cuda/ccuda.pyx":380
 * cdef void *__cuTexRefGetFlags = NULL
 * cdef void *__cuTexRefCreate = NULL
 * cdef void *__cuTexRefDestroy = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuSurfRefSetArray = NULL
 * cdef void *__cuSurfRefGetArray = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexRefDestroy = NULL;

  /* "cuda/_cuda/ccuda.pyx":381
 * cdef void *__cuTexRefCreate = NULL
 * cdef void *__cuTexRefDestroy = NULL
 * cdef void *__cuSurfRefSetArray = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuSurfRefGetArray = NULL
 * cdef void *__cuTexObjectCreate = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuSurfRefSetArray = NULL;

  /* "cuda/_cuda/ccuda.pyx":382
 * cdef void *__cuTexRefDestroy = NULL
 * cdef void *__cuSurfRefSetArray = NULL
 * cdef void *__cuSurfRefGetArray = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexObjectCreate = NULL
 * cdef void *__cuTexObjectDestroy = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuSurfRefGetArray = NULL;

  /* "cuda/_cuda/ccuda.pyx":383
 * cdef void *__cuSurfRefSetArray = NULL
 * cdef void *__cuSurfRefGetArray = NULL
 * cdef void *__cuTexObjectCreate = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexObjectDestroy = NULL
 * cdef void *__cuTexObjectGetResourceDesc = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectCreate = NULL;

  /* "cuda/_cuda/ccuda.pyx":384
 * cdef void *__cuSurfRefGetArray = NULL
 * cdef void *__cuTexObjectCreate = NULL
 * cdef void *__cuTexObjectDestroy = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexObjectGetResourceDesc = NULL
 * cdef void *__cuTexObjectGetTextureDesc = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectDestroy = NULL;

  /* "cuda/_cuda/ccuda.pyx":385
 * cdef void *__cuTexObjectCreate = NULL
 * cdef void *__cuTexObjectDestroy = NULL
 * cdef void *__cuTexObjectGetResourceDesc = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexObjectGetTextureDesc = NULL
 * cdef void *__cuTexObjectGetResourceViewDesc = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetResourceDesc = NULL;

  /* "cuda/_cuda/ccuda.pyx":386
 * cdef void *__cuTexObjectDestroy = NULL
 * cdef void *__cuTexObjectGetResourceDesc = NULL
 * cdef void *__cuTexObjectGetTextureDesc = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTexObjectGetResourceViewDesc = NULL
 * cdef void *__cuSurfObjectCreate = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetTextureDesc = NULL;

  /* "cuda/_cuda/ccuda.pyx":387
 * cdef void *__cuTexObjectGetResourceDesc = NULL
 * cdef void *__cuTexObjectGetTextureDesc = NULL
 * cdef void *__cuTexObjectGetResourceViewDesc = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuSurfObjectCreate = NULL
 * cdef void *__cuSurfObjectDestroy = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTexObjectGetResourceViewDesc = NULL;

  /* "cuda/_cuda/ccuda.pyx":388
 * cdef void *__cuTexObjectGetTextureDesc = NULL
 * cdef void *__cuTexObjectGetResourceViewDesc = NULL
 * cdef void *__cuSurfObjectCreate = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuSurfObjectDestroy = NULL
 * cdef void *__cuSurfObjectGetResourceDesc = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectCreate = NULL;

  /* "cuda/_cuda/ccuda.pyx":389
 * cdef void *__cuTexObjectGetResourceViewDesc = NULL
 * cdef void *__cuSurfObjectCreate = NULL
 * cdef void *__cuSurfObjectDestroy = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuSurfObjectGetResourceDesc = NULL
 * cdef void *__cuTensorMapEncodeTiled = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectDestroy = NULL;

  /* "cuda/_cuda/ccuda.pyx":390
 * cdef void *__cuSurfObjectCreate = NULL
 * cdef void *__cuSurfObjectDestroy = NULL
 * cdef void *__cuSurfObjectGetResourceDesc = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTensorMapEncodeTiled = NULL
 * cdef void *__cuTensorMapEncodeIm2col = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectGetResourceDesc = NULL;

  /* "cuda/_cuda/ccuda.pyx":391
 * cdef void *__cuSurfObjectDestroy = NULL
 * cdef void *__cuSurfObjectGetResourceDesc = NULL
 * cdef void *__cuTensorMapEncodeTiled = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTensorMapEncodeIm2col = NULL
 * cdef void *__cuTensorMapReplaceAddress = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTensorMapEncodeTiled = NULL;

  /* "cuda/_cuda/ccuda.pyx":392
 * cdef void *__cuSurfObjectGetResourceDesc = NULL
 * cdef void *__cuTensorMapEncodeTiled = NULL
 * cdef void *__cuTensorMapEncodeIm2col = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuTensorMapReplaceAddress = NULL
 * cdef void *__cuDeviceCanAccessPeer = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTensorMapEncodeIm2col = NULL;

  /* "cuda/_cuda/ccuda.pyx":393
 * cdef void *__cuTensorMapEncodeTiled = NULL
 * cdef void *__cuTensorMapEncodeIm2col = NULL
 * cdef void *__cuTensorMapReplaceAddress = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDeviceCanAccessPeer = NULL
 * cdef void *__cuCtxEnablePeerAccess = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuTensorMapReplaceAddress = NULL;

  /* "cuda/_cuda/ccuda.pyx":394
 * cdef void *__cuTensorMapEncodeIm2col = NULL
 * cdef void *__cuTensorMapReplaceAddress = NULL
 * cdef void *__cuDeviceCanAccessPeer = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxEnablePeerAccess = NULL
 * cdef void *__cuCtxDisablePeerAccess = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceCanAccessPeer = NULL;

  /* "cuda/_cuda/ccuda.pyx":395
 * cdef void *__cuTensorMapReplaceAddress = NULL
 * cdef void *__cuDeviceCanAccessPeer = NULL
 * cdef void *__cuCtxEnablePeerAccess = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxDisablePeerAccess = NULL
 * cdef void *__cuDeviceGetP2PAttribute = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxEnablePeerAccess = NULL;

  /* "cuda/_cuda/ccuda.pyx":396
 * cdef void *__cuDeviceCanAccessPeer = NULL
 * cdef void *__cuCtxEnablePeerAccess = NULL
 * cdef void *__cuCtxDisablePeerAccess = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDeviceGetP2PAttribute = NULL
 * cdef void *__cuGraphicsUnregisterResource = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxDisablePeerAccess = NULL;

  /* "cuda/_cuda/ccuda.pyx":397
 * cdef void *__cuCtxEnablePeerAccess = NULL
 * cdef void *__cuCtxDisablePeerAccess = NULL
 * cdef void *__cuDeviceGetP2PAttribute = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphicsUnregisterResource = NULL
 * cdef void *__cuGraphicsSubResourceGetMappedArray = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetP2PAttribute = NULL;

  /* "cuda/_cuda/ccuda.pyx":398
 * cdef void *__cuCtxDisablePeerAccess = NULL
 * cdef void *__cuDeviceGetP2PAttribute = NULL
 * cdef void *__cuGraphicsUnregisterResource = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphicsSubResourceGetMappedArray = NULL
 * cdef void *__cuGraphicsResourceGetMappedMipmappedArray = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsUnregisterResource = NULL;

  /* "cuda/_cuda/ccuda.pyx":399
 * cdef void *__cuDeviceGetP2PAttribute = NULL
 * cdef void *__cuGraphicsUnregisterResource = NULL
 * cdef void *__cuGraphicsSubResourceGetMappedArray = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphicsResourceGetMappedMipmappedArray = NULL
 * cdef void *__cuGraphicsResourceGetMappedPointer_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsSubResourceGetMappedArray = NULL;

  /* "cuda/_cuda/ccuda.pyx":400
 * cdef void *__cuGraphicsUnregisterResource = NULL
 * cdef void *__cuGraphicsSubResourceGetMappedArray = NULL
 * cdef void *__cuGraphicsResourceGetMappedMipmappedArray = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphicsResourceGetMappedPointer_v2 = NULL
 * cdef void *__cuGraphicsResourceSetMapFlags_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceGetMappedMipmappedArray = NULL;

  /* "cuda/_cuda/ccuda.pyx":401
 * cdef void *__cuGraphicsSubResourceGetMappedArray = NULL
 * cdef void *__cuGraphicsResourceGetMappedMipmappedArray = NULL
 * cdef void *__cuGraphicsResourceGetMappedPointer_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphicsResourceSetMapFlags_v2 = NULL
 * cdef void *__cuGraphicsMapResources = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceGetMappedPointer_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":402
 * cdef void *__cuGraphicsResourceGetMappedMipmappedArray = NULL
 * cdef void *__cuGraphicsResourceGetMappedPointer_v2 = NULL
 * cdef void *__cuGraphicsResourceSetMapFlags_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphicsMapResources = NULL
 * cdef void *__cuGraphicsUnmapResources = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceSetMapFlags_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":403
 * cdef void *__cuGraphicsResourceGetMappedPointer_v2 = NULL
 * cdef void *__cuGraphicsResourceSetMapFlags_v2 = NULL
 * cdef void *__cuGraphicsMapResources = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphicsUnmapResources = NULL
 * cdef void *__cuGetProcAddress_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsMapResources = NULL;

  /* "cuda/_cuda/ccuda.pyx":404
 * cdef void *__cuGraphicsResourceSetMapFlags_v2 = NULL
 * cdef void *__cuGraphicsMapResources = NULL
 * cdef void *__cuGraphicsUnmapResources = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGetProcAddress_v2 = NULL
 * cdef void *__cuCoredumpGetAttribute = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsUnmapResources = NULL;

  /* "cuda/_cuda/ccuda.pyx":405
 * cdef void *__cuGraphicsMapResources = NULL
 * cdef void *__cuGraphicsUnmapResources = NULL
 * cdef void *__cuGetProcAddress_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCoredumpGetAttribute = NULL
 * cdef void *__cuCoredumpGetAttributeGlobal = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGetProcAddress_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":406
 * cdef void *__cuGraphicsUnmapResources = NULL
 * cdef void *__cuGetProcAddress_v2 = NULL
 * cdef void *__cuCoredumpGetAttribute = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCoredumpGetAttributeGlobal = NULL
 * cdef void *__cuCoredumpSetAttribute = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCoredumpGetAttribute = NULL;

  /* "cuda/_cuda/ccuda.pyx":407
 * cdef void *__cuGetProcAddress_v2 = NULL
 * cdef void *__cuCoredumpGetAttribute = NULL
 * cdef void *__cuCoredumpGetAttributeGlobal = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCoredumpSetAttribute = NULL
 * cdef void *__cuCoredumpSetAttributeGlobal = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCoredumpGetAttributeGlobal = NULL;

  /* "cuda/_cuda/ccuda.pyx":408
 * cdef void *__cuCoredumpGetAttribute = NULL
 * cdef void *__cuCoredumpGetAttributeGlobal = NULL
 * cdef void *__cuCoredumpSetAttribute = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCoredumpSetAttributeGlobal = NULL
 * cdef void *__cuGetExportTable = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCoredumpSetAttribute = NULL;

  /* "cuda/_cuda/ccuda.pyx":409
 * cdef void *__cuCoredumpGetAttributeGlobal = NULL
 * cdef void *__cuCoredumpSetAttribute = NULL
 * cdef void *__cuCoredumpSetAttributeGlobal = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGetExportTable = NULL
 * cdef void *__cuProfilerStart = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCoredumpSetAttributeGlobal = NULL;

  /* "cuda/_cuda/ccuda.pyx":410
 * cdef void *__cuCoredumpSetAttribute = NULL
 * cdef void *__cuCoredumpSetAttributeGlobal = NULL
 * cdef void *__cuGetExportTable = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuProfilerStart = NULL
 * cdef void *__cuProfilerStop = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGetExportTable = NULL;

  /* "cuda/_cuda/ccuda.pyx":411
 * cdef void *__cuCoredumpSetAttributeGlobal = NULL
 * cdef void *__cuGetExportTable = NULL
 * cdef void *__cuProfilerStart = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuProfilerStop = NULL
 * cdef void *__cuGraphicsEGLRegisterImage = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuProfilerStart = NULL;

  /* "cuda/_cuda/ccuda.pyx":412
 * cdef void *__cuGetExportTable = NULL
 * cdef void *__cuProfilerStart = NULL
 * cdef void *__cuProfilerStop = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphicsEGLRegisterImage = NULL
 * cdef void *__cuEGLStreamConsumerConnect = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuProfilerStop = NULL;

  /* "cuda/_cuda/ccuda.pyx":413
 * cdef void *__cuProfilerStart = NULL
 * cdef void *__cuProfilerStop = NULL
 * cdef void *__cuGraphicsEGLRegisterImage = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuEGLStreamConsumerConnect = NULL
 * cdef void *__cuEGLStreamConsumerConnectWithFlags = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsEGLRegisterImage = NULL;

  /* "cuda/_cuda/ccuda.pyx":414
 * cdef void *__cuProfilerStop = NULL
 * cdef void *__cuGraphicsEGLRegisterImage = NULL
 * cdef void *__cuEGLStreamConsumerConnect = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuEGLStreamConsumerConnectWithFlags = NULL
 * cdef void *__cuEGLStreamConsumerDisconnect = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerConnect = NULL;

  /* "cuda/_cuda/ccuda.pyx":415
 * cdef void *__cuGraphicsEGLRegisterImage = NULL
 * cdef void *__cuEGLStreamConsumerConnect = NULL
 * cdef void *__cuEGLStreamConsumerConnectWithFlags = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuEGLStreamConsumerDisconnect = NULL
 * cdef void *__cuEGLStreamConsumerAcquireFrame = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerConnectWithFlags = NULL;

  /* "cuda/_cuda/ccuda.pyx":416
 * cdef void *__cuEGLStreamConsumerConnect = NULL
 * cdef void *__cuEGLStreamConsumerConnectWithFlags = NULL
 * cdef void *__cuEGLStreamConsumerDisconnect = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuEGLStreamConsumerAcquireFrame = NULL
 * cdef void *__cuEGLStreamConsumerReleaseFrame = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerDisconnect = NULL;

  /* "cuda/_cuda/ccuda.pyx":417
 * cdef void *__cuEGLStreamConsumerConnectWithFlags = NULL
 * cdef void *__cuEGLStreamConsumerDisconnect = NULL
 * cdef void *__cuEGLStreamConsumerAcquireFrame = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuEGLStreamConsumerReleaseFrame = NULL
 * cdef void *__cuEGLStreamProducerConnect = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerAcquireFrame = NULL;

  /* "cuda/_cuda/ccuda.pyx":418
 * cdef void *__cuEGLStreamConsumerDisconnect = NULL
 * cdef void *__cuEGLStreamConsumerAcquireFrame = NULL
 * cdef void *__cuEGLStreamConsumerReleaseFrame = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuEGLStreamProducerConnect = NULL
 * cdef void *__cuEGLStreamProducerDisconnect = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamConsumerReleaseFrame = NULL;

  /* "cuda/_cuda/ccuda.pyx":419
 * cdef void *__cuEGLStreamConsumerAcquireFrame = NULL
 * cdef void *__cuEGLStreamConsumerReleaseFrame = NULL
 * cdef void *__cuEGLStreamProducerConnect = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuEGLStreamProducerDisconnect = NULL
 * cdef void *__cuEGLStreamProducerPresentFrame = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerConnect = NULL;

  /* "cuda/_cuda/ccuda.pyx":420
 * cdef void *__cuEGLStreamConsumerReleaseFrame = NULL
 * cdef void *__cuEGLStreamProducerConnect = NULL
 * cdef void *__cuEGLStreamProducerDisconnect = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuEGLStreamProducerPresentFrame = NULL
 * cdef void *__cuEGLStreamProducerReturnFrame = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerDisconnect = NULL;

  /* "cuda/_cuda/ccuda.pyx":421
 * cdef void *__cuEGLStreamProducerConnect = NULL
 * cdef void *__cuEGLStreamProducerDisconnect = NULL
 * cdef void *__cuEGLStreamProducerPresentFrame = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuEGLStreamProducerReturnFrame = NULL
 * cdef void *__cuGraphicsResourceGetMappedEglFrame = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerPresentFrame = NULL;

  /* "cuda/_cuda/ccuda.pyx":422
 * cdef void *__cuEGLStreamProducerDisconnect = NULL
 * cdef void *__cuEGLStreamProducerPresentFrame = NULL
 * cdef void *__cuEGLStreamProducerReturnFrame = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphicsResourceGetMappedEglFrame = NULL
 * cdef void *__cuEventCreateFromEGLSync = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuEGLStreamProducerReturnFrame = NULL;

  /* "cuda/_cuda/ccuda.pyx":423
 * cdef void *__cuEGLStreamProducerPresentFrame = NULL
 * cdef void *__cuEGLStreamProducerReturnFrame = NULL
 * cdef void *__cuGraphicsResourceGetMappedEglFrame = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuEventCreateFromEGLSync = NULL
 * cdef void *__cuGraphicsGLRegisterBuffer = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsResourceGetMappedEglFrame = NULL;

  /* "cuda/_cuda/ccuda.pyx":424
 * cdef void *__cuEGLStreamProducerReturnFrame = NULL
 * cdef void *__cuGraphicsResourceGetMappedEglFrame = NULL
 * cdef void *__cuEventCreateFromEGLSync = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphicsGLRegisterBuffer = NULL
 * cdef void *__cuGraphicsGLRegisterImage = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuEventCreateFromEGLSync = NULL;

  /* "cuda/_cuda/ccuda.pyx":425
 * cdef void *__cuGraphicsResourceGetMappedEglFrame = NULL
 * cdef void *__cuEventCreateFromEGLSync = NULL
 * cdef void *__cuGraphicsGLRegisterBuffer = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphicsGLRegisterImage = NULL
 * cdef void *__cuGLGetDevices_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsGLRegisterBuffer = NULL;

  /* "cuda/_cuda/ccuda.pyx":426
 * cdef void *__cuEventCreateFromEGLSync = NULL
 * cdef void *__cuGraphicsGLRegisterBuffer = NULL
 * cdef void *__cuGraphicsGLRegisterImage = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGLGetDevices_v2 = NULL
 * cdef void *__cuVDPAUGetDevice = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsGLRegisterImage = NULL;

  /* "cuda/_cuda/ccuda.pyx":427
 * cdef void *__cuGraphicsGLRegisterBuffer = NULL
 * cdef void *__cuGraphicsGLRegisterImage = NULL
 * cdef void *__cuGLGetDevices_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuVDPAUGetDevice = NULL
 * cdef void *__cuVDPAUCtxCreate_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGLGetDevices_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":428
 * cdef void *__cuGraphicsGLRegisterImage = NULL
 * cdef void *__cuGLGetDevices_v2 = NULL
 * cdef void *__cuVDPAUGetDevice = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuVDPAUCtxCreate_v2 = NULL
 * cdef void *__cuGraphicsVDPAURegisterVideoSurface = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuVDPAUGetDevice = NULL;

  /* "cuda/_cuda/ccuda.pyx":429
 * cdef void *__cuGLGetDevices_v2 = NULL
 * cdef void *__cuVDPAUGetDevice = NULL
 * cdef void *__cuVDPAUCtxCreate_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphicsVDPAURegisterVideoSurface = NULL
 * cdef void *__cuGraphicsVDPAURegisterOutputSurface = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuVDPAUCtxCreate_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":430
 * cdef void *__cuVDPAUGetDevice = NULL
 * cdef void *__cuVDPAUCtxCreate_v2 = NULL
 * cdef void *__cuGraphicsVDPAURegisterVideoSurface = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphicsVDPAURegisterOutputSurface = NULL
 * 
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsVDPAURegisterVideoSurface = NULL;

  /* "cuda/_cuda/ccuda.pyx":431
 * cdef void *__cuVDPAUCtxCreate_v2 = NULL
 * cdef void *__cuGraphicsVDPAURegisterVideoSurface = NULL
 * cdef void *__cuGraphicsVDPAURegisterOutputSurface = NULL             # <<<<<<<<<<<<<<
 * 
 * cdef int cuPythonInit() except -1 nogil:
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsVDPAURegisterOutputSurface = NULL;

  /* "cuda/_cuda/ccuda.pyx":1
 * # Copyright 2021-2023 NVIDIA Corporation.  All rights reserved.             # <<<<<<<<<<<<<<
 * #
 * # Please refer to the NVIDIA end user license agreement (EULA) associated
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_TraceReturn(Py_None, 0);

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init cuda._cuda.ccuda", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_CLEAR(__pyx_m);
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init cuda._cuda.ccuda");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}
#endif

/* Profile */
#if CYTHON_PROFILE
static int __Pyx_TraceSetupAndCall(PyCodeObject** code,
                                   PyFrameObject** frame,
                                   PyThreadState* tstate,
                                   const char *funcname,
                                   const char *srcfile,
                                   int firstlineno) {
    PyObject *type, *value, *traceback;
    int retval;
    if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) {
        if (*code == NULL) {
            *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);
            if (*code == NULL) return 0;
        }
        *frame = PyFrame_New(
            tstate,                          /*PyThreadState *tstate*/
            *code,                           /*PyCodeObject *code*/
            __pyx_d,                  /*PyObject *globals*/
            0                                /*PyObject *locals*/
        );
        if (*frame == NULL) return 0;
        if (CYTHON_TRACE && (*frame)->f_trace == NULL) {
            Py_INCREF(Py_None);
            (*frame)->f_trace = Py_None;
        }
#if PY_VERSION_HEX < 0x030400B1
    } else {
        (*frame)->f_tstate = tstate;
#endif
    }
    __Pyx_PyFrame_SetLineNumber(*frame, firstlineno);
    retval = 1;
    __Pyx_EnterTracing(tstate);
    __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
    #if CYTHON_TRACE
    if (tstate->c_tracefunc)
        retval = tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL) == 0;
    if (retval && tstate->c_profilefunc)
    #endif
        retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0;
    __Pyx_LeaveTracing(tstate);
    if (retval) {
        __Pyx_ErrRestoreInState(tstate, type, value, traceback);
        return __Pyx_IsTracing(tstate, 0, 0) && retval;
    } else {
        Py_XDECREF(type);
        Py_XDECREF(value);
        Py_XDECREF(traceback);
        return -1;
    }
}
static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) {
    PyCodeObject *py_code = 0;
#if PY_MAJOR_VERSION >= 3
    py_code = PyCode_NewEmpty(srcfile, funcname, firstlineno);
    if (likely(py_code)) {
        py_code->co_flags |= CO_OPTIMIZED | CO_NEWLOCALS;
    }
#else
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    py_funcname = PyString_FromString(funcname);
    if (unlikely(!py_funcname)) goto bad;
    py_srcfile = PyString_FromString(srcfile);
    if (unlikely(!py_srcfile)) goto bad;
    py_code = PyCode_New(
        0,
        0,
        0,
        CO_OPTIMIZED | CO_NEWLOCALS,
        __pyx_empty_bytes,     /*PyObject *code,*/
        __pyx_empty_tuple,     /*PyObject *consts,*/
        __pyx_empty_tuple,     /*PyObject *names,*/
        __pyx_empty_tuple,     /*PyObject *varnames,*/
        __pyx_empty_tuple,     /*PyObject *freevars,*/
        __pyx_empty_tuple,     /*PyObject *cellvars,*/
        py_srcfile,       /*PyObject *filename,*/
        py_funcname,      /*PyObject *name,*/
        firstlineno,
        __pyx_empty_bytes      /*PyObject *lnotab*/
    );
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
#endif
    return py_code;
}
#endif

/* PyDictVersioning */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
        dictptr = _PyObject_GetDictPtr(obj);
#endif
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    } else if (unlikely(PyErr_Occurred())) {
        return NULL;
    }
#else
    result = PyDict_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = Py_TYPE(func)->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* decode_c_string */
static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
    Py_ssize_t length;
    if (unlikely((start < 0) | (stop < 0))) {
        size_t slen = strlen(cstring);
        if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) {
            PyErr_SetString(PyExc_OverflowError,
                            "c-string too long to convert to Python");
            return NULL;
        }
        length = (Py_ssize_t) slen;
        if (start < 0) {
            start += length;
            if (start < 0)
                start = 0;
        }
        if (stop < 0)
            stop += length;
    }
    if (unlikely(stop <= start))
        return __Pyx_NewRef(__pyx_empty_unicode);
    length = stop - start;
    cstring += start;
    if (decode_func) {
        return decode_func(cstring, length, errors);
    } else {
        return PyUnicode_Decode(cstring, length, encoding, errors);
    }
}

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif
#endif

/* PyCFunctionFastCall */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    int flags = PyCFunction_GET_FLAGS(func);
    assert(PyCFunction_Check(func));
    assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
    assert(nargs >= 0);
    assert(nargs == 0 || args != NULL);
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
       because it may clear it (directly or indirectly) and so the
       caller loses its exception */
    assert(!PyErr_Occurred());
    if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
        return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
    } else {
        return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
    }
}
#endif

/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    #endif
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = a->tp_base;
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
    if (!res) {
        res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
    return res;
}
#endif
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
    }
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallOneArg */
#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
    }
#endif
    if (likely(PyCFunction_Check(func))) {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
        } else if (__Pyx_PyFastCFunction_Check(func)) {
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

/* RaiseException */
#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    __Pyx_PyThreadState_declare
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if CYTHON_FAST_THREAD_STATE
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#else
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* SwapException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = *type;
    exc_info->exc_value = *value;
    exc_info->exc_traceback = *tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
    #endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#if PY_VERSION_HEX >= 0x030b00a6
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = NULL;
    PyObject *py_funcname = NULL;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_srcfile = NULL;
    py_srcfile = PyString_FromString(filename);
    if (!py_srcfile) goto bad;
    #endif
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        funcname = PyUnicode_AsUTF8(py_funcname);
        if (!funcname) goto bad;
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        if (!py_funcname) goto bad;
        #endif
    }
    #if PY_MAJOR_VERSION < 3
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    #else
    py_code = PyCode_NewEmpty(filename, funcname, py_line);
    #endif
    Py_XDECREF(py_funcname);  // XDECREF since it's only set on Py3 if cline
    return py_code;
bad:
    Py_XDECREF(py_funcname);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_srcfile);
    #endif
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject *ptype, *pvalue, *ptraceback;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) {
            /* If the code object creation fails, then we should clear the
               fetched exception references and propagate the new exception */
            Py_XDECREF(ptype);
            Py_XDECREF(pvalue);
            Py_XDECREF(ptraceback);
            goto bad;
        }
        __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* None */
static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void) {
  int err;
  #ifdef WITH_THREAD
  PyGILState_STATE _save = PyGILState_Ensure();
  #endif
  err = !!PyErr_Occurred();
  #ifdef WITH_THREAD
  PyGILState_Release(_save);
  #endif
  return err;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_As_unsigned_PY_LONG_LONG(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG) -1, const_zero = (unsigned PY_LONG_LONG) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(unsigned PY_LONG_LONG) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (unsigned PY_LONG_LONG) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (unsigned PY_LONG_LONG) 0;
                case  1: __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, digit, digits[0])
                case 2:
                    if (8 * sizeof(unsigned PY_LONG_LONG) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned PY_LONG_LONG) >= 2 * PyLong_SHIFT) {
                            return (unsigned PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(unsigned PY_LONG_LONG) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned PY_LONG_LONG) >= 3 * PyLong_SHIFT) {
                            return (unsigned PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(unsigned PY_LONG_LONG) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned PY_LONG_LONG) >= 4 * PyLong_SHIFT) {
                            return (unsigned PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (unsigned PY_LONG_LONG) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(unsigned PY_LONG_LONG) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned PY_LONG_LONG, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned PY_LONG_LONG, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (unsigned PY_LONG_LONG) 0;
                case -1: __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                            return (unsigned PY_LONG_LONG) (((unsigned PY_LONG_LONG)-1)*(((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(unsigned PY_LONG_LONG) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                            return (unsigned PY_LONG_LONG) ((((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                            return (unsigned PY_LONG_LONG) (((unsigned PY_LONG_LONG)-1)*(((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(unsigned PY_LONG_LONG) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                            return (unsigned PY_LONG_LONG) ((((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                            return (unsigned PY_LONG_LONG) (((unsigned PY_LONG_LONG)-1)*(((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(unsigned PY_LONG_LONG) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                            return (unsigned PY_LONG_LONG) ((((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(unsigned PY_LONG_LONG) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned PY_LONG_LONG, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned PY_LONG_LONG, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            unsigned PY_LONG_LONG val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (unsigned PY_LONG_LONG) -1;
        }
    } else {
        unsigned PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (unsigned PY_LONG_LONG) -1;
        val = __Pyx_PyInt_As_unsigned_PY_LONG_LONG(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to unsigned PY_LONG_LONG");
    return (unsigned PY_LONG_LONG) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to unsigned PY_LONG_LONG");
    return (unsigned PY_LONG_LONG) -1;
}

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CheckBinaryVersion */
static int __Pyx_check_binary_version(void) {
    char ctversion[5];
    int same=1, i, found_dot;
    const char* rt_from_call = Py_GetVersion();
    PyOS_snprintf(ctversion, 5, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    found_dot = 0;
    for (i = 0; i < 4; i++) {
        if (!ctversion[i]) {
            same = (rt_from_call[i] < '0' || rt_from_call[i] > '9');
            break;
        }
        if (rt_from_call[i] != ctversion[i]) {
            same = 0;
            break;
        }
    }
    if (!same) {
        char rtversion[5] = {'\0'};
        char message[200];
        for (i=0; i<4; ++i) {
            if (rt_from_call[i] == '.') {
                if (found_dot) break;
                found_dot = 1;
            } else if (rt_from_call[i] < '0' || rt_from_call[i] > '9') {
                break;
            }
            rtversion[i] = rt_from_call[i];
        }
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* FunctionExport */
static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    d = PyObject_GetAttrString(__pyx_m, (char *)"__pyx_capi__");
    if (!d) {
        PyErr_Clear();
        d = PyDict_New();
        if (!d)
            goto bad;
        Py_INCREF(d);
        if (PyModule_AddObject(__pyx_m, (char *)"__pyx_capi__", d) < 0)
            goto bad;
    }
    tmp.fp = f;
#if PY_VERSION_HEX >= 0x02070000
    cobj = PyCapsule_New(tmp.p, sig, 0);
#else
    cobj = PyCObject_FromVoidPtrAndDesc(tmp.p, (void *)sig, 0);
#endif
    if (!cobj)
        goto bad;
    if (PyDict_SetItemString(d, name, cobj) < 0)
        goto bad;
    Py_DECREF(cobj);
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(cobj);
    Py_XDECREF(d);
    return -1;
}

/* FunctionImport */
#ifndef __PYX_HAVE_RT_ImportFunction_0_29_35
#define __PYX_HAVE_RT_ImportFunction_0_29_35
static int __Pyx_ImportFunction_0_29_35(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
    if (!d)
        goto bad;
    cobj = PyDict_GetItemString(d, funcname);
    if (!cobj) {
        PyErr_Format(PyExc_ImportError,
            "%.200s does not export expected C function %.200s",
                PyModule_GetName(module), funcname);
        goto bad;
    }
#if PY_VERSION_HEX >= 0x02070000
    if (!PyCapsule_IsValid(cobj, sig)) {
        PyErr_Format(PyExc_TypeError,
            "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
        goto bad;
    }
    tmp.p = PyCapsule_GetPointer(cobj, sig);
#else
    {const char *desc, *s1, *s2;
    desc = (const char *)PyCObject_GetDesc(cobj);
    if (!desc)
        goto bad;
    s1 = desc; s2 = sig;
    while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
    if (*s1 != *s2) {
        PyErr_Format(PyExc_TypeError,
            "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), funcname, sig, desc);
        goto bad;
    }
    tmp.p = PyCObject_AsVoidPtr(cobj);}
#endif
    *f = tmp.fp;
    if (!(*f))
        goto bad;
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(d);
    return -1;
}
#endif

/* InitStrings */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type %.200s).  "
                "The ability to return an instance of a strict subclass of int "
                "is deprecated, and may be removed in a future version of Python.",
                Py_TYPE(result)->tp_name)) {
            Py_DECREF(result);
            return NULL;
        }
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type %.200s)",
                 type_name, type_name, Py_TYPE(result)->tp_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
    return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
#if PY_MAJOR_VERSION < 3
  } else if (likely(PyInt_CheckExact(o))) {
    return PyInt_AS_LONG(o);
#endif
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyInt_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
