/* Generated by Cython 0.29.32 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "depends": [
            "C:\\Users\\mavaz\\git\\cuda-python-build-utils\\conda-recipe\\cuda-headers\\include\\cuda.h",
            "C:\\Users\\mavaz\\git\\cuda-python-build-utils\\conda-recipe\\cuda-headers\\include\\cudaProfiler.h",
            "cuda",
            "cuda\\_cuda\\loader.h"
        ],
        "include_dirs": [
            ".\\cuda",
            ".\\cuda\\_cuda",
            "C:\\ProgramData\\Anaconda3\\conda-bld\\cuda-python_1662763164470\\_h_env",
            "C:\\Users\\mavaz\\git\\cuda-python-build-utils\\conda-recipe\\cuda-headers/include"
        ],
        "language": "c++",
        "library_dirs": [
            "C:\\ProgramData\\Anaconda3\\conda-bld\\cuda-python_1662763164470\\_h_env\\Lib\\site-packages",
            "C:\\ProgramData\\Anaconda3\\conda-bld\\cuda-python_1662763164470\\_h_env\\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_32"
#define CYTHON_HEX_VERSION 0x001D20F0
#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
  #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 (PYPY_VERSION_HEX >= 0x07030900)
  #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 1
  #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)
  #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 defined(PyUnicode_IS_READY)
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #else
  #define __Pyx_PyUnicode_READY(op)       (0)
  #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 defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
  #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
  #else
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #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":2473
 * 
 * 
 * ctypedef unsigned int GLenum             # <<<<<<<<<<<<<<
 * 
 * ctypedef unsigned int GLuint
 */
typedef unsigned int __pyx_t_4cuda_5ccuda_GLenum;

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

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

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

/* "cuda/ccuda.pxd":2496
 * 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":2498
 * ctypedef unsigned long long VdpGetProcAddress
 * 
 * ctypedef uint32_t VdpVideoSurface             # <<<<<<<<<<<<<<
 * 
 * ctypedef uint32_t VdpOutputSurface
 */
typedef uint32_t __pyx_t_4cuda_5ccuda_VdpVideoSurface;

/* "cuda/ccuda.pxd":2500
 * ctypedef uint32_t VdpVideoSurface
 * 
 * ctypedef uint32_t VdpOutputSurface             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) nogil except ?CUDA_ERROR_NOT_FOUND
 */
typedef uint32_t __pyx_t_4cuda_5ccuda_VdpOutputSurface;

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

/* "cuda/ccuda.pxd":2511
 * 
 * 
 * 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":2517
 * 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":2523
 * 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":2692
 * 
 * 
 * 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":2699
 * 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":2712
 * cdef CUresult cuGLGetDevices(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) nogil except ?CUDA_ERROR_NOT_FOUND
 * 
 * cdef enum: CUDA_VERSION = 11080             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_IPC_HANDLE_SIZE = 64
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_VERSION = 0x2B48
};

/* "cuda/ccuda.pxd":2714
 * cdef enum: CUDA_VERSION = 11080
 * 
 * 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":2716
 * 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":2718
 * cdef enum: CU_STREAM_LEGACY = 1
 * 
 * cdef enum: CU_STREAM_PER_THREAD = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_STREAM_PER_THREAD = 2
};

/* "cuda/ccuda.pxd":2720
 * cdef enum: CU_STREAM_PER_THREAD = 2
 * 
 * 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":2722
 * 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":2724
 * 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":2726
 * 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":2728
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5
 * 
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8
};

/* "cuda/ccuda.pxd":2730
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8
 * 
 * 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":2732
 * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1
 * 
 * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3
};

/* "cuda/ccuda.pxd":2734
 * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3
 * 
 * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_MEMHOSTALLOC_PORTABLE = 1
};

/* "cuda/ccuda.pxd":2736
 * 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":2738
 * 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":2740
 * 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":2742
 * 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":2744
 * 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":2746
 * 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":2748
 * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8
 * 
 * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1
};

/* "cuda/ccuda.pxd":2750
 * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1
 * 
 * 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":2752
 * 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":2754
 * 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":2756
 * 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":2758
 * 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":2760
 * 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":2762
 * 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":2764
 * 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":2766
 * 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":2768
 * 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":2770
 * 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":2772
 * 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":2774
 * 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":2776
 * 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":2778
 * 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":2780
 * 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":2782
 * 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":2784
 * 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":2786
 * 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":2788
 * 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":2790
 * 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":2792
 * 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":2794
 * 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":2796
 * 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":2798
 * 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":2800
 * 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":2802
 * 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":2804
 * 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":2806
 * 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":2808
 * 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":2810
 * 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":2812
 * 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":2814
 * 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":2816
 * 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":2480
 *     cdef struct void:
 *         pass
 * ctypedef void* EGLImageKHR             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef void *__pyx_t_4cuda_5ccuda_EGLImageKHR;

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

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

/* "cuda/ccuda.pxd":2515
 *     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":2521
 *     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":2640
 *     CU_EGL_COLOR_FORMAT_MAX = 114
 * 
 * ctypedef CUeglColorFormat_enum CUeglColorFormat             # <<<<<<<<<<<<<<
 * 
 * cdef union _CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum __pyx_t_4cuda_5ccuda_CUeglColorFormat;

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

/* "cuda/ccuda.pxd":2646
 *     void* pPitch[3]
 * 
 * cdef struct CUeglFrame_st:             # <<<<<<<<<<<<<<
 *     _CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u frame
 *     unsigned int width
 */
struct __pyx_t_4cuda_5ccuda_CUeglFrame_st {
  union __pyx_t_4cuda_5ccuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u 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":2658
 *     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":2660
 * 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":2665
 *     cdef struct CUeglStreamConnection_st:
 *         pass
 * ctypedef CUeglStreamConnection_st* CUeglStreamConnection             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND
 */
typedef struct CUeglStreamConnection_st *__pyx_t_4cuda_5ccuda_CUeglStreamConnection;

/* "cuda/ccuda.pxd":2697
 *     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":2704
 *     CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2
 * 
 * ctypedef CUGLmap_flags_enum CUGLmap_flags             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND
 */
typedef enum __pyx_t_4cuda_5ccuda_CUGLmap_flags_enum __pyx_t_4cuda_5ccuda_CUGLmap_flags;

/* --- 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)  {\
    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);\
}
#define __Pyx_GetModuleGlobalNameUncached(var, name)  {\
    PY_UINT64_T __pyx_dict_version;\
    PyObject *__pyx_dict_cached_value;\
    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
}
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(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); /*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___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___cuDeviceGetExecAffinitySupport;
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___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___cuModuleGetTexRef;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetSurfRef;
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___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___cuPointerGetAttribute;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemPrefetchAsync;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuMemAdvise;
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___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;
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;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue64;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue32;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue64;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuStreamBatchMemOp;
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;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeGetParams;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeSetParams;
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___cuGraphInstantiate_v2;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphInstantiateWithFlags;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecKernelNodeSetParams;
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;
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___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___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;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuGetExportTable;
static void *__pyx_v_4cuda_5_cuda_5ccuda___cuProfilerInitialize;
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___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 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 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_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_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_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_cuGraphDestroy[] = "cuGraphDestroy";
static const char __pyx_k_cuLaunchKernel[] = "cuLaunchKernel";
static const char __pyx_k_cuLinkComplete[] = "cuLinkComplete";
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_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_cuGetProcAddress[] = "cuGetProcAddress";
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_cuGraphExecUpdate[] = "cuGraphExecUpdate";
static const char __pyx_k_cuIpcGetMemHandle[] = "cuIpcGetMemHandle";
static const char __pyx_k_cuLaunchGridAsync[] = "cuLaunchGridAsync";
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_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_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_cuStreamBatchMemOp[] = "cuStreamBatchMemOp";
static const char __pyx_k_cuStreamDestroy_v2[] = "cuStreamDestroy_v2";
static const char __pyx_k_cuStreamEndCapture[] = "cuStreamEndCapture";
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_cuGraphAddEmptyNode[] = "cuGraphAddEmptyNode";
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_cuLaunchKernel_ptsz[] = "cuLaunchKernel_ptsz";
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_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_cuStreamWaitValue32[] = "cuStreamWaitValue32";
static const char __pyx_k_cuStreamWaitValue64[] = "cuStreamWaitValue64";
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_cuGraphAddKernelNode[] = "cuGraphAddKernelNode";
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_cuIpcOpenEventHandle[] = "cuIpcOpenEventHandle";
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_cuProfilerInitialize[] = "cuProfilerInitialize";
static const char __pyx_k_cuStreamGetAttribute[] = "cuStreamGetAttribute";
static const char __pyx_k_cuStreamSetAttribute[] = "cuStreamSetAttribute";
static const char __pyx_k_cuStreamWriteValue32[] = "cuStreamWriteValue32";
static const char __pyx_k_cuStreamWriteValue64[] = "cuStreamWriteValue64";
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_cuGraphInstantiate_v2[] = "cuGraphInstantiate_v2";
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_cuMemPoolGetAttribute[] = "cuMemPoolGetAttribute";
static const char __pyx_k_cuMemPoolSetAttribute[] = "cuMemPoolSetAttribute";
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_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_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_cuStreamGetCaptureInfo[] = "cuStreamGetCaptureInfo";
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_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_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_cuStreamBatchMemOp_ptsz[] = "cuStreamBatchMemOp_ptsz";
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_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_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_cuStreamWaitValue32_ptsz[] = "cuStreamWaitValue32_ptsz";
static const char __pyx_k_cuStreamWaitValue64_ptsz[] = "cuStreamWaitValue64_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_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_cuStreamWriteValue32_ptsz[] = "cuStreamWriteValue32_ptsz";
static const char __pyx_k_cuStreamWriteValue64_ptsz[] = "cuStreamWriteValue64_ptsz";
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_cuGraphKernelNodeGetParams[] = "cuGraphKernelNodeGetParams";
static const char __pyx_k_cuGraphKernelNodeSetParams[] = "cuGraphKernelNodeSetParams";
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_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_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_cuStreamGetCaptureInfo_ptsz[] = "cuStreamGetCaptureInfo_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_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_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_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_cuGraphKernelNodeSetAttribute[] = "cuGraphKernelNodeSetAttribute";
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_cuGraphExecKernelNodeSetParams[] = "cuGraphExecKernelNodeSetParams";
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_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_cuLaunchGrid_not_found[] = "Function \"cuLaunchGrid\" 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_cuPointerGetAttributes[] = "Function \"cuPointerGetAttributes\" not found";
static const char __pyx_k_Function_cuStreamAttachMemAsync[] = "Function \"cuStreamAttachMemAsync\" not found";
static const char __pyx_k_Function_cuStreamBatchMemOp_not[] = "Function \"cuStreamBatchMemOp\" 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\" 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_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_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_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_not_fo[] = "Function \"cuGetProcAddress\" 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_no[] = "Function \"cuGraphAddKernelNode\" 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_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_cuGraphExecHostNodeSetP[] = "Function \"cuGraphExecHostNodeSetParams\" not found";
static const char __pyx_k_Function_cuGraphExecKernelNodeSe[] = "Function \"cuGraphExecKernelNodeSetParams\" 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_cuGraphExecUpdate_not_f[] = "Function \"cuGraphExecUpdate\" 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_cuGraphInstantiate_v2_n[] = "Function \"cuGraphInstantiate_v2\" 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\" not found";
static const char __pyx_k_Function_cuGraphKernelNodeSetAtt[] = "Function \"cuGraphKernelNodeSetAttribute\" not found";
static const char __pyx_k_Function_cuGraphKernelNodeSetPar[] = "Function \"cuGraphKernelNodeSetParams\" 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_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_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_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_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_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_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_cuProfilerInitialize_no[] = "Function \"cuProfilerInitialize\" 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_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_cuStreamWaitValue32_not[] = "Function \"cuStreamWaitValue32\" not found";
static const char __pyx_k_Function_cuStreamWaitValue64_not[] = "Function \"cuStreamWaitValue64\" not found";
static const char __pyx_k_Function_cuStreamWriteValue32_no[] = "Function \"cuStreamWriteValue32\" not found";
static const char __pyx_k_Function_cuStreamWriteValue32_v2[] = "Function \"cuStreamWriteValue32_v2\" not found";
static const char __pyx_k_Function_cuStreamWriteValue64_no[] = "Function \"cuStreamWriteValue64\" 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_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_cuGraphExternalSemaphoresSignalN[] = "cuGraphExternalSemaphoresSignalNodeGetParams";
static const char __pyx_k_cuGraphExternalSemaphoresWaitNod[] = "cuGraphExternalSemaphoresWaitNodeGetParams";
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_Function_cuStreamGetCaptureInfo_2[] = "Function \"cuStreamGetCaptureInfo_v2\" not found";
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_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_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_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_not_fo;
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_no;
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_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_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_cuGraphExecUpdate_not_f;
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_cuGraphInstantiate_v2_n;
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_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_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_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_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_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_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_cuProfilerInitialize_no;
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_not;
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_cuStreamGetCaptureInfo_2;
static PyObject *__pyx_kp_u_Function_cuStreamGetCtx_not_foun;
static PyObject *__pyx_kp_u_Function_cuStreamGetFlags_not_fo;
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_not;
static PyObject *__pyx_kp_u_Function_cuStreamWaitValue32_v2;
static PyObject *__pyx_kp_u_Function_cuStreamWaitValue64_not;
static PyObject *__pyx_kp_u_Function_cuStreamWaitValue64_v2;
static PyObject *__pyx_kp_u_Function_cuStreamWriteValue32_no;
static PyObject *__pyx_kp_u_Function_cuStreamWriteValue32_v2;
static PyObject *__pyx_kp_u_Function_cuStreamWriteValue64_no;
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_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_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_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_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;
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;
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_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_cuGraphExecHostNodeSetParams;
static PyObject *__pyx_n_u_cuGraphExecKernelNodeSetParams;
static PyObject *__pyx_n_u_cuGraphExecMemcpyNodeSetParams;
static PyObject *__pyx_n_u_cuGraphExecMemsetNodeSetParams;
static PyObject *__pyx_n_u_cuGraphExecUpdate;
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_cuGraphInstantiate_v2;
static PyObject *__pyx_n_u_cuGraphKernelNodeCopyAttributes;
static PyObject *__pyx_n_u_cuGraphKernelNodeGetAttribute;
static PyObject *__pyx_n_u_cuGraphKernelNodeGetParams;
static PyObject *__pyx_n_u_cuGraphKernelNodeSetAttribute;
static PyObject *__pyx_n_u_cuGraphKernelNodeSetParams;
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_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_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_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_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_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_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_cuProfilerInitialize;
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;
static PyObject *__pyx_n_u_cuStreamBatchMemOp_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;
static PyObject *__pyx_n_u_cuStreamGetCaptureInfo_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_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;
static PyObject *__pyx_n_u_cuStreamWaitValue32_ptsz;
static PyObject *__pyx_n_u_cuStreamWaitValue32_v2;
static PyObject *__pyx_n_u_cuStreamWaitValue32_v2_ptsz;
static PyObject *__pyx_n_u_cuStreamWaitValue64;
static PyObject *__pyx_n_u_cuStreamWaitValue64_ptsz;
static PyObject *__pyx_n_u_cuStreamWaitValue64_v2;
static PyObject *__pyx_n_u_cuStreamWaitValue64_v2_ptsz;
static PyObject *__pyx_n_u_cuStreamWriteValue32;
static PyObject *__pyx_n_u_cuStreamWriteValue32_ptsz;
static PyObject *__pyx_n_u_cuStreamWriteValue32_v2;
static PyObject *__pyx_n_u_cuStreamWriteValue32_v2_ptsz;
static PyObject *__pyx_n_u_cuStreamWriteValue64;
static PyObject *__pyx_n_u_cuStreamWriteValue64_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_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;
/* Late includes */

/* "cuda/_cuda/ccuda.pyx":406
 * cdef void *__cuGLGetDevices_v2 = NULL
 * 
 * cdef int cuPythonInit() nogil except -1:             # <<<<<<<<<<<<<<
 *     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], 406, 1, __PYX_ERR(0, 406, __pyx_L1_error));

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

    /* "cuda/_cuda/ccuda.pyx":409
 *     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":410
 *     cdef bint usePTDS
 *     if __cuPythonInit:
 *         return 0             # <<<<<<<<<<<<<<
 *     __cuPythonInit = True
 *     with gil:
 */
      __pyx_r = 0;
      goto __pyx_L3_return;

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

    /* "cuda/_cuda/ccuda.pyx":411
 *     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":412
 *         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":413
 *     __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, 413, __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, 413, __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, 413, __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, 413, __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, 413, __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, 413, __pyx_L8_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_v_usePTDS = __pyx_t_1;
        }

        /* "cuda/_cuda/ccuda.pyx":412
 *         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":417
 *     # 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":418
 *     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":419
 *     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, 419, __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, 419, __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, 419, __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, 419, __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":420
 *     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":421
 *         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, 421, __pyx_L11_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_v_path = __pyx_t_4;
            __pyx_t_4 = 0;

            /* "cuda/_cuda/ccuda.pyx":420
 *     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":423
 *             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":424
 *         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":425
 *             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":426
 *         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, 426, __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, 426, __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, 426, __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, 426, __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, 426, __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, 426, __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, 426, __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":425
 *             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":427
 *         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, 427, __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, 427, __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":428
 *             handle = win32api.LoadLibraryEx(path, 0, LOAD_LIBRARY_SEARCH_SYSTEM32)
 *         except error as e:
 *             raise RuntimeError('Failed to LoadLibraryEx ' + path)             # <<<<<<<<<<<<<<
 * 
 *     # Get latest __cuGetProcAddress
 */
                __pyx_t_2 = PyNumber_Add(__pyx_kp_u_Failed_to_LoadLibraryEx, __pyx_v_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 428, __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, 428, __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, 428, __pyx_L27_error)
              }

              /* "cuda/_cuda/ccuda.pyx":427
 *         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":425
 *             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":418
 *     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":431
 * 
 *     # Get latest __cuGetProcAddress
 *     with gil:             # <<<<<<<<<<<<<<
 *         try:
 *             global __cuGetProcAddress
 */
    {
        #ifdef WITH_THREAD
        PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
        #endif
        /*try:*/ {

          /* "cuda/_cuda/ccuda.pyx":432
 *     # Get latest __cuGetProcAddress
 *     with gil:
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGetProcAddress
 *             __cuGetProcAddress = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetProcAddress')
 */
          {
            __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":434
 *         try:
 *             global __cuGetProcAddress
 *             __cuGetProcAddress = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetProcAddress')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 434, __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, 434, __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};
                __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, 434, __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};
                __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, 434, __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, 434, __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);
                __Pyx_GIVEREF(__pyx_n_u_cuGetProcAddress);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGetProcAddress);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 434, __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, 434, __pyx_L36_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGetProcAddress = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":432
 *     # Get latest __cuGetProcAddress
 *     with gil:
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGetProcAddress
 *             __cuGetProcAddress = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetProcAddress')
 */
            }
            __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":435
 *             global __cuGetProcAddress
 *             __cuGetProcAddress = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetProcAddress')
 *         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":431
 * 
 *     # Get latest __cuGetProcAddress
 *     with gil:             # <<<<<<<<<<<<<<
 *         try:
 *             global __cuGetProcAddress
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            __Pyx_PyGILState_Release(__pyx_gilstate_save);
            #endif
            goto __pyx_L35;
          }
          __pyx_L35:;
        }
    }

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

      /* "cuda/_cuda/ccuda.pyx":440
 *     # Load using cuGetProcAddress if available
 *     if __cuGetProcAddress != 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":444
 *             pass
 *             global __cuMemcpy
 *             cuGetProcAddress('cuMemcpy', &__cuMemcpy, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyPeer
 *             cuGetProcAddress('cuMemcpyPeer', &__cuMemcpyPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 444, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":446
 *             cuGetProcAddress('cuMemcpy', &__cuMemcpy, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemcpyPeer
 *             cuGetProcAddress('cuMemcpyPeer', &__cuMemcpyPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyHtoD_v2
 *             cuGetProcAddress('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 446, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":448
 *             cuGetProcAddress('cuMemcpyPeer', &__cuMemcpyPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemcpyHtoD_v2
 *             cuGetProcAddress('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyDtoH_v2
 *             cuGetProcAddress('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 448, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":450
 *             cuGetProcAddress('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemcpyDtoH_v2
 *             cuGetProcAddress('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyDtoD_v2
 *             cuGetProcAddress('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 450, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":452
 *             cuGetProcAddress('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemcpyDtoD_v2
 *             cuGetProcAddress('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyDtoA_v2
 *             cuGetProcAddress('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 452, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":454
 *             cuGetProcAddress('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemcpyDtoA_v2
 *             cuGetProcAddress('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyAtoD_v2
 *             cuGetProcAddress('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 454, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":456
 *             cuGetProcAddress('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemcpyAtoD_v2
 *             cuGetProcAddress('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyHtoA_v2
 *             cuGetProcAddress('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 456, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":458
 *             cuGetProcAddress('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemcpyHtoA_v2
 *             cuGetProcAddress('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyAtoH_v2
 *             cuGetProcAddress('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 458, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":460
 *             cuGetProcAddress('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemcpyAtoH_v2
 *             cuGetProcAddress('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyAtoA_v2
 *             cuGetProcAddress('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 460, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":462
 *             cuGetProcAddress('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemcpyAtoA_v2
 *             cuGetProcAddress('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemcpy2D_v2
 *             cuGetProcAddress('cuMemcpy2D', &__cuMemcpy2D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 462, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":464
 *             cuGetProcAddress('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemcpy2D_v2
 *             cuGetProcAddress('cuMemcpy2D', &__cuMemcpy2D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemcpy2DUnaligned_v2
 *             cuGetProcAddress('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 464, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":466
 *             cuGetProcAddress('cuMemcpy2D', &__cuMemcpy2D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemcpy2DUnaligned_v2
 *             cuGetProcAddress('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemcpy3D_v2
 *             cuGetProcAddress('cuMemcpy3D', &__cuMemcpy3D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 466, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":468
 *             cuGetProcAddress('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemcpy3D_v2
 *             cuGetProcAddress('cuMemcpy3D', &__cuMemcpy3D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemcpy3DPeer
 *             cuGetProcAddress('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 468, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":470
 *             cuGetProcAddress('cuMemcpy3D', &__cuMemcpy3D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemcpy3DPeer
 *             cuGetProcAddress('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyAsync
 *             cuGetProcAddress('cuMemcpyAsync', &__cuMemcpyAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 470, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":472
 *             cuGetProcAddress('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemcpyAsync
 *             cuGetProcAddress('cuMemcpyAsync', &__cuMemcpyAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyPeerAsync
 *             cuGetProcAddress('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 472, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":474
 *             cuGetProcAddress('cuMemcpyAsync', &__cuMemcpyAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemcpyPeerAsync
 *             cuGetProcAddress('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyHtoDAsync_v2
 *             cuGetProcAddress('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 474, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":476
 *             cuGetProcAddress('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemcpyHtoDAsync_v2
 *             cuGetProcAddress('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyDtoHAsync_v2
 *             cuGetProcAddress('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 476, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":478
 *             cuGetProcAddress('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemcpyDtoHAsync_v2
 *             cuGetProcAddress('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyDtoDAsync_v2
 *             cuGetProcAddress('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 478, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":480
 *             cuGetProcAddress('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemcpyDtoDAsync_v2
 *             cuGetProcAddress('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyHtoAAsync_v2
 *             cuGetProcAddress('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 480, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":482
 *             cuGetProcAddress('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemcpyHtoAAsync_v2
 *             cuGetProcAddress('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyAtoHAsync_v2
 *             cuGetProcAddress('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 482, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":484
 *             cuGetProcAddress('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemcpyAtoHAsync_v2
 *             cuGetProcAddress('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemcpy2DAsync_v2
 *             cuGetProcAddress('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 484, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":486
 *             cuGetProcAddress('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemcpy2DAsync_v2
 *             cuGetProcAddress('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemcpy3DAsync_v2
 *             cuGetProcAddress('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 486, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":488
 *             cuGetProcAddress('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemcpy3DAsync_v2
 *             cuGetProcAddress('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemcpy3DPeerAsync
 *             cuGetProcAddress('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 488, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":490
 *             cuGetProcAddress('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemcpy3DPeerAsync
 *             cuGetProcAddress('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD8_v2
 *             cuGetProcAddress('cuMemsetD8', &__cuMemsetD8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 490, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":492
 *             cuGetProcAddress('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemsetD8_v2
 *             cuGetProcAddress('cuMemsetD8', &__cuMemsetD8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD16_v2
 *             cuGetProcAddress('cuMemsetD16', &__cuMemsetD16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 492, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":494
 *             cuGetProcAddress('cuMemsetD8', &__cuMemsetD8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemsetD16_v2
 *             cuGetProcAddress('cuMemsetD16', &__cuMemsetD16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD32_v2
 *             cuGetProcAddress('cuMemsetD32', &__cuMemsetD32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 494, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":496
 *             cuGetProcAddress('cuMemsetD16', &__cuMemsetD16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemsetD32_v2
 *             cuGetProcAddress('cuMemsetD32', &__cuMemsetD32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD2D8_v2
 *             cuGetProcAddress('cuMemsetD2D8', &__cuMemsetD2D8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 496, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":498
 *             cuGetProcAddress('cuMemsetD32', &__cuMemsetD32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemsetD2D8_v2
 *             cuGetProcAddress('cuMemsetD2D8', &__cuMemsetD2D8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD2D16_v2
 *             cuGetProcAddress('cuMemsetD2D16', &__cuMemsetD2D16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 498, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":500
 *             cuGetProcAddress('cuMemsetD2D8', &__cuMemsetD2D8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemsetD2D16_v2
 *             cuGetProcAddress('cuMemsetD2D16', &__cuMemsetD2D16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD2D32_v2
 *             cuGetProcAddress('cuMemsetD2D32', &__cuMemsetD2D32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 500, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":502
 *             cuGetProcAddress('cuMemsetD2D16', &__cuMemsetD2D16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemsetD2D32_v2
 *             cuGetProcAddress('cuMemsetD2D32', &__cuMemsetD2D32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD8Async
 *             cuGetProcAddress('cuMemsetD8Async', &__cuMemsetD8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 502, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":504
 *             cuGetProcAddress('cuMemsetD2D32', &__cuMemsetD2D32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemsetD8Async
 *             cuGetProcAddress('cuMemsetD8Async', &__cuMemsetD8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD16Async
 *             cuGetProcAddress('cuMemsetD16Async', &__cuMemsetD16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 504, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":506
 *             cuGetProcAddress('cuMemsetD8Async', &__cuMemsetD8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemsetD16Async
 *             cuGetProcAddress('cuMemsetD16Async', &__cuMemsetD16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD32Async
 *             cuGetProcAddress('cuMemsetD32Async', &__cuMemsetD32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 506, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":508
 *             cuGetProcAddress('cuMemsetD16Async', &__cuMemsetD16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemsetD32Async
 *             cuGetProcAddress('cuMemsetD32Async', &__cuMemsetD32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD2D8Async
 *             cuGetProcAddress('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 508, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":510
 *             cuGetProcAddress('cuMemsetD32Async', &__cuMemsetD32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemsetD2D8Async
 *             cuGetProcAddress('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD2D16Async
 *             cuGetProcAddress('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 510, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":512
 *             cuGetProcAddress('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemsetD2D16Async
 *             cuGetProcAddress('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD2D32Async
 *             cuGetProcAddress('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 512, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":514
 *             cuGetProcAddress('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemsetD2D32Async
 *             cuGetProcAddress('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemMapArrayAsync
 *             cuGetProcAddress('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 514, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":516
 *             cuGetProcAddress('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemMapArrayAsync
 *             cuGetProcAddress('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemFreeAsync
 *             cuGetProcAddress('cuMemFreeAsync', &__cuMemFreeAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 516, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":518
 *             cuGetProcAddress('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemFreeAsync
 *             cuGetProcAddress('cuMemFreeAsync', &__cuMemFreeAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemAllocAsync
 *             cuGetProcAddress('cuMemAllocAsync', &__cuMemAllocAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 518, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":520
 *             cuGetProcAddress('cuMemFreeAsync', &__cuMemFreeAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemAllocAsync
 *             cuGetProcAddress('cuMemAllocAsync', &__cuMemAllocAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemAllocFromPoolAsync
 *             cuGetProcAddress('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 520, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":522
 *             cuGetProcAddress('cuMemAllocAsync', &__cuMemAllocAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemAllocFromPoolAsync
 *             cuGetProcAddress('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuMemPrefetchAsync
 *             cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 522, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":524
 *             cuGetProcAddress('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuMemPrefetchAsync
 *             cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuStreamGetPriority
 *             cuGetProcAddress('cuStreamGetPriority', &__cuStreamGetPriority, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 524, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":526
 *             cuGetProcAddress('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuStreamGetPriority
 *             cuGetProcAddress('cuStreamGetPriority', &__cuStreamGetPriority, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuStreamGetFlags
 *             cuGetProcAddress('cuStreamGetFlags', &__cuStreamGetFlags, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 526, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":528
 *             cuGetProcAddress('cuStreamGetPriority', &__cuStreamGetPriority, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuStreamGetFlags
 *             cuGetProcAddress('cuStreamGetFlags', &__cuStreamGetFlags, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuStreamGetCtx
 *             cuGetProcAddress('cuStreamGetCtx', &__cuStreamGetCtx, 9020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 528, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":530
 *             cuGetProcAddress('cuStreamGetFlags', &__cuStreamGetFlags, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuStreamGetCtx
 *             cuGetProcAddress('cuStreamGetCtx', &__cuStreamGetCtx, 9020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuStreamWaitEvent
 *             cuGetProcAddress('cuStreamWaitEvent', &__cuStreamWaitEvent, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 530, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":532
 *             cuGetProcAddress('cuStreamGetCtx', &__cuStreamGetCtx, 9020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuStreamWaitEvent
 *             cuGetProcAddress('cuStreamWaitEvent', &__cuStreamWaitEvent, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuStreamAddCallback
 *             cuGetProcAddress('cuStreamAddCallback', &__cuStreamAddCallback, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 532, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":534
 *             cuGetProcAddress('cuStreamWaitEvent', &__cuStreamWaitEvent, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuStreamAddCallback
 *             cuGetProcAddress('cuStreamAddCallback', &__cuStreamAddCallback, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuStreamBeginCapture_v2
 *             cuGetProcAddress('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 534, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":536
 *             cuGetProcAddress('cuStreamAddCallback', &__cuStreamAddCallback, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuStreamBeginCapture_v2
 *             cuGetProcAddress('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuStreamEndCapture
 *             cuGetProcAddress('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 536, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":538
 *             cuGetProcAddress('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuStreamEndCapture
 *             cuGetProcAddress('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuStreamIsCapturing
 *             cuGetProcAddress('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 538, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":540
 *             cuGetProcAddress('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuStreamIsCapturing
 *             cuGetProcAddress('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuStreamGetCaptureInfo
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo, 10010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 540, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":542
 *             cuGetProcAddress('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuStreamGetCaptureInfo
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo, 10010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuStreamGetCaptureInfo_v2
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamGetCaptureInfo"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCaptureInfo), 0x271A, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 542, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":544
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo, 10010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuStreamGetCaptureInfo_v2
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuStreamUpdateCaptureDependencies
 *             cuGetProcAddress('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 544, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":546
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuStreamUpdateCaptureDependencies
 *             cuGetProcAddress('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuStreamAttachMemAsync
 *             cuGetProcAddress('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 546, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":548
 *             cuGetProcAddress('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuStreamAttachMemAsync
 *             cuGetProcAddress('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuStreamQuery
 *             cuGetProcAddress('cuStreamQuery', &__cuStreamQuery, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 548, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":550
 *             cuGetProcAddress('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuStreamQuery
 *             cuGetProcAddress('cuStreamQuery', &__cuStreamQuery, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuStreamSynchronize
 *             cuGetProcAddress('cuStreamSynchronize', &__cuStreamSynchronize, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 550, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":552
 *             cuGetProcAddress('cuStreamQuery', &__cuStreamQuery, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuStreamSynchronize
 *             cuGetProcAddress('cuStreamSynchronize', &__cuStreamSynchronize, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuStreamCopyAttributes
 *             cuGetProcAddress('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 552, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":554
 *             cuGetProcAddress('cuStreamSynchronize', &__cuStreamSynchronize, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuStreamCopyAttributes
 *             cuGetProcAddress('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuStreamGetAttribute
 *             cuGetProcAddress('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 554, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":556
 *             cuGetProcAddress('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuStreamGetAttribute
 *             cuGetProcAddress('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuStreamSetAttribute
 *             cuGetProcAddress('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 556, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":558
 *             cuGetProcAddress('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuStreamSetAttribute
 *             cuGetProcAddress('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuEventRecord
 *             cuGetProcAddress('cuEventRecord', &__cuEventRecord, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 558, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":560
 *             cuGetProcAddress('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuEventRecord
 *             cuGetProcAddress('cuEventRecord', &__cuEventRecord, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuEventRecordWithFlags
 *             cuGetProcAddress('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 560, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":562
 *             cuGetProcAddress('cuEventRecord', &__cuEventRecord, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuEventRecordWithFlags
 *             cuGetProcAddress('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuSignalExternalSemaphoresAsync
 *             cuGetProcAddress('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 562, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":564
 *             cuGetProcAddress('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuSignalExternalSemaphoresAsync
 *             cuGetProcAddress('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuWaitExternalSemaphoresAsync
 *             cuGetProcAddress('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 564, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":566
 *             cuGetProcAddress('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuWaitExternalSemaphoresAsync
 *             cuGetProcAddress('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuStreamWaitValue32
 *             cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 566, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":568
 *             cuGetProcAddress('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuStreamWaitValue32
 *             cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuStreamWaitValue64
 *             cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamWaitValue32"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue32), 0x1F40, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 568, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":570
 *             cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuStreamWaitValue64
 *             cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuStreamWriteValue32
 *             cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamWaitValue64"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue64), 0x2328, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 570, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":572
 *             cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuStreamWriteValue32
 *             cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuStreamWriteValue64
 *             cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamWriteValue32"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue32), 0x1F40, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 572, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":574
 *             cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuStreamWriteValue64
 *             cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuStreamBatchMemOp
 *             cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamWriteValue64"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue64), 0x2328, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 574, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":576
 *             cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuStreamBatchMemOp
 *             cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuStreamWaitValue32_v2
 *             cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamBatchMemOp"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamBatchMemOp), 0x1F40, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 576, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":578
 *             cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuStreamWaitValue32_v2
 *             cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuStreamWaitValue64_v2
 *             cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 578, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":580
 *             cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuStreamWaitValue64_v2
 *             cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuStreamWriteValue32_v2
 *             cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 580, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":582
 *             cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuStreamWriteValue32_v2
 *             cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuStreamWriteValue64_v2
 *             cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 582, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":584
 *             cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuStreamWriteValue64_v2
 *             cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuStreamBatchMemOp_v2
 *             cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 584, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":586
 *             cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuStreamBatchMemOp_v2
 *             cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuLaunchKernel
 *             cuGetProcAddress('cuLaunchKernel', &__cuLaunchKernel, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 586, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":588
 *             cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuLaunchKernel
 *             cuGetProcAddress('cuLaunchKernel', &__cuLaunchKernel, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuLaunchKernelEx
 *             cuGetProcAddress('cuLaunchKernelEx', &__cuLaunchKernelEx, 11060, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 588, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":590
 *             cuGetProcAddress('cuLaunchKernel', &__cuLaunchKernel, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuLaunchKernelEx
 *             cuGetProcAddress('cuLaunchKernelEx', &__cuLaunchKernelEx, 11060, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuLaunchCooperativeKernel
 *             cuGetProcAddress('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 590, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":592
 *             cuGetProcAddress('cuLaunchKernelEx', &__cuLaunchKernelEx, 11060, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuLaunchCooperativeKernel
 *             cuGetProcAddress('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuLaunchHostFunc
 *             cuGetProcAddress('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 592, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":594
 *             cuGetProcAddress('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuLaunchHostFunc
 *             cuGetProcAddress('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuGraphUpload
 *             cuGetProcAddress('cuGraphUpload', &__cuGraphUpload, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 594, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":596
 *             cuGetProcAddress('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuGraphUpload
 *             cuGetProcAddress('cuGraphUpload', &__cuGraphUpload, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuGraphLaunch
 *             cuGetProcAddress('cuGraphLaunch', &__cuGraphLaunch, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 596, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":598
 *             cuGetProcAddress('cuGraphUpload', &__cuGraphUpload, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuGraphLaunch
 *             cuGetProcAddress('cuGraphLaunch', &__cuGraphLaunch, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuGraphicsMapResources
 *             cuGetProcAddress('cuGraphicsMapResources', &__cuGraphicsMapResources, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 598, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":600
 *             cuGetProcAddress('cuGraphLaunch', &__cuGraphLaunch, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuGraphicsMapResources
 *             cuGetProcAddress('cuGraphicsMapResources', &__cuGraphicsMapResources, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *             global __cuGraphicsUnmapResources
 *             cuGetProcAddress('cuGraphicsUnmapResources', &__cuGraphicsUnmapResources, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 600, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":602
 *             cuGetProcAddress('cuGraphicsMapResources', &__cuGraphicsMapResources, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)
 *             global __cuGraphicsUnmapResources
 *             cuGetProcAddress('cuGraphicsUnmapResources', &__cuGraphicsUnmapResources, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM)             # <<<<<<<<<<<<<<
 *         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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 602, __pyx_L4_error)

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

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

        /* "cuda/_cuda/ccuda.pyx":607
 *             pass
 *             global __cuMemcpy
 *             cuGetProcAddress('cuMemcpy', &__cuMemcpy, 4000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyPeer
 *             cuGetProcAddress('cuMemcpyPeer', &__cuMemcpyPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpy"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpy), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT); 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('cuMemcpy', &__cuMemcpy, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuMemcpyPeer
 *             cuGetProcAddress('cuMemcpyPeer', &__cuMemcpyPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyHtoD_v2
 *             cuGetProcAddress('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuMemcpyPeer"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuMemcpyPeer), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT); 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('cuMemcpyPeer', &__cuMemcpyPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuMemcpyHtoD_v2
 *             cuGetProcAddress('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyDtoH_v2
 *             cuGetProcAddress('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); 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('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuMemcpyDtoH_v2
 *             cuGetProcAddress('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyDtoD_v2
 *             cuGetProcAddress('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); 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('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuMemcpyDtoD_v2
 *             cuGetProcAddress('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyDtoA_v2
 *             cuGetProcAddress('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); 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('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuMemcpyDtoA_v2
 *             cuGetProcAddress('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyAtoD_v2
 *             cuGetProcAddress('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); 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('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuMemcpyAtoD_v2
 *             cuGetProcAddress('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyHtoA_v2
 *             cuGetProcAddress('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); 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('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuMemcpyHtoA_v2
 *             cuGetProcAddress('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyAtoH_v2
 *             cuGetProcAddress('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); 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('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuMemcpyAtoH_v2
 *             cuGetProcAddress('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyAtoA_v2
 *             cuGetProcAddress('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 623, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":625
 *             cuGetProcAddress('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuMemcpyAtoA_v2
 *             cuGetProcAddress('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuMemcpy2D_v2
 *             cuGetProcAddress('cuMemcpy2D', &__cuMemcpy2D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 625, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":627
 *             cuGetProcAddress('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuMemcpy2D_v2
 *             cuGetProcAddress('cuMemcpy2D', &__cuMemcpy2D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuMemcpy2DUnaligned_v2
 *             cuGetProcAddress('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 627, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":629
 *             cuGetProcAddress('cuMemcpy2D', &__cuMemcpy2D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuMemcpy2DUnaligned_v2
 *             cuGetProcAddress('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuMemcpy3D_v2
 *             cuGetProcAddress('cuMemcpy3D', &__cuMemcpy3D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 629, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":631
 *             cuGetProcAddress('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuMemcpy3D_v2
 *             cuGetProcAddress('cuMemcpy3D', &__cuMemcpy3D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuMemcpy3DPeer
 *             cuGetProcAddress('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 631, __pyx_L4_error)

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

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

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

        /* "cuda/_cuda/ccuda.pyx":639
 *             cuGetProcAddress('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuMemcpyHtoDAsync_v2
 *             cuGetProcAddress('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyDtoHAsync_v2
 *             cuGetProcAddress('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 639, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":641
 *             cuGetProcAddress('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuMemcpyDtoHAsync_v2
 *             cuGetProcAddress('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyDtoDAsync_v2
 *             cuGetProcAddress('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 641, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":643
 *             cuGetProcAddress('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuMemcpyDtoDAsync_v2
 *             cuGetProcAddress('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyHtoAAsync_v2
 *             cuGetProcAddress('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 643, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":645
 *             cuGetProcAddress('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuMemcpyHtoAAsync_v2
 *             cuGetProcAddress('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuMemcpyAtoHAsync_v2
 *             cuGetProcAddress('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 645, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":647
 *             cuGetProcAddress('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuMemcpyAtoHAsync_v2
 *             cuGetProcAddress('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuMemcpy2DAsync_v2
 *             cuGetProcAddress('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 647, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":649
 *             cuGetProcAddress('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuMemcpy2DAsync_v2
 *             cuGetProcAddress('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuMemcpy3DAsync_v2
 *             cuGetProcAddress('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 649, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":651
 *             cuGetProcAddress('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuMemcpy3DAsync_v2
 *             cuGetProcAddress('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuMemcpy3DPeerAsync
 *             cuGetProcAddress('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 651, __pyx_L4_error)

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

        /* "cuda/_cuda/ccuda.pyx":655
 *             cuGetProcAddress('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuMemsetD8_v2
 *             cuGetProcAddress('cuMemsetD8', &__cuMemsetD8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD16_v2
 *             cuGetProcAddress('cuMemsetD16', &__cuMemsetD16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 655, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":657
 *             cuGetProcAddress('cuMemsetD8', &__cuMemsetD8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuMemsetD16_v2
 *             cuGetProcAddress('cuMemsetD16', &__cuMemsetD16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD32_v2
 *             cuGetProcAddress('cuMemsetD32', &__cuMemsetD32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 657, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":659
 *             cuGetProcAddress('cuMemsetD16', &__cuMemsetD16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuMemsetD32_v2
 *             cuGetProcAddress('cuMemsetD32', &__cuMemsetD32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD2D8_v2
 *             cuGetProcAddress('cuMemsetD2D8', &__cuMemsetD2D8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 659, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":661
 *             cuGetProcAddress('cuMemsetD32', &__cuMemsetD32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuMemsetD2D8_v2
 *             cuGetProcAddress('cuMemsetD2D8', &__cuMemsetD2D8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD2D16_v2
 *             cuGetProcAddress('cuMemsetD2D16', &__cuMemsetD2D16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 661, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":663
 *             cuGetProcAddress('cuMemsetD2D8', &__cuMemsetD2D8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuMemsetD2D16_v2
 *             cuGetProcAddress('cuMemsetD2D16', &__cuMemsetD2D16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD2D32_v2
 *             cuGetProcAddress('cuMemsetD2D32', &__cuMemsetD2D32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 663, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":665
 *             cuGetProcAddress('cuMemsetD2D16', &__cuMemsetD2D16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuMemsetD2D32_v2
 *             cuGetProcAddress('cuMemsetD2D32', &__cuMemsetD2D32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuMemsetD8Async
 *             cuGetProcAddress('cuMemsetD8Async', &__cuMemsetD8Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 665, __pyx_L4_error)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        /* "cuda/_cuda/ccuda.pyx":699
 *             cuGetProcAddress('cuStreamAddCallback', &__cuStreamAddCallback, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuStreamBeginCapture_v2
 *             cuGetProcAddress('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuStreamEndCapture
 *             cuGetProcAddress('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 699, __pyx_L4_error)

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

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

        /* "cuda/_cuda/ccuda.pyx":705
 *             cuGetProcAddress('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuStreamGetCaptureInfo
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo, 10010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuStreamGetCaptureInfo_v2
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamGetCaptureInfo"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCaptureInfo), 0x271A, CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 705, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":707
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo, 10010, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuStreamGetCaptureInfo_v2
 *             cuGetProcAddress('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuStreamUpdateCaptureDependencies
 *             cuGetProcAddress('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 707, __pyx_L4_error)

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

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

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

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

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

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

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

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

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

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

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

        /* "cuda/_cuda/ccuda.pyx":731
 *             cuGetProcAddress('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuStreamWaitValue32
 *             cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32, 8000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuStreamWaitValue64
 *             cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64, 9000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamWaitValue32"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue32), 0x1F40, CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 731, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":733
 *             cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuStreamWaitValue64
 *             cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64, 9000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuStreamWriteValue32
 *             cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamWaitValue64"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue64), 0x2328, CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 733, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":735
 *             cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64, 9000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuStreamWriteValue32
 *             cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32, 8000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuStreamWriteValue64
 *             cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64, 9000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamWriteValue32"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue32), 0x1F40, CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 735, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":737
 *             cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuStreamWriteValue64
 *             cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64, 9000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuStreamBatchMemOp
 *             cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamWriteValue64"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue64), 0x2328, CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 737, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":739
 *             cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64, 9000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuStreamBatchMemOp
 *             cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp, 8000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuStreamWaitValue32_v2
 *             cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuStreamBatchMemOp"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuStreamBatchMemOp), 0x1F40, CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 739, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":741
 *             cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp, 8000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuStreamWaitValue32_v2
 *             cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuStreamWaitValue64_v2
 *             cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 741, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":743
 *             cuGetProcAddress('cuStreamWaitValue32', &__cuStreamWaitValue32_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuStreamWaitValue64_v2
 *             cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuStreamWriteValue32_v2
 *             cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 743, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":745
 *             cuGetProcAddress('cuStreamWaitValue64', &__cuStreamWaitValue64_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuStreamWriteValue32_v2
 *             cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuStreamWriteValue64_v2
 *             cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 745, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":747
 *             cuGetProcAddress('cuStreamWriteValue32', &__cuStreamWriteValue32_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuStreamWriteValue64_v2
 *             cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuStreamBatchMemOp_v2
 *             cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 747, __pyx_L4_error)

        /* "cuda/_cuda/ccuda.pyx":749
 *             cuGetProcAddress('cuStreamWriteValue64', &__cuStreamWriteValue64_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuStreamBatchMemOp_v2
 *             cuGetProcAddress('cuStreamBatchMemOp', &__cuStreamBatchMemOp_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *             global __cuLaunchKernel
 *             cuGetProcAddress('cuLaunchKernel', &__cuLaunchKernel, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
        __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 749, __pyx_L4_error)

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

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

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

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

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

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

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

        /* "cuda/_cuda/ccuda.pyx":765
 *             cuGetProcAddress('cuGraphicsMapResources', &__cuGraphicsMapResources, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *             global __cuGraphicsUnmapResources
 *             cuGetProcAddress('cuGraphicsUnmapResources', &__cuGraphicsUnmapResources, 3000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         # 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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 765, __pyx_L4_error)
      }
      __pyx_L43:;

      /* "cuda/_cuda/ccuda.pyx":768
 *         # Get remaining functions
 *         global __cuGetErrorString
 *         cuGetProcAddress('cuGetErrorString', &__cuGetErrorString, 6000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuGetErrorName
 *         cuGetProcAddress('cuGetErrorName', &__cuGetErrorName, 6000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGetErrorString"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGetErrorString), 0x1770, CU_GET_PROC_ADDRESS_DEFAULT); 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('cuGetErrorString', &__cuGetErrorString, 6000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuGetErrorName
 *         cuGetProcAddress('cuGetErrorName', &__cuGetErrorName, 6000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuInit
 *         cuGetProcAddress('cuInit', &__cuInit, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGetErrorName"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGetErrorName), 0x1770, CU_GET_PROC_ADDRESS_DEFAULT); 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('cuGetErrorName', &__cuGetErrorName, 6000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuInit
 *         cuGetProcAddress('cuInit', &__cuInit, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuDriverGetVersion
 *         cuGetProcAddress('cuDriverGetVersion', &__cuDriverGetVersion, 2020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuInit"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuInit), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT); 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('cuInit', &__cuInit, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuDriverGetVersion
 *         cuGetProcAddress('cuDriverGetVersion', &__cuDriverGetVersion, 2020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuDeviceGet
 *         cuGetProcAddress('cuDeviceGet', &__cuDeviceGet, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDriverGetVersion"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDriverGetVersion), 0x7E4, CU_GET_PROC_ADDRESS_DEFAULT); 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('cuDriverGetVersion', &__cuDriverGetVersion, 2020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuDeviceGet
 *         cuGetProcAddress('cuDeviceGet', &__cuDeviceGet, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuDeviceGetCount
 *         cuGetProcAddress('cuDeviceGetCount', &__cuDeviceGetCount, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGet"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGet), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT); 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('cuDeviceGet', &__cuDeviceGet, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuDeviceGetCount
 *         cuGetProcAddress('cuDeviceGetCount', &__cuDeviceGetCount, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuDeviceGetName
 *         cuGetProcAddress('cuDeviceGetName', &__cuDeviceGetName, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetCount"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetCount), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT); 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('cuDeviceGetCount', &__cuDeviceGetCount, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuDeviceGetName
 *         cuGetProcAddress('cuDeviceGetName', &__cuDeviceGetName, 2000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuDeviceGetUuid
 *         cuGetProcAddress('cuDeviceGetUuid', &__cuDeviceGetUuid, 9020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuDeviceGetName"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetName), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 780, __pyx_L4_error)

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

      /* "cuda/_cuda/ccuda.pyx":784
 *         cuGetProcAddress('cuDeviceGetUuid', &__cuDeviceGetUuid, 9020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuDeviceGetUuid_v2
 *         cuGetProcAddress('cuDeviceGetUuid', &__cuDeviceGetUuid_v2, 11040, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuDeviceGetLuid
 *         cuGetProcAddress('cuDeviceGetLuid', &__cuDeviceGetLuid, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 784, __pyx_L4_error)

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

      /* "cuda/_cuda/ccuda.pyx":788
 *         cuGetProcAddress('cuDeviceGetLuid', &__cuDeviceGetLuid, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuDeviceTotalMem_v2
 *         cuGetProcAddress('cuDeviceTotalMem', &__cuDeviceTotalMem_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuDeviceGetTexture1DLinearMaxWidth
 *         cuGetProcAddress('cuDeviceGetTexture1DLinearMaxWidth', &__cuDeviceGetTexture1DLinearMaxWidth, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 788, __pyx_L4_error)

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

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

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

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

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

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

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

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

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

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

      /* "cuda/_cuda/ccuda.pyx":810
 *         cuGetProcAddress('cuDevicePrimaryCtxRetain', &__cuDevicePrimaryCtxRetain, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuDevicePrimaryCtxRelease_v2
 *         cuGetProcAddress('cuDevicePrimaryCtxRelease', &__cuDevicePrimaryCtxRelease_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuDevicePrimaryCtxSetFlags_v2
 *         cuGetProcAddress('cuDevicePrimaryCtxSetFlags', &__cuDevicePrimaryCtxSetFlags_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 810, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":812
 *         cuGetProcAddress('cuDevicePrimaryCtxRelease', &__cuDevicePrimaryCtxRelease_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuDevicePrimaryCtxSetFlags_v2
 *         cuGetProcAddress('cuDevicePrimaryCtxSetFlags', &__cuDevicePrimaryCtxSetFlags_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuDevicePrimaryCtxGetState
 *         cuGetProcAddress('cuDevicePrimaryCtxGetState', &__cuDevicePrimaryCtxGetState, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 812, __pyx_L4_error)

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

      /* "cuda/_cuda/ccuda.pyx":816
 *         cuGetProcAddress('cuDevicePrimaryCtxGetState', &__cuDevicePrimaryCtxGetState, 7000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuDevicePrimaryCtxReset_v2
 *         cuGetProcAddress('cuDevicePrimaryCtxReset', &__cuDevicePrimaryCtxReset_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuDeviceGetExecAffinitySupport
 *         cuGetProcAddress('cuDeviceGetExecAffinitySupport', &__cuDeviceGetExecAffinitySupport, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 816, __pyx_L4_error)

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

      /* "cuda/_cuda/ccuda.pyx":820
 *         cuGetProcAddress('cuDeviceGetExecAffinitySupport', &__cuDeviceGetExecAffinitySupport, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuCtxCreate_v2
 *         cuGetProcAddress('cuCtxCreate', &__cuCtxCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuCtxCreate_v3
 *         cuGetProcAddress('cuCtxCreate', &__cuCtxCreate_v3, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 820, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":822
 *         cuGetProcAddress('cuCtxCreate', &__cuCtxCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuCtxCreate_v3
 *         cuGetProcAddress('cuCtxCreate', &__cuCtxCreate_v3, 11040, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuCtxDestroy_v2
 *         cuGetProcAddress('cuCtxDestroy', &__cuCtxDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 822, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":824
 *         cuGetProcAddress('cuCtxCreate', &__cuCtxCreate_v3, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuCtxDestroy_v2
 *         cuGetProcAddress('cuCtxDestroy', &__cuCtxDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuCtxPushCurrent_v2
 *         cuGetProcAddress('cuCtxPushCurrent', &__cuCtxPushCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 824, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":826
 *         cuGetProcAddress('cuCtxDestroy', &__cuCtxDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuCtxPushCurrent_v2
 *         cuGetProcAddress('cuCtxPushCurrent', &__cuCtxPushCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuCtxPopCurrent_v2
 *         cuGetProcAddress('cuCtxPopCurrent', &__cuCtxPopCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 826, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":828
 *         cuGetProcAddress('cuCtxPushCurrent', &__cuCtxPushCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuCtxPopCurrent_v2
 *         cuGetProcAddress('cuCtxPopCurrent', &__cuCtxPopCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuCtxSetCurrent
 *         cuGetProcAddress('cuCtxSetCurrent', &__cuCtxSetCurrent, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 828, __pyx_L4_error)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      /* "cuda/_cuda/ccuda.pyx":878
 *         cuGetProcAddress('cuModuleGetFunction', &__cuModuleGetFunction, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuModuleGetGlobal_v2
 *         cuGetProcAddress('cuModuleGetGlobal', &__cuModuleGetGlobal_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuModuleGetTexRef
 *         cuGetProcAddress('cuModuleGetTexRef', &__cuModuleGetTexRef, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 878, __pyx_L4_error)

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

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

      /* "cuda/_cuda/ccuda.pyx":884
 *         cuGetProcAddress('cuModuleGetSurfRef', &__cuModuleGetSurfRef, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuLinkCreate_v2
 *         cuGetProcAddress('cuLinkCreate', &__cuLinkCreate_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuLinkAddData_v2
 *         cuGetProcAddress('cuLinkAddData', &__cuLinkAddData_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 884, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":886
 *         cuGetProcAddress('cuLinkCreate', &__cuLinkCreate_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuLinkAddData_v2
 *         cuGetProcAddress('cuLinkAddData', &__cuLinkAddData_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuLinkAddFile_v2
 *         cuGetProcAddress('cuLinkAddFile', &__cuLinkAddFile_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 886, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":888
 *         cuGetProcAddress('cuLinkAddData', &__cuLinkAddData_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuLinkAddFile_v2
 *         cuGetProcAddress('cuLinkAddFile', &__cuLinkAddFile_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuLinkComplete
 *         cuGetProcAddress('cuLinkComplete', &__cuLinkComplete, 5050, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 888, __pyx_L4_error)

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

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

      /* "cuda/_cuda/ccuda.pyx":894
 *         cuGetProcAddress('cuLinkDestroy', &__cuLinkDestroy, 5050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuMemGetInfo_v2
 *         cuGetProcAddress('cuMemGetInfo', &__cuMemGetInfo_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuMemAlloc_v2
 *         cuGetProcAddress('cuMemAlloc', &__cuMemAlloc_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 894, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":896
 *         cuGetProcAddress('cuMemGetInfo', &__cuMemGetInfo_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuMemAlloc_v2
 *         cuGetProcAddress('cuMemAlloc', &__cuMemAlloc_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuMemAllocPitch_v2
 *         cuGetProcAddress('cuMemAllocPitch', &__cuMemAllocPitch_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 896, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":898
 *         cuGetProcAddress('cuMemAlloc', &__cuMemAlloc_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuMemAllocPitch_v2
 *         cuGetProcAddress('cuMemAllocPitch', &__cuMemAllocPitch_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuMemFree_v2
 *         cuGetProcAddress('cuMemFree', &__cuMemFree_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 898, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":900
 *         cuGetProcAddress('cuMemAllocPitch', &__cuMemAllocPitch_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuMemFree_v2
 *         cuGetProcAddress('cuMemFree', &__cuMemFree_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuMemGetAddressRange_v2
 *         cuGetProcAddress('cuMemGetAddressRange', &__cuMemGetAddressRange_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 900, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":902
 *         cuGetProcAddress('cuMemFree', &__cuMemFree_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuMemGetAddressRange_v2
 *         cuGetProcAddress('cuMemGetAddressRange', &__cuMemGetAddressRange_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuMemAllocHost_v2
 *         cuGetProcAddress('cuMemAllocHost', &__cuMemAllocHost_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 902, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":904
 *         cuGetProcAddress('cuMemGetAddressRange', &__cuMemGetAddressRange_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuMemAllocHost_v2
 *         cuGetProcAddress('cuMemAllocHost', &__cuMemAllocHost_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuMemFreeHost
 *         cuGetProcAddress('cuMemFreeHost', &__cuMemFreeHost, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 904, __pyx_L4_error)

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

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

      /* "cuda/_cuda/ccuda.pyx":910
 *         cuGetProcAddress('cuMemHostAlloc', &__cuMemHostAlloc, 2020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuMemHostGetDevicePointer_v2
 *         cuGetProcAddress('cuMemHostGetDevicePointer', &__cuMemHostGetDevicePointer_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuMemHostGetFlags
 *         cuGetProcAddress('cuMemHostGetFlags', &__cuMemHostGetFlags, 2030, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 910, __pyx_L4_error)

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

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

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

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

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

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

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

      /* "cuda/_cuda/ccuda.pyx":926
 *         cuGetProcAddress('cuIpcGetMemHandle', &__cuIpcGetMemHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuIpcOpenMemHandle_v2
 *         cuGetProcAddress('cuIpcOpenMemHandle', &__cuIpcOpenMemHandle_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuIpcCloseMemHandle
 *         cuGetProcAddress('cuIpcCloseMemHandle', &__cuIpcCloseMemHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 926, __pyx_L4_error)

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

      /* "cuda/_cuda/ccuda.pyx":930
 *         cuGetProcAddress('cuIpcCloseMemHandle', &__cuIpcCloseMemHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuMemHostRegister_v2
 *         cuGetProcAddress('cuMemHostRegister', &__cuMemHostRegister_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuMemHostUnregister
 *         cuGetProcAddress('cuMemHostUnregister', &__cuMemHostUnregister, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 930, __pyx_L4_error)

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

      /* "cuda/_cuda/ccuda.pyx":934
 *         cuGetProcAddress('cuMemHostUnregister', &__cuMemHostUnregister, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuArrayCreate_v2
 *         cuGetProcAddress('cuArrayCreate', &__cuArrayCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuArrayGetDescriptor_v2
 *         cuGetProcAddress('cuArrayGetDescriptor', &__cuArrayGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 934, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":936
 *         cuGetProcAddress('cuArrayCreate', &__cuArrayCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuArrayGetDescriptor_v2
 *         cuGetProcAddress('cuArrayGetDescriptor', &__cuArrayGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuArrayGetSparseProperties
 *         cuGetProcAddress('cuArrayGetSparseProperties', &__cuArrayGetSparseProperties, 11010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 936, __pyx_L4_error)

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

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

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

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

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

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

      /* "cuda/_cuda/ccuda.pyx":950
 *         cuGetProcAddress('cuArrayDestroy', &__cuArrayDestroy, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuArray3DCreate_v2
 *         cuGetProcAddress('cuArray3DCreate', &__cuArray3DCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuArray3DGetDescriptor_v2
 *         cuGetProcAddress('cuArray3DGetDescriptor', &__cuArray3DGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 950, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":952
 *         cuGetProcAddress('cuArray3DCreate', &__cuArray3DCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuArray3DGetDescriptor_v2
 *         cuGetProcAddress('cuArray3DGetDescriptor', &__cuArray3DGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuMipmappedArrayCreate
 *         cuGetProcAddress('cuMipmappedArrayCreate', &__cuMipmappedArrayCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 952, __pyx_L4_error)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      /* "cuda/_cuda/ccuda.pyx":1028
 *         cuGetProcAddress('cuThreadExchangeStreamCaptureMode', &__cuThreadExchangeStreamCaptureMode, 10010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuStreamDestroy_v2
 *         cuGetProcAddress('cuStreamDestroy', &__cuStreamDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuEventCreate
 *         cuGetProcAddress('cuEventCreate', &__cuEventCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1028, __pyx_L4_error)

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

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

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

      /* "cuda/_cuda/ccuda.pyx":1036
 *         cuGetProcAddress('cuEventSynchronize', &__cuEventSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuEventDestroy_v2
 *         cuGetProcAddress('cuEventDestroy', &__cuEventDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuEventElapsedTime
 *         cuGetProcAddress('cuEventElapsedTime', &__cuEventElapsedTime, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1036, __pyx_L4_error)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      /* "cuda/_cuda/ccuda.pyx":1086
 *         cuGetProcAddress('cuGraphCreate', &__cuGraphCreate, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuGraphAddKernelNode
 *         cuGetProcAddress('cuGraphAddKernelNode', &__cuGraphAddKernelNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuGraphKernelNodeGetParams
 *         cuGetProcAddress('cuGraphKernelNodeGetParams', &__cuGraphKernelNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphAddKernelNode"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddKernelNode), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1086, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1088
 *         cuGetProcAddress('cuGraphAddKernelNode', &__cuGraphAddKernelNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuGraphKernelNodeGetParams
 *         cuGetProcAddress('cuGraphKernelNodeGetParams', &__cuGraphKernelNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuGraphKernelNodeSetParams
 *         cuGetProcAddress('cuGraphKernelNodeSetParams', &__cuGraphKernelNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphKernelNodeGetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeGetParams), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1088, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1090
 *         cuGetProcAddress('cuGraphKernelNodeGetParams', &__cuGraphKernelNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuGraphKernelNodeSetParams
 *         cuGetProcAddress('cuGraphKernelNodeSetParams', &__cuGraphKernelNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuGraphAddMemcpyNode
 *         cuGetProcAddress('cuGraphAddMemcpyNode', &__cuGraphAddMemcpyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphKernelNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeSetParams), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1090, __pyx_L4_error)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      /* "cuda/_cuda/ccuda.pyx":1184
 *         cuGetProcAddress('cuGraphDestroyNode', &__cuGraphDestroyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuGraphInstantiate_v2
 *         cuGetProcAddress('cuGraphInstantiate', &__cuGraphInstantiate_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuGraphInstantiateWithFlags
 *         cuGetProcAddress('cuGraphInstantiateWithFlags', &__cuGraphInstantiateWithFlags, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphInstantiate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphInstantiate_v2), 0x2AF8, CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1184, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1186
 *         cuGetProcAddress('cuGraphInstantiate', &__cuGraphInstantiate_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuGraphInstantiateWithFlags
 *         cuGetProcAddress('cuGraphInstantiateWithFlags', &__cuGraphInstantiateWithFlags, 11040, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuGraphExecKernelNodeSetParams
 *         cuGetProcAddress('cuGraphExecKernelNodeSetParams', &__cuGraphExecKernelNodeSetParams, 10010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphInstantiateWithFlags"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphInstantiateWithFlags), 0x2B20, CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1186, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1188
 *         cuGetProcAddress('cuGraphInstantiateWithFlags', &__cuGraphInstantiateWithFlags, 11040, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuGraphExecKernelNodeSetParams
 *         cuGetProcAddress('cuGraphExecKernelNodeSetParams', &__cuGraphExecKernelNodeSetParams, 10010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuGraphExecMemcpyNodeSetParams
 *         cuGetProcAddress('cuGraphExecMemcpyNodeSetParams', &__cuGraphExecMemcpyNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExecKernelNodeSetParams"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecKernelNodeSetParams), 0x271A, CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1188, __pyx_L4_error)

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

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

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

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

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

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

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

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

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

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

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

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

      /* "cuda/_cuda/ccuda.pyx":1214
 *         cuGetProcAddress('cuGraphDestroy', &__cuGraphDestroy, 10000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuGraphExecUpdate
 *         cuGetProcAddress('cuGraphExecUpdate', &__cuGraphExecUpdate, 10020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuGraphKernelNodeCopyAttributes
 *         cuGetProcAddress('cuGraphKernelNodeCopyAttributes', &__cuGraphKernelNodeCopyAttributes, 11000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGraphExecUpdate"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecUpdate), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1214, __pyx_L4_error)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      /* "cuda/_cuda/ccuda.pyx":1252
 *         cuGetProcAddress('cuTexRefSetMipmappedArray', &__cuTexRefSetMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuTexRefSetAddress_v2
 *         cuGetProcAddress('cuTexRefSetAddress', &__cuTexRefSetAddress_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuTexRefSetAddress2D_v3
 *         cuGetProcAddress('cuTexRefSetAddress2D', &__cuTexRefSetAddress2D_v3, 4010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1252, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1254
 *         cuGetProcAddress('cuTexRefSetAddress', &__cuTexRefSetAddress_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuTexRefSetAddress2D_v3
 *         cuGetProcAddress('cuTexRefSetAddress2D', &__cuTexRefSetAddress2D_v3, 4010, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuTexRefSetFormat
 *         cuGetProcAddress('cuTexRefSetFormat', &__cuTexRefSetFormat, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1254, __pyx_L4_error)

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

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

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

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

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

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

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

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

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

      /* "cuda/_cuda/ccuda.pyx":1274
 *         cuGetProcAddress('cuTexRefSetFlags', &__cuTexRefSetFlags, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuTexRefGetAddress_v2
 *         cuGetProcAddress('cuTexRefGetAddress', &__cuTexRefGetAddress_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuTexRefGetArray
 *         cuGetProcAddress('cuTexRefGetArray', &__cuTexRefGetArray, 2000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1274, __pyx_L4_error)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      /* "cuda/_cuda/ccuda.pyx":1336
 *         cuGetProcAddress('cuGraphicsResourceGetMappedMipmappedArray', &__cuGraphicsResourceGetMappedMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuGraphicsResourceGetMappedPointer_v2
 *         cuGetProcAddress('cuGraphicsResourceGetMappedPointer', &__cuGraphicsResourceGetMappedPointer_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuGraphicsResourceSetMapFlags_v2
 *         cuGetProcAddress('cuGraphicsResourceSetMapFlags', &__cuGraphicsResourceSetMapFlags_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1336, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1338
 *         cuGetProcAddress('cuGraphicsResourceGetMappedPointer', &__cuGraphicsResourceGetMappedPointer_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuGraphicsResourceSetMapFlags_v2
 *         cuGetProcAddress('cuGraphicsResourceSetMapFlags', &__cuGraphicsResourceSetMapFlags_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuGetProcAddress
 *         cuGetProcAddress('cuGetProcAddress', &__cuGetProcAddress, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1338, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1340
 *         cuGetProcAddress('cuGraphicsResourceSetMapFlags', &__cuGraphicsResourceSetMapFlags_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuGetProcAddress
 *         cuGetProcAddress('cuGetProcAddress', &__cuGetProcAddress, 11030, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuGetExportTable
 *         cuGetProcAddress('cuGetExportTable', &__cuGetExportTable, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGetProcAddress"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGetProcAddress), 0x2B16, CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1340, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1342
 *         cuGetProcAddress('cuGetProcAddress', &__cuGetProcAddress, 11030, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuGetExportTable
 *         cuGetProcAddress('cuGetExportTable', &__cuGetExportTable, 3000, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuProfilerInitialize
 *         cuGetProcAddress('cuProfilerInitialize', &__cuProfilerInitialize, 4000, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __pyx_t_22 = __pyx_f_4cuda_5ccuda_cuGetProcAddress(((char const *)"cuGetExportTable"), (&__pyx_v_4cuda_5_cuda_5ccuda___cuGetExportTable), 0xBB8, CU_GET_PROC_ADDRESS_DEFAULT); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1342, __pyx_L4_error)

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

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

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

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

      /* "cuda/_cuda/ccuda.pyx":1352
 *         cuGetProcAddress('cuVDPAUGetDevice', &__cuVDPAUGetDevice, 3010, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuVDPAUCtxCreate_v2
 *         cuGetProcAddress('cuVDPAUCtxCreate', &__cuVDPAUCtxCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         global __cuGraphicsVDPAURegisterVideoSurface
 *         cuGetProcAddress('cuGraphicsVDPAURegisterVideoSurface', &__cuGraphicsVDPAURegisterVideoSurface, 3010, CU_GET_PROC_ADDRESS_DEFAULT)
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1352, __pyx_L4_error)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      /* "cuda/_cuda/ccuda.pyx":1386
 *         cuGetProcAddress('cuGraphicsGLRegisterImage', &__cuGraphicsGLRegisterImage, 3000, CU_GET_PROC_ADDRESS_DEFAULT)
 *         global __cuGLGetDevices_v2
 *         cuGetProcAddress('cuGLGetDevices', &__cuGLGetDevices_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)             # <<<<<<<<<<<<<<
 *         return 0
 * 
 */
      __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); if (unlikely(__pyx_t_22 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1386, __pyx_L4_error)

      /* "cuda/_cuda/ccuda.pyx":1387
 *         global __cuGLGetDevices_v2
 *         cuGetProcAddress('cuGLGetDevices', &__cuGLGetDevices_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT)
 *         return 0             # <<<<<<<<<<<<<<
 * 
 *     # Load using win32GetAddr
 */
      __pyx_r = 0;
      goto __pyx_L3_return;

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

    /* "cuda/_cuda/ccuda.pyx":1390
 * 
 *     # 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":1391
 *     # 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":1394
 *             # 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":1396
 *             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, 1396, __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, 1396, __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, 1396, __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, 1396, __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, 1396, __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, 1396, __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, 1396, __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":1394
 *             # 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":1397
 *                 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":1399
 *             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":1401
 *             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, 1401, __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, 1401, __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, 1401, __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, 1401, __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, 1401, __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, 1401, __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, 1401, __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":1399
 *             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":1402
 *                 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":1404
 *             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":1406
 *             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, 1406, __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, 1406, __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, 1406, __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, 1406, __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, 1406, __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, 1406, __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, 1406, __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":1404
 *             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":1407
 *                 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":1409
 *             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":1411
 *             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, 1411, __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, 1411, __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, 1411, __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, 1411, __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, 1411, __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, 1411, __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, 1411, __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":1409
 *             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":1412
 *                 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":1414
 *             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":1416
 *             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, 1416, __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, 1416, __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, 1416, __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, 1416, __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, 1416, __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, 1416, __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, 1416, __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":1414
 *             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":1417
 *                 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":1419
 *             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":1421
 *             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, 1421, __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, 1421, __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, 1421, __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, 1421, __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, 1421, __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, 1421, __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, 1421, __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":1419
 *             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":1422
 *                 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":1424
 *             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":1426
 *             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, 1426, __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, 1426, __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, 1426, __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, 1426, __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, 1426, __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, 1426, __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, 1426, __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":1424
 *             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":1427
 *                 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":1429
 *             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":1431
 *             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, 1431, __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, 1431, __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, 1431, __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, 1431, __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, 1431, __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, 1431, __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, 1431, __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":1429
 *             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":1432
 *                 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":1434
 *             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":1436
 *             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, 1436, __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, 1436, __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, 1436, __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, 1436, __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, 1436, __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, 1436, __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, 1436, __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":1434
 *             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":1437
 *                 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":1439
 *             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":1441
 *             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, 1441, __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, 1441, __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, 1441, __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, 1441, __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, 1441, __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, 1441, __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, 1441, __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":1439
 *             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":1442
 *                 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":1444
 *             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":1446
 *             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, 1446, __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, 1446, __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, 1446, __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, 1446, __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, 1446, __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, 1446, __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, 1446, __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":1444
 *             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":1447
 *                 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":1449
 *             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":1451
 *             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, 1451, __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, 1451, __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, 1451, __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, 1451, __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, 1451, __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, 1451, __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, 1451, __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":1449
 *             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":1452
 *                 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":1454
 *             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":1456
 *             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, 1456, __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, 1456, __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, 1456, __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, 1456, __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, 1456, __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, 1456, __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, 1456, __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":1454
 *             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":1457
 *                 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":1459
 *             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":1461
 *             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, 1461, __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, 1461, __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, 1461, __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, 1461, __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, 1461, __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, 1461, __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, 1461, __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":1459
 *             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":1462
 *                 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":1464
 *             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":1466
 *             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, 1466, __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, 1466, __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, 1466, __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, 1466, __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, 1466, __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, 1466, __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, 1466, __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":1464
 *             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":1467
 *                 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":1469
 *             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":1471
 *             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, 1471, __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, 1471, __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, 1471, __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, 1471, __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, 1471, __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, 1471, __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, 1471, __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":1469
 *             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":1472
 *                 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":1474
 *             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":1476
 *             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, 1476, __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, 1476, __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, 1476, __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, 1476, __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, 1476, __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, 1476, __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, 1476, __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":1474
 *             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":1477
 *                 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":1479
 *             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":1481
 *             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, 1481, __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, 1481, __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, 1481, __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, 1481, __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, 1481, __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, 1481, __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, 1481, __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":1479
 *             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":1482
 *                 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":1484
 *             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":1486
 *             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, 1486, __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, 1486, __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, 1486, __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, 1486, __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, 1486, __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, 1486, __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, 1486, __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":1484
 *             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":1487
 *                 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":1489
 *             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":1491
 *             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, 1491, __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, 1491, __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, 1491, __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, 1491, __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, 1491, __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, 1491, __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, 1491, __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":1489
 *             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":1492
 *                 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":1494
 *             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":1496
 *             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, 1496, __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, 1496, __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, 1496, __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, 1496, __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, 1496, __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, 1496, __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, 1496, __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":1494
 *             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":1497
 *                 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":1499
 *             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":1501
 *             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, 1501, __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, 1501, __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, 1501, __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, 1501, __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, 1501, __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, 1501, __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, 1501, __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":1499
 *             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":1502
 *                 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":1504
 *             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":1506
 *             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, 1506, __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, 1506, __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, 1506, __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, 1506, __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, 1506, __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, 1506, __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, 1506, __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":1504
 *             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":1507
 *                 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":1509
 *             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":1511
 *             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, 1511, __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, 1511, __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, 1511, __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, 1511, __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, 1511, __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, 1511, __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, 1511, __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":1509
 *             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":1512
 *                 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":1514
 *             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":1516
 *             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, 1516, __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, 1516, __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, 1516, __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, 1516, __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, 1516, __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, 1516, __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, 1516, __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":1514
 *             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":1517
 *                 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":1519
 *             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":1521
 *             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, 1521, __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, 1521, __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, 1521, __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, 1521, __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, 1521, __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, 1521, __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, 1521, __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":1519
 *             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":1522
 *                 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":1524
 *             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":1526
 *             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, 1526, __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, 1526, __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, 1526, __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, 1526, __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, 1526, __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, 1526, __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, 1526, __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":1524
 *             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":1527
 *                 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":1529
 *             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":1531
 *             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, 1531, __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, 1531, __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, 1531, __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, 1531, __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, 1531, __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, 1531, __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, 1531, __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":1529
 *             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":1532
 *                 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":1534
 *             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":1536
 *             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, 1536, __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, 1536, __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, 1536, __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, 1536, __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, 1536, __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, 1536, __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, 1536, __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":1534
 *             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":1537
 *                 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":1539
 *             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":1541
 *             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, 1541, __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, 1541, __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, 1541, __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, 1541, __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, 1541, __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, 1541, __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, 1541, __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":1539
 *             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":1542
 *                 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":1544
 *             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":1546
 *             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, 1546, __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, 1546, __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, 1546, __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, 1546, __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, 1546, __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, 1546, __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, 1546, __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":1544
 *             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":1547
 *                 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":1549
 *             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":1551
 *             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, 1551, __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, 1551, __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, 1551, __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, 1551, __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, 1551, __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, 1551, __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, 1551, __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":1549
 *             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":1552
 *                 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":1554
 *             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":1556
 *             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, 1556, __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, 1556, __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, 1556, __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, 1556, __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, 1556, __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, 1556, __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, 1556, __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":1554
 *             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":1557
 *                 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":1559
 *             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":1561
 *             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, 1561, __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, 1561, __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, 1561, __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, 1561, __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, 1561, __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, 1561, __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, 1561, __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":1559
 *             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":1562
 *                 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":1564
 *             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":1566
 *             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, 1566, __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, 1566, __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, 1566, __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, 1566, __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, 1566, __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, 1566, __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, 1566, __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":1564
 *             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":1567
 *                 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":1569
 *             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":1571
 *             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, 1571, __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, 1571, __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, 1571, __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, 1571, __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, 1571, __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, 1571, __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, 1571, __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":1569
 *             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":1572
 *                 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":1574
 *             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":1576
 *             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, 1576, __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, 1576, __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, 1576, __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, 1576, __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, 1576, __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, 1576, __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, 1576, __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":1574
 *             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":1577
 *                 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":1579
 *             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":1581
 *             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, 1581, __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, 1581, __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, 1581, __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, 1581, __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, 1581, __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, 1581, __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, 1581, __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":1579
 *             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":1582
 *                 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":1584
 *             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":1586
 *             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, 1586, __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, 1586, __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, 1586, __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, 1586, __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, 1586, __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, 1586, __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, 1586, __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":1584
 *             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":1587
 *                 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":1589
 *             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":1591
 *             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, 1591, __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, 1591, __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, 1591, __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, 1591, __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, 1591, __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, 1591, __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, 1591, __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":1589
 *             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":1592
 *                 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":1594
 *             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":1596
 *             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, 1596, __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, 1596, __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, 1596, __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, 1596, __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, 1596, __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, 1596, __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, 1596, __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":1594
 *             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":1597
 *                 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":1599
 *             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_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":1601
 *             try:
 *                 global __cuStreamGetPriority
 *                 __cuStreamGetPriority = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetPriority_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1601, __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, 1601, __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_cuStreamGetPriority_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, 1601, __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_cuStreamGetPriority_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, 1601, __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, 1601, __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_cuStreamGetPriority_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamGetPriority_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamGetPriority_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1601, __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, 1601, __pyx_L294_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":1599
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetPriority
 *                 __cuStreamGetPriority = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetPriority_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":1602
 *                 global __cuStreamGetPriority
 *                 __cuStreamGetPriority = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetPriority_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":1604
 *             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_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":1606
 *             try:
 *                 global __cuStreamGetFlags
 *                 __cuStreamGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetFlags_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1606, __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, 1606, __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_cuStreamGetFlags_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, 1606, __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_cuStreamGetFlags_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, 1606, __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, 1606, __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_cuStreamGetFlags_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamGetFlags_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamGetFlags_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1606, __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, 1606, __pyx_L300_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":1604
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetFlags
 *                 __cuStreamGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetFlags_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":1607
 *                 global __cuStreamGetFlags
 *                 __cuStreamGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetFlags_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":1609
 *             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":1611
 *             try:
 *                 global __cuStreamGetCtx
 *                 __cuStreamGetCtx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCtx_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1611, __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, 1611, __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_cuStreamGetCtx_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, 1611, __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_cuStreamGetCtx_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, 1611, __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, 1611, __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_cuStreamGetCtx_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamGetCtx_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamGetCtx_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1611, __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, 1611, __pyx_L306_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":1609
 *             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_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":1612
 *                 global __cuStreamGetCtx
 *                 __cuStreamGetCtx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCtx_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":1614
 *             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":1616
 *             try:
 *                 global __cuStreamWaitEvent
 *                 __cuStreamWaitEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitEvent_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1616, __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, 1616, __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_cuStreamWaitEvent_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, 1616, __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_cuStreamWaitEvent_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, 1616, __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, 1616, __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_cuStreamWaitEvent_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamWaitEvent_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamWaitEvent_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1616, __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, 1616, __pyx_L312_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":1614
 *             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_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":1617
 *                 global __cuStreamWaitEvent
 *                 __cuStreamWaitEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitEvent_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":1619
 *             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":1621
 *             try:
 *                 global __cuStreamAddCallback
 *                 __cuStreamAddCallback = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamAddCallback_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1621, __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, 1621, __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_cuStreamAddCallback_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_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_cuStreamAddCallback_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_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, 1621, __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_cuStreamAddCallback_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamAddCallback_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamAddCallback_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1621, __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, 1621, __pyx_L318_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":1619
 *             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_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":1622
 *                 global __cuStreamAddCallback
 *                 __cuStreamAddCallback = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamAddCallback_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":1624
 *             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":1626
 *             try:
 *                 global __cuStreamBeginCapture_v2
 *                 __cuStreamBeginCapture_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBeginCapture_v2_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1626, __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, 1626, __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_cuStreamBeginCapture_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, 1626, __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_cuStreamBeginCapture_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, 1626, __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, 1626, __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_cuStreamBeginCapture_v2_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamBeginCapture_v2_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamBeginCapture_v2_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1626, __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, 1626, __pyx_L324_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":1624
 *             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_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":1627
 *                 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_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":1629
 *             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":1631
 *             try:
 *                 global __cuStreamEndCapture
 *                 __cuStreamEndCapture = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamEndCapture_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1631, __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, 1631, __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_cuStreamEndCapture_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_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_cuStreamEndCapture_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_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, 1631, __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_cuStreamEndCapture_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamEndCapture_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamEndCapture_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1631, __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, 1631, __pyx_L330_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":1629
 *             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_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":1632
 *                 global __cuStreamEndCapture
 *                 __cuStreamEndCapture = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamEndCapture_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":1634
 *             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":1636
 *             try:
 *                 global __cuStreamIsCapturing
 *                 __cuStreamIsCapturing = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamIsCapturing_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1636, __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, 1636, __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_cuStreamIsCapturing_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_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_cuStreamIsCapturing_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_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, 1636, __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_cuStreamIsCapturing_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamIsCapturing_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamIsCapturing_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1636, __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, 1636, __pyx_L336_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":1634
 *             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_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":1637
 *                 global __cuStreamIsCapturing
 *                 __cuStreamIsCapturing = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamIsCapturing_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":1639
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetCaptureInfo
 *                 __cuStreamGetCaptureInfo = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCaptureInfo_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":1641
 *             try:
 *                 global __cuStreamGetCaptureInfo
 *                 __cuStreamGetCaptureInfo = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCaptureInfo_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1641, __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, 1641, __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_cuStreamGetCaptureInfo_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_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_cuStreamGetCaptureInfo_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_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, 1641, __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_cuStreamGetCaptureInfo_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamGetCaptureInfo_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamGetCaptureInfo_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1641, __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, 1641, __pyx_L342_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCaptureInfo = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1639
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetCaptureInfo
 *                 __cuStreamGetCaptureInfo = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCaptureInfo_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":1642
 *                 global __cuStreamGetCaptureInfo
 *                 __cuStreamGetCaptureInfo = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCaptureInfo_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":1644
 *             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_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":1646
 *             try:
 *                 global __cuStreamGetCaptureInfo_v2
 *                 __cuStreamGetCaptureInfo_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCaptureInfo_v2_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1646, __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, 1646, __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_cuStreamGetCaptureInfo_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, 1646, __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_cuStreamGetCaptureInfo_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, 1646, __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, 1646, __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_cuStreamGetCaptureInfo_v2_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamGetCaptureInfo_v2_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamGetCaptureInfo_v2_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1646, __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, 1646, __pyx_L348_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":1644
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetCaptureInfo_v2
 *                 __cuStreamGetCaptureInfo_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCaptureInfo_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_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":1647
 *                 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_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":1649
 *             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_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":1651
 *             try:
 *                 global __cuStreamUpdateCaptureDependencies
 *                 __cuStreamUpdateCaptureDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamUpdateCaptureDependencies_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1651, __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, 1651, __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_cuStreamUpdateCaptureDependencie};
                  __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_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_cuStreamUpdateCaptureDependencie};
                  __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_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, 1651, __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_cuStreamUpdateCaptureDependencie);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamUpdateCaptureDependencie);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamUpdateCaptureDependencie);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1651, __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, 1651, __pyx_L354_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":1649
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamUpdateCaptureDependencies
 *                 __cuStreamUpdateCaptureDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamUpdateCaptureDependencies_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":1652
 *                 global __cuStreamUpdateCaptureDependencies
 *                 __cuStreamUpdateCaptureDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamUpdateCaptureDependencies_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":1654
 *             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_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":1656
 *             try:
 *                 global __cuStreamAttachMemAsync
 *                 __cuStreamAttachMemAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamAttachMemAsync_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1656, __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, 1656, __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_cuStreamAttachMemAsync_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_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_cuStreamAttachMemAsync_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_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, 1656, __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_cuStreamAttachMemAsync_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamAttachMemAsync_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamAttachMemAsync_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1656, __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, 1656, __pyx_L360_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":1654
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamAttachMemAsync
 *                 __cuStreamAttachMemAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamAttachMemAsync_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":1657
 *                 global __cuStreamAttachMemAsync
 *                 __cuStreamAttachMemAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamAttachMemAsync_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":1659
 *             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_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":1661
 *             try:
 *                 global __cuStreamQuery
 *                 __cuStreamQuery = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamQuery_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1661, __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, 1661, __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_cuStreamQuery_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_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_cuStreamQuery_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_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, 1661, __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_cuStreamQuery_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamQuery_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamQuery_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1661, __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, 1661, __pyx_L366_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":1659
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamQuery
 *                 __cuStreamQuery = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamQuery_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":1662
 *                 global __cuStreamQuery
 *                 __cuStreamQuery = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamQuery_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":1664
 *             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_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":1666
 *             try:
 *                 global __cuStreamSynchronize
 *                 __cuStreamSynchronize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamSynchronize_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1666, __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, 1666, __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_cuStreamSynchronize_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_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_cuStreamSynchronize_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_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, 1666, __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_cuStreamSynchronize_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamSynchronize_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamSynchronize_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1666, __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, 1666, __pyx_L372_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":1664
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamSynchronize
 *                 __cuStreamSynchronize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamSynchronize_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":1667
 *                 global __cuStreamSynchronize
 *                 __cuStreamSynchronize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamSynchronize_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":1669
 *             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_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":1671
 *             try:
 *                 global __cuStreamCopyAttributes
 *                 __cuStreamCopyAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamCopyAttributes_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1671, __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, 1671, __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_cuStreamCopyAttributes_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_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_cuStreamCopyAttributes_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_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, 1671, __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_cuStreamCopyAttributes_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamCopyAttributes_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamCopyAttributes_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1671, __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, 1671, __pyx_L378_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":1669
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamCopyAttributes
 *                 __cuStreamCopyAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamCopyAttributes_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":1672
 *                 global __cuStreamCopyAttributes
 *                 __cuStreamCopyAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamCopyAttributes_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":1674
 *             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_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":1676
 *             try:
 *                 global __cuStreamGetAttribute
 *                 __cuStreamGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetAttribute_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1676, __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, 1676, __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_cuStreamGetAttribute_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_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_cuStreamGetAttribute_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_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, 1676, __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_cuStreamGetAttribute_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamGetAttribute_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamGetAttribute_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1676, __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, 1676, __pyx_L384_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":1674
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetAttribute
 *                 __cuStreamGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetAttribute_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":1677
 *                 global __cuStreamGetAttribute
 *                 __cuStreamGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetAttribute_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":1679
 *             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_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":1681
 *             try:
 *                 global __cuStreamSetAttribute
 *                 __cuStreamSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamSetAttribute_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1681, __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, 1681, __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_cuStreamSetAttribute_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_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_cuStreamSetAttribute_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_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, 1681, __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_cuStreamSetAttribute_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamSetAttribute_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamSetAttribute_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1681, __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, 1681, __pyx_L390_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":1679
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamSetAttribute
 *                 __cuStreamSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamSetAttribute_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":1682
 *                 global __cuStreamSetAttribute
 *                 __cuStreamSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamSetAttribute_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":1684
 *             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_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":1686
 *             try:
 *                 global __cuEventRecord
 *                 __cuEventRecord = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventRecord_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1686, __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, 1686, __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_cuEventRecord_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_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_cuEventRecord_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_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, 1686, __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_cuEventRecord_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuEventRecord_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuEventRecord_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1686, __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, 1686, __pyx_L396_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":1684
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuEventRecord
 *                 __cuEventRecord = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventRecord_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":1687
 *                 global __cuEventRecord
 *                 __cuEventRecord = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventRecord_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":1689
 *             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_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":1691
 *             try:
 *                 global __cuEventRecordWithFlags
 *                 __cuEventRecordWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventRecordWithFlags_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1691, __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, 1691, __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_cuEventRecordWithFlags_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_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_cuEventRecordWithFlags_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_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, 1691, __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_cuEventRecordWithFlags_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuEventRecordWithFlags_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuEventRecordWithFlags_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1691, __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, 1691, __pyx_L402_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":1689
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuEventRecordWithFlags
 *                 __cuEventRecordWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventRecordWithFlags_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":1692
 *                 global __cuEventRecordWithFlags
 *                 __cuEventRecordWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventRecordWithFlags_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":1694
 *             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_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":1696
 *             try:
 *                 global __cuSignalExternalSemaphoresAsync
 *                 __cuSignalExternalSemaphoresAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSignalExternalSemaphoresAsync_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1696, __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, 1696, __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_cuSignalExternalSemaphoresAsync};
                  __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_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_cuSignalExternalSemaphoresAsync};
                  __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_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, 1696, __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_cuSignalExternalSemaphoresAsync);
                  __Pyx_GIVEREF(__pyx_n_u_cuSignalExternalSemaphoresAsync);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuSignalExternalSemaphoresAsync);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1696, __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, 1696, __pyx_L408_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":1694
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuSignalExternalSemaphoresAsync
 *                 __cuSignalExternalSemaphoresAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSignalExternalSemaphoresAsync_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":1697
 *                 global __cuSignalExternalSemaphoresAsync
 *                 __cuSignalExternalSemaphoresAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSignalExternalSemaphoresAsync_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":1699
 *             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_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":1701
 *             try:
 *                 global __cuWaitExternalSemaphoresAsync
 *                 __cuWaitExternalSemaphoresAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuWaitExternalSemaphoresAsync_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1701, __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, 1701, __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_cuWaitExternalSemaphoresAsync_pt};
                  __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_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_cuWaitExternalSemaphoresAsync_pt};
                  __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_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, 1701, __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_cuWaitExternalSemaphoresAsync_pt);
                  __Pyx_GIVEREF(__pyx_n_u_cuWaitExternalSemaphoresAsync_pt);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuWaitExternalSemaphoresAsync_pt);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1701, __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, 1701, __pyx_L414_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":1699
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuWaitExternalSemaphoresAsync
 *                 __cuWaitExternalSemaphoresAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuWaitExternalSemaphoresAsync_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":1702
 *                 global __cuWaitExternalSemaphoresAsync
 *                 __cuWaitExternalSemaphoresAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuWaitExternalSemaphoresAsync_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":1704
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWaitValue32
 *                 __cuStreamWaitValue32 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue32_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":1706
 *             try:
 *                 global __cuStreamWaitValue32
 *                 __cuStreamWaitValue32 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue32_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1706, __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, 1706, __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_cuStreamWaitValue32_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_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_cuStreamWaitValue32_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_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, 1706, __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_cuStreamWaitValue32_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamWaitValue32_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamWaitValue32_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1706, __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, 1706, __pyx_L420_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue32 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1704
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWaitValue32
 *                 __cuStreamWaitValue32 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue32_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":1707
 *                 global __cuStreamWaitValue32
 *                 __cuStreamWaitValue32 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue32_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":1709
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWaitValue64
 *                 __cuStreamWaitValue64 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue64_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":1711
 *             try:
 *                 global __cuStreamWaitValue64
 *                 __cuStreamWaitValue64 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue64_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1711, __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, 1711, __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_cuStreamWaitValue64_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_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_cuStreamWaitValue64_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_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, 1711, __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_cuStreamWaitValue64_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamWaitValue64_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamWaitValue64_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1711, __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, 1711, __pyx_L426_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue64 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1709
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWaitValue64
 *                 __cuStreamWaitValue64 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue64_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":1712
 *                 global __cuStreamWaitValue64
 *                 __cuStreamWaitValue64 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue64_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":1714
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWriteValue32
 *                 __cuStreamWriteValue32 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue32_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":1716
 *             try:
 *                 global __cuStreamWriteValue32
 *                 __cuStreamWriteValue32 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue32_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1716, __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, 1716, __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_cuStreamWriteValue32_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_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_cuStreamWriteValue32_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_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, 1716, __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_cuStreamWriteValue32_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamWriteValue32_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamWriteValue32_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1716, __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, 1716, __pyx_L432_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue32 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1714
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWriteValue32
 *                 __cuStreamWriteValue32 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue32_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":1717
 *                 global __cuStreamWriteValue32
 *                 __cuStreamWriteValue32 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue32_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":1719
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWriteValue64
 *                 __cuStreamWriteValue64 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue64_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":1721
 *             try:
 *                 global __cuStreamWriteValue64
 *                 __cuStreamWriteValue64 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue64_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1721, __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, 1721, __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_cuStreamWriteValue64_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_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_cuStreamWriteValue64_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_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, 1721, __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_cuStreamWriteValue64_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamWriteValue64_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamWriteValue64_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1721, __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, 1721, __pyx_L438_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue64 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1719
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWriteValue64
 *                 __cuStreamWriteValue64 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue64_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":1722
 *                 global __cuStreamWriteValue64
 *                 __cuStreamWriteValue64 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue64_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":1724
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamBatchMemOp
 *                 __cuStreamBatchMemOp = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBatchMemOp_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":1726
 *             try:
 *                 global __cuStreamBatchMemOp
 *                 __cuStreamBatchMemOp = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBatchMemOp_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1726, __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, 1726, __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_cuStreamBatchMemOp_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_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_cuStreamBatchMemOp_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_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, 1726, __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_cuStreamBatchMemOp_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamBatchMemOp_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamBatchMemOp_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1726, __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, 1726, __pyx_L444_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamBatchMemOp = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":1724
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamBatchMemOp
 *                 __cuStreamBatchMemOp = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBatchMemOp_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":1727
 *                 global __cuStreamBatchMemOp
 *                 __cuStreamBatchMemOp = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBatchMemOp_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":1729
 *             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":1731
 *             try:
 *                 global __cuStreamWaitValue32_v2
 *                 __cuStreamWaitValue32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue32_v2_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1731, __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, 1731, __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_cuStreamWaitValue32_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, 1731, __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_cuStreamWaitValue32_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, 1731, __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, 1731, __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_cuStreamWaitValue32_v2_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamWaitValue32_v2_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamWaitValue32_v2_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1731, __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, 1731, __pyx_L450_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":1729
 *             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_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":1732
 *                 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_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":1734
 *             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":1736
 *             try:
 *                 global __cuStreamWaitValue64_v2
 *                 __cuStreamWaitValue64_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue64_v2_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1736, __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, 1736, __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_cuStreamWaitValue64_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, 1736, __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_cuStreamWaitValue64_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, 1736, __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, 1736, __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_cuStreamWaitValue64_v2_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamWaitValue64_v2_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamWaitValue64_v2_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1736, __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, 1736, __pyx_L456_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":1734
 *             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_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":1737
 *                 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_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":1739
 *             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":1741
 *             try:
 *                 global __cuStreamWriteValue32_v2
 *                 __cuStreamWriteValue32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue32_v2_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1741, __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, 1741, __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_cuStreamWriteValue32_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, 1741, __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_cuStreamWriteValue32_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, 1741, __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, 1741, __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_cuStreamWriteValue32_v2_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamWriteValue32_v2_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamWriteValue32_v2_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1741, __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, 1741, __pyx_L462_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":1739
 *             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_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":1742
 *                 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_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":1744
 *             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":1746
 *             try:
 *                 global __cuStreamWriteValue64_v2
 *                 __cuStreamWriteValue64_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue64_v2_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1746, __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, 1746, __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_cuStreamWriteValue64_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, 1746, __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_cuStreamWriteValue64_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, 1746, __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, 1746, __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_cuStreamWriteValue64_v2_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamWriteValue64_v2_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamWriteValue64_v2_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1746, __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, 1746, __pyx_L468_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":1744
 *             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_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":1747
 *                 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_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":1749
 *             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":1751
 *             try:
 *                 global __cuStreamBatchMemOp_v2
 *                 __cuStreamBatchMemOp_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBatchMemOp_v2_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1751, __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, 1751, __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_cuStreamBatchMemOp_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, 1751, __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_cuStreamBatchMemOp_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, 1751, __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, 1751, __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_cuStreamBatchMemOp_v2_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamBatchMemOp_v2_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamBatchMemOp_v2_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1751, __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, 1751, __pyx_L474_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":1749
 *             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_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":1752
 *                 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_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":1754
 *             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":1756
 *             try:
 *                 global __cuLaunchKernel
 *                 __cuLaunchKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchKernel_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1756, __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, 1756, __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_cuLaunchKernel_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_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_cuLaunchKernel_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_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, 1756, __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_cuLaunchKernel_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuLaunchKernel_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuLaunchKernel_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1756, __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, 1756, __pyx_L480_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":1754
 *             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_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":1757
 *                 global __cuLaunchKernel
 *                 __cuLaunchKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchKernel_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":1759
 *             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":1761
 *             try:
 *                 global __cuLaunchKernelEx
 *                 __cuLaunchKernelEx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchKernelEx_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1761, __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, 1761, __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_cuLaunchKernelEx_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_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_cuLaunchKernelEx_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_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, 1761, __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_cuLaunchKernelEx_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuLaunchKernelEx_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuLaunchKernelEx_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1761, __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, 1761, __pyx_L486_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":1759
 *             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_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":1762
 *                 global __cuLaunchKernelEx
 *                 __cuLaunchKernelEx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchKernelEx_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":1764
 *             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":1766
 *             try:
 *                 global __cuLaunchCooperativeKernel
 *                 __cuLaunchCooperativeKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchCooperativeKernel_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1766, __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, 1766, __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_cuLaunchCooperativeKernel_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_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_cuLaunchCooperativeKernel_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_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, 1766, __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_cuLaunchCooperativeKernel_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuLaunchCooperativeKernel_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuLaunchCooperativeKernel_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1766, __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, 1766, __pyx_L492_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":1764
 *             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_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":1767
 *                 global __cuLaunchCooperativeKernel
 *                 __cuLaunchCooperativeKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchCooperativeKernel_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":1769
 *             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":1771
 *             try:
 *                 global __cuLaunchHostFunc
 *                 __cuLaunchHostFunc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchHostFunc_ptsz')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1771, __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, 1771, __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_cuLaunchHostFunc_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_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_cuLaunchHostFunc_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_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, 1771, __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_cuLaunchHostFunc_ptsz);
                  __Pyx_GIVEREF(__pyx_n_u_cuLaunchHostFunc_ptsz);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuLaunchHostFunc_ptsz);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1771, __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, 1771, __pyx_L498_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":1769
 *             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_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":1772
 *                 global __cuLaunchHostFunc
 *                 __cuLaunchHostFunc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchHostFunc_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":1774
 *             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_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":1776
 *             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, 1776, __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, 1776, __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_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, 1776, __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_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, 1776, __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, 1776, __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_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, 1776, __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, 1776, __pyx_L504_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":1774
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuGraphUpload
 *                 __cuGraphUpload = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphUpload_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":1777
 *                 global __cuGraphUpload
 *                 __cuGraphUpload = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphUpload_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*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":1779
 *             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_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":1781
 *             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, 1781, __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, 1781, __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_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, 1781, __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_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, 1781, __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, 1781, __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_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, 1781, __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, 1781, __pyx_L510_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":1779
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuGraphLaunch
 *                 __cuGraphLaunch = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphLaunch_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_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":1782
 *                 global __cuGraphLaunch
 *                 __cuGraphLaunch = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphLaunch_ptsz')
 *             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":1784
 *             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_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":1786
 *             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, 1786, __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, 1786, __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_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, 1786, __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_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, 1786, __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, 1786, __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_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, 1786, __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, 1786, __pyx_L516_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":1784
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuGraphicsMapResources
 *                 __cuGraphicsMapResources = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsMapResources_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_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":1787
 *                 global __cuGraphicsMapResources
 *                 __cuGraphicsMapResources = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsMapResources_ptsz')
 *             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":1789
 *             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_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":1791
 *             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, 1791, __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, 1791, __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_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, 1791, __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_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, 1791, __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, 1791, __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_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, 1791, __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, 1791, __pyx_L522_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":1789
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuGraphicsUnmapResources
 *                 __cuGraphicsUnmapResources = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsUnmapResources_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_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":1792
 *                 global __cuGraphicsUnmapResources
 *                 __cuGraphicsUnmapResources = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsUnmapResources_ptsz')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *         else:
 */
              /*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":1391
 *     # Load using win32GetAddr
 *     with gil:
 *         if usePTDS:             # <<<<<<<<<<<<<<
 *             # Get all PTDS version of functions
 *             pass
 */
            goto __pyx_L47;
          }

          /* "cuda/_cuda/ccuda.pyx":1796
 *         else:
 *             # Else get the regular version
 *             pass             # <<<<<<<<<<<<<<
 *             try:
 *                 global __cuMemcpy
 */
          /*else*/ {

            /* "cuda/_cuda/ccuda.pyx":1797
 *             # 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_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":1799
 *             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, 1799, __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, 1799, __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_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, 1799, __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_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, 1799, __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, 1799, __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_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, 1799, __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, 1799, __pyx_L528_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":1797
 *             # Else get the regular version
 *             pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy
 *                 __cuMemcpy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy')
 */
              }
              __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":1800
 *                 global __cuMemcpy
 *                 __cuMemcpy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy')
 *             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":1802
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyPeer
 *                 __cuMemcpyPeer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyPeer')
 */
            {
              __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":1804
 *             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, 1804, __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, 1804, __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_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, 1804, __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_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, 1804, __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, 1804, __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_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, 1804, __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, 1804, __pyx_L534_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":1802
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyPeer
 *                 __cuMemcpyPeer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyPeer')
 */
              }
              __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":1805
 *                 global __cuMemcpyPeer
 *                 __cuMemcpyPeer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyPeer')
 *             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":1807
 *             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_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":1809
 *             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, 1809, __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, 1809, __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_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, 1809, __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_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, 1809, __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, 1809, __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_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, 1809, __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, 1809, __pyx_L540_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":1807
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyHtoD_v2
 *                 __cuMemcpyHtoD_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoD_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":1810
 *                 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_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":1812
 *             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_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":1814
 *             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, 1814, __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, 1814, __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_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, 1814, __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_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, 1814, __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, 1814, __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_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, 1814, __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, 1814, __pyx_L546_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":1812
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyDtoH_v2
 *                 __cuMemcpyDtoH_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoH_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":1815
 *                 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_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":1817
 *             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_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":1819
 *             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, 1819, __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, 1819, __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_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, 1819, __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_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, 1819, __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, 1819, __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_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, 1819, __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, 1819, __pyx_L552_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":1817
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyDtoD_v2
 *                 __cuMemcpyDtoD_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoD_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":1820
 *                 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_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":1822
 *             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_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":1824
 *             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, 1824, __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, 1824, __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_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, 1824, __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_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, 1824, __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, 1824, __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_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, 1824, __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, 1824, __pyx_L558_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":1822
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyDtoA_v2
 *                 __cuMemcpyDtoA_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoA_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":1825
 *                 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_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":1827
 *             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_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":1829
 *             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, 1829, __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, 1829, __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_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, 1829, __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_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, 1829, __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, 1829, __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_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, 1829, __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, 1829, __pyx_L564_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":1827
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyAtoD_v2
 *                 __cuMemcpyAtoD_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoD_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":1830
 *                 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_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":1832
 *             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_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":1834
 *             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, 1834, __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, 1834, __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_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, 1834, __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_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, 1834, __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, 1834, __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_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, 1834, __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, 1834, __pyx_L570_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":1832
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyHtoA_v2
 *                 __cuMemcpyHtoA_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoA_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":1835
 *                 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_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":1837
 *             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_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":1839
 *             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, 1839, __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, 1839, __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_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, 1839, __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_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, 1839, __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, 1839, __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_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, 1839, __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, 1839, __pyx_L576_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":1837
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyAtoH_v2
 *                 __cuMemcpyAtoH_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoH_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":1840
 *                 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_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":1842
 *             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_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":1844
 *             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, 1844, __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, 1844, __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_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, 1844, __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_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, 1844, __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, 1844, __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_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, 1844, __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, 1844, __pyx_L582_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":1842
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyAtoA_v2
 *                 __cuMemcpyAtoA_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoA_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":1845
 *                 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_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":1847
 *             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_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":1849
 *             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, 1849, __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, 1849, __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_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, 1849, __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_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, 1849, __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, 1849, __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_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, 1849, __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, 1849, __pyx_L588_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":1847
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy2D_v2
 *                 __cuMemcpy2D_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy2D_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_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":1850
 *                 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_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":1852
 *             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_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":1854
 *             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, 1854, __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, 1854, __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_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, 1854, __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_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, 1854, __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, 1854, __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_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, 1854, __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, 1854, __pyx_L594_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":1852
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy2DUnaligned_v2
 *                 __cuMemcpy2DUnaligned_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy2DUnaligned_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_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":1855
 *                 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_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":1857
 *             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_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":1859
 *             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, 1859, __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, 1859, __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_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, 1859, __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_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, 1859, __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, 1859, __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_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, 1859, __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, 1859, __pyx_L600_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":1857
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy3D_v2
 *                 __cuMemcpy3D_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3D_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_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":1860
 *                 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_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":1862
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy3DPeer
 *                 __cuMemcpy3DPeer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DPeer')
 */
            {
              __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":1864
 *             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, 1864, __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, 1864, __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_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, 1864, __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_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, 1864, __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, 1864, __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_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, 1864, __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, 1864, __pyx_L606_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":1862
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy3DPeer
 *                 __cuMemcpy3DPeer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DPeer')
 */
              }
              __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":1865
 *                 global __cuMemcpy3DPeer
 *                 __cuMemcpy3DPeer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DPeer')
 *             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":1867
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyAsync
 *                 __cuMemcpyAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAsync')
 */
            {
              __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":1869
 *             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, 1869, __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, 1869, __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_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, 1869, __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_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, 1869, __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, 1869, __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_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, 1869, __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, 1869, __pyx_L612_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":1867
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyAsync
 *                 __cuMemcpyAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAsync')
 */
              }
              __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":1870
 *                 global __cuMemcpyAsync
 *                 __cuMemcpyAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAsync')
 *             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":1872
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyPeerAsync
 *                 __cuMemcpyPeerAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyPeerAsync')
 */
            {
              __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":1874
 *             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, 1874, __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, 1874, __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_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, 1874, __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_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, 1874, __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, 1874, __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_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, 1874, __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, 1874, __pyx_L618_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":1872
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyPeerAsync
 *                 __cuMemcpyPeerAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyPeerAsync')
 */
              }
              __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":1875
 *                 global __cuMemcpyPeerAsync
 *                 __cuMemcpyPeerAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyPeerAsync')
 *             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":1877
 *             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_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":1879
 *             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, 1879, __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, 1879, __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_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, 1879, __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_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, 1879, __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, 1879, __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_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, 1879, __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, 1879, __pyx_L624_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":1877
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyHtoDAsync_v2
 *                 __cuMemcpyHtoDAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoDAsync_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":1880
 *                 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_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":1882
 *             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_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":1884
 *             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, 1884, __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, 1884, __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_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, 1884, __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_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, 1884, __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, 1884, __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_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, 1884, __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, 1884, __pyx_L630_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":1882
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyDtoHAsync_v2
 *                 __cuMemcpyDtoHAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoHAsync_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":1885
 *                 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_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":1887
 *             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_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":1889
 *             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, 1889, __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, 1889, __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_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, 1889, __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_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, 1889, __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, 1889, __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_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, 1889, __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, 1889, __pyx_L636_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":1887
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyDtoDAsync_v2
 *                 __cuMemcpyDtoDAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyDtoDAsync_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":1890
 *                 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_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":1892
 *             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_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":1894
 *             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, 1894, __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, 1894, __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_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, 1894, __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_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, 1894, __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, 1894, __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_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, 1894, __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, 1894, __pyx_L642_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":1892
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyHtoAAsync_v2
 *                 __cuMemcpyHtoAAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyHtoAAsync_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":1895
 *                 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_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":1897
 *             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_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":1899
 *             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, 1899, __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, 1899, __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_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, 1899, __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_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, 1899, __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, 1899, __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_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, 1899, __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, 1899, __pyx_L648_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":1897
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpyAtoHAsync_v2
 *                 __cuMemcpyAtoHAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpyAtoHAsync_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_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":1900
 *                 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_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":1902
 *             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_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":1904
 *             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, 1904, __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, 1904, __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_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, 1904, __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_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, 1904, __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, 1904, __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_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, 1904, __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, 1904, __pyx_L654_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":1902
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy2DAsync_v2
 *                 __cuMemcpy2DAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy2DAsync_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":1905
 *                 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_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":1907
 *             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_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":1909
 *             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, 1909, __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, 1909, __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_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, 1909, __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_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, 1909, __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, 1909, __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_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, 1909, __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, 1909, __pyx_L660_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":1907
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy3DAsync_v2
 *                 __cuMemcpy3DAsync_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DAsync_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":1910
 *                 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_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":1912
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy3DPeerAsync
 *                 __cuMemcpy3DPeerAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DPeerAsync')
 */
            {
              __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":1914
 *             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, 1914, __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, 1914, __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_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, 1914, __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_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, 1914, __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, 1914, __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_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, 1914, __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, 1914, __pyx_L666_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":1912
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemcpy3DPeerAsync
 *                 __cuMemcpy3DPeerAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DPeerAsync')
 */
              }
              __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":1915
 *                 global __cuMemcpy3DPeerAsync
 *                 __cuMemcpy3DPeerAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemcpy3DPeerAsync')
 *             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":1917
 *             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_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":1919
 *             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, 1919, __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, 1919, __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_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, 1919, __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_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, 1919, __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, 1919, __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_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, 1919, __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, 1919, __pyx_L672_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":1917
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD8_v2
 *                 __cuMemsetD8_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD8_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":1920
 *                 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_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":1922
 *             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_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":1924
 *             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, 1924, __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, 1924, __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_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, 1924, __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_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, 1924, __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, 1924, __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_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, 1924, __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, 1924, __pyx_L678_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":1922
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD16_v2
 *                 __cuMemsetD16_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD16_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":1925
 *                 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_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":1927
 *             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_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":1929
 *             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, 1929, __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, 1929, __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_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, 1929, __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_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, 1929, __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, 1929, __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_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, 1929, __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, 1929, __pyx_L684_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":1927
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD32_v2
 *                 __cuMemsetD32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD32_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":1930
 *                 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_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":1932
 *             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_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":1934
 *             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, 1934, __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, 1934, __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_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, 1934, __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_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, 1934, __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, 1934, __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_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, 1934, __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, 1934, __pyx_L690_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":1932
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D8_v2
 *                 __cuMemsetD2D8_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D8_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_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":1935
 *                 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_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":1937
 *             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_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":1939
 *             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, 1939, __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, 1939, __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_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, 1939, __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_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, 1939, __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, 1939, __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_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, 1939, __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, 1939, __pyx_L696_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":1937
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D16_v2
 *                 __cuMemsetD2D16_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D16_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_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":1940
 *                 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_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":1942
 *             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_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":1944
 *             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, 1944, __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, 1944, __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_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, 1944, __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_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, 1944, __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, 1944, __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_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, 1944, __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, 1944, __pyx_L702_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":1942
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D32_v2
 *                 __cuMemsetD2D32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D32_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_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":1945
 *                 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_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":1947
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD8Async
 *                 __cuMemsetD8Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD8Async')
 */
            {
              __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":1949
 *             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, 1949, __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, 1949, __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_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, 1949, __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_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, 1949, __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, 1949, __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_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, 1949, __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, 1949, __pyx_L708_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":1947
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD8Async
 *                 __cuMemsetD8Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD8Async')
 */
              }
              __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":1950
 *                 global __cuMemsetD8Async
 *                 __cuMemsetD8Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD8Async')
 *             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":1952
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD16Async
 *                 __cuMemsetD16Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD16Async')
 */
            {
              __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":1954
 *             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, 1954, __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, 1954, __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_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, 1954, __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_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, 1954, __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, 1954, __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_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, 1954, __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, 1954, __pyx_L714_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":1952
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD16Async
 *                 __cuMemsetD16Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD16Async')
 */
              }
              __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":1955
 *                 global __cuMemsetD16Async
 *                 __cuMemsetD16Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD16Async')
 *             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":1957
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD32Async
 *                 __cuMemsetD32Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD32Async')
 */
            {
              __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":1959
 *             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, 1959, __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, 1959, __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_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, 1959, __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_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, 1959, __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, 1959, __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_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, 1959, __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, 1959, __pyx_L720_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":1957
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD32Async
 *                 __cuMemsetD32Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD32Async')
 */
              }
              __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":1960
 *                 global __cuMemsetD32Async
 *                 __cuMemsetD32Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD32Async')
 *             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":1962
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D8Async
 *                 __cuMemsetD2D8Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D8Async')
 */
            {
              __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":1964
 *             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, 1964, __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, 1964, __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_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, 1964, __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_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, 1964, __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, 1964, __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_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, 1964, __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, 1964, __pyx_L726_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":1962
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D8Async
 *                 __cuMemsetD2D8Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D8Async')
 */
              }
              __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":1965
 *                 global __cuMemsetD2D8Async
 *                 __cuMemsetD2D8Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D8Async')
 *             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":1967
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D16Async
 *                 __cuMemsetD2D16Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D16Async')
 */
            {
              __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":1969
 *             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, 1969, __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, 1969, __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_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, 1969, __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_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, 1969, __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, 1969, __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_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, 1969, __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, 1969, __pyx_L732_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":1967
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D16Async
 *                 __cuMemsetD2D16Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D16Async')
 */
              }
              __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":1970
 *                 global __cuMemsetD2D16Async
 *                 __cuMemsetD2D16Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D16Async')
 *             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":1972
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D32Async
 *                 __cuMemsetD2D32Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D32Async')
 */
            {
              __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":1974
 *             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, 1974, __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, 1974, __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_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, 1974, __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_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, 1974, __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, 1974, __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_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, 1974, __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, 1974, __pyx_L738_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":1972
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemsetD2D32Async
 *                 __cuMemsetD2D32Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D32Async')
 */
              }
              __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":1975
 *                 global __cuMemsetD2D32Async
 *                 __cuMemsetD2D32Async = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemsetD2D32Async')
 *             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":1977
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemMapArrayAsync
 *                 __cuMemMapArrayAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemMapArrayAsync')
 */
            {
              __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":1979
 *             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, 1979, __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, 1979, __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_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, 1979, __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_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, 1979, __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, 1979, __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_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, 1979, __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, 1979, __pyx_L744_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":1977
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemMapArrayAsync
 *                 __cuMemMapArrayAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemMapArrayAsync')
 */
              }
              __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":1980
 *                 global __cuMemMapArrayAsync
 *                 __cuMemMapArrayAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemMapArrayAsync')
 *             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":1982
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemFreeAsync
 *                 __cuMemFreeAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemFreeAsync')
 */
            {
              __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":1984
 *             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, 1984, __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, 1984, __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_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, 1984, __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_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, 1984, __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, 1984, __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_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, 1984, __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, 1984, __pyx_L750_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":1982
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemFreeAsync
 *                 __cuMemFreeAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemFreeAsync')
 */
              }
              __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":1985
 *                 global __cuMemFreeAsync
 *                 __cuMemFreeAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemFreeAsync')
 *             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":1987
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemAllocAsync
 *                 __cuMemAllocAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocAsync')
 */
            {
              __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":1989
 *             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, 1989, __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, 1989, __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_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, 1989, __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_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, 1989, __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, 1989, __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_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, 1989, __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, 1989, __pyx_L756_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":1987
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemAllocAsync
 *                 __cuMemAllocAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocAsync')
 */
              }
              __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":1990
 *                 global __cuMemAllocAsync
 *                 __cuMemAllocAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocAsync')
 *             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":1992
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemAllocFromPoolAsync
 *                 __cuMemAllocFromPoolAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocFromPoolAsync')
 */
            {
              __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":1994
 *             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, 1994, __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, 1994, __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_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, 1994, __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_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, 1994, __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, 1994, __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_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, 1994, __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, 1994, __pyx_L762_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":1992
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemAllocFromPoolAsync
 *                 __cuMemAllocFromPoolAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocFromPoolAsync')
 */
              }
              __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":1995
 *                 global __cuMemAllocFromPoolAsync
 *                 __cuMemAllocFromPoolAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocFromPoolAsync')
 *             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":1997
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemPrefetchAsync
 *                 __cuMemPrefetchAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPrefetchAsync')
 */
            {
              __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":1999
 *             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, 1999, __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, 1999, __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_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, 1999, __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_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, 1999, __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, 1999, __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_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, 1999, __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, 1999, __pyx_L768_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":1997
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuMemPrefetchAsync
 *                 __cuMemPrefetchAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPrefetchAsync')
 */
              }
              __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":2000
 *                 global __cuMemPrefetchAsync
 *                 __cuMemPrefetchAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPrefetchAsync')
 *             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":2002
 *             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":2004
 *             try:
 *                 global __cuStreamGetPriority
 *                 __cuStreamGetPriority = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetPriority')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2004, __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, 2004, __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_cuStreamGetPriority};
                  __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_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_cuStreamGetPriority};
                  __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_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, 2004, __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_cuStreamGetPriority);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamGetPriority);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamGetPriority);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2004, __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, 2004, __pyx_L774_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":2002
 *             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_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":2005
 *                 global __cuStreamGetPriority
 *                 __cuStreamGetPriority = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetPriority')
 *             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":2007
 *             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":2009
 *             try:
 *                 global __cuStreamGetFlags
 *                 __cuStreamGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetFlags')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2009, __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, 2009, __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_cuStreamGetFlags};
                  __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_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_cuStreamGetFlags};
                  __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_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, 2009, __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_cuStreamGetFlags);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamGetFlags);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamGetFlags);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2009, __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, 2009, __pyx_L780_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":2007
 *             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_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":2010
 *                 global __cuStreamGetFlags
 *                 __cuStreamGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetFlags')
 *             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":2012
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetCtx
 *                 __cuStreamGetCtx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCtx')
 */
            {
              __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":2014
 *             try:
 *                 global __cuStreamGetCtx
 *                 __cuStreamGetCtx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCtx')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2014, __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, 2014, __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_cuStreamGetCtx};
                  __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_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_cuStreamGetCtx};
                  __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_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, 2014, __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_cuStreamGetCtx);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamGetCtx);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamGetCtx);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2014, __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, 2014, __pyx_L786_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":2012
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetCtx
 *                 __cuStreamGetCtx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCtx')
 */
              }
              __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":2015
 *                 global __cuStreamGetCtx
 *                 __cuStreamGetCtx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCtx')
 *             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":2017
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWaitEvent
 *                 __cuStreamWaitEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitEvent')
 */
            {
              __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":2019
 *             try:
 *                 global __cuStreamWaitEvent
 *                 __cuStreamWaitEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitEvent')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2019, __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, 2019, __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_cuStreamWaitEvent};
                  __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_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_cuStreamWaitEvent};
                  __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_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, 2019, __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_cuStreamWaitEvent);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamWaitEvent);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamWaitEvent);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2019, __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, 2019, __pyx_L792_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":2017
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWaitEvent
 *                 __cuStreamWaitEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitEvent')
 */
              }
              __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":2020
 *                 global __cuStreamWaitEvent
 *                 __cuStreamWaitEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitEvent')
 *             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":2022
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamAddCallback
 *                 __cuStreamAddCallback = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamAddCallback')
 */
            {
              __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":2024
 *             try:
 *                 global __cuStreamAddCallback
 *                 __cuStreamAddCallback = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamAddCallback')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2024, __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, 2024, __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_cuStreamAddCallback};
                  __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_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_cuStreamAddCallback};
                  __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_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, 2024, __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_cuStreamAddCallback);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamAddCallback);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamAddCallback);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2024, __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, 2024, __pyx_L798_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":2022
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamAddCallback
 *                 __cuStreamAddCallback = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamAddCallback')
 */
              }
              __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":2025
 *                 global __cuStreamAddCallback
 *                 __cuStreamAddCallback = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamAddCallback')
 *             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":2027
 *             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_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":2029
 *             try:
 *                 global __cuStreamBeginCapture_v2
 *                 __cuStreamBeginCapture_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBeginCapture_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2029, __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, 2029, __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_cuStreamBeginCapture_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, 2029, __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_cuStreamBeginCapture_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, 2029, __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, 2029, __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_cuStreamBeginCapture_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamBeginCapture_v2);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamBeginCapture_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2029, __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, 2029, __pyx_L804_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":2027
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamBeginCapture_v2
 *                 __cuStreamBeginCapture_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBeginCapture_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_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":2030
 *                 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_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":2032
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamEndCapture
 *                 __cuStreamEndCapture = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamEndCapture')
 */
            {
              __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":2034
 *             try:
 *                 global __cuStreamEndCapture
 *                 __cuStreamEndCapture = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamEndCapture')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2034, __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, 2034, __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_cuStreamEndCapture};
                  __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_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_cuStreamEndCapture};
                  __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_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, 2034, __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_cuStreamEndCapture);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamEndCapture);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamEndCapture);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2034, __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, 2034, __pyx_L810_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":2032
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamEndCapture
 *                 __cuStreamEndCapture = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamEndCapture')
 */
              }
              __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":2035
 *                 global __cuStreamEndCapture
 *                 __cuStreamEndCapture = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamEndCapture')
 *             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":2037
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamIsCapturing
 *                 __cuStreamIsCapturing = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamIsCapturing')
 */
            {
              __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":2039
 *             try:
 *                 global __cuStreamIsCapturing
 *                 __cuStreamIsCapturing = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamIsCapturing')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2039, __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, 2039, __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_cuStreamIsCapturing};
                  __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_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_cuStreamIsCapturing};
                  __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_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, 2039, __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_cuStreamIsCapturing);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamIsCapturing);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamIsCapturing);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2039, __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, 2039, __pyx_L816_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":2037
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamIsCapturing
 *                 __cuStreamIsCapturing = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamIsCapturing')
 */
              }
              __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":2040
 *                 global __cuStreamIsCapturing
 *                 __cuStreamIsCapturing = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamIsCapturing')
 *             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":2042
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetCaptureInfo
 *                 __cuStreamGetCaptureInfo = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCaptureInfo')
 */
            {
              __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":2044
 *             try:
 *                 global __cuStreamGetCaptureInfo
 *                 __cuStreamGetCaptureInfo = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCaptureInfo')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2044, __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, 2044, __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_cuStreamGetCaptureInfo};
                  __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_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_cuStreamGetCaptureInfo};
                  __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_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, 2044, __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_cuStreamGetCaptureInfo);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamGetCaptureInfo);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamGetCaptureInfo);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2044, __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, 2044, __pyx_L822_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCaptureInfo = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2042
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamGetCaptureInfo
 *                 __cuStreamGetCaptureInfo = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCaptureInfo')
 */
              }
              __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":2045
 *                 global __cuStreamGetCaptureInfo
 *                 __cuStreamGetCaptureInfo = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCaptureInfo')
 *             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":2047
 *             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":2049
 *             try:
 *                 global __cuStreamGetCaptureInfo_v2
 *                 __cuStreamGetCaptureInfo_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetCaptureInfo_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2049, __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, 2049, __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_cuStreamGetCaptureInfo_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, 2049, __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_cuStreamGetCaptureInfo_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, 2049, __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, 2049, __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_cuStreamGetCaptureInfo_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamGetCaptureInfo_v2);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamGetCaptureInfo_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2049, __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, 2049, __pyx_L828_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":2047
 *             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_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":2050
 *                 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_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":2052
 *             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":2054
 *             try:
 *                 global __cuStreamUpdateCaptureDependencies
 *                 __cuStreamUpdateCaptureDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamUpdateCaptureDependencies')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2054, __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, 2054, __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_cuStreamUpdateCaptureDependencie_2};
                  __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_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_cuStreamUpdateCaptureDependencie_2};
                  __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_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, 2054, __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_cuStreamUpdateCaptureDependencie_2);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamUpdateCaptureDependencie_2);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamUpdateCaptureDependencie_2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2054, __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, 2054, __pyx_L834_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":2052
 *             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_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":2055
 *                 global __cuStreamUpdateCaptureDependencies
 *                 __cuStreamUpdateCaptureDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamUpdateCaptureDependencies')
 *             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":2057
 *             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":2059
 *             try:
 *                 global __cuStreamAttachMemAsync
 *                 __cuStreamAttachMemAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamAttachMemAsync')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2059, __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, 2059, __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_cuStreamAttachMemAsync};
                  __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_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_cuStreamAttachMemAsync};
                  __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_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, 2059, __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_cuStreamAttachMemAsync);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamAttachMemAsync);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamAttachMemAsync);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2059, __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, 2059, __pyx_L840_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":2057
 *             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_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":2060
 *                 global __cuStreamAttachMemAsync
 *                 __cuStreamAttachMemAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamAttachMemAsync')
 *             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":2062
 *             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":2064
 *             try:
 *                 global __cuStreamQuery
 *                 __cuStreamQuery = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamQuery')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2064, __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, 2064, __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_cuStreamQuery};
                  __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_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_cuStreamQuery};
                  __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_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, 2064, __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_cuStreamQuery);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamQuery);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamQuery);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2064, __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, 2064, __pyx_L846_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":2062
 *             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_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":2065
 *                 global __cuStreamQuery
 *                 __cuStreamQuery = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamQuery')
 *             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":2067
 *             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":2069
 *             try:
 *                 global __cuStreamSynchronize
 *                 __cuStreamSynchronize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamSynchronize')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2069, __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, 2069, __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_cuStreamSynchronize};
                  __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_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_cuStreamSynchronize};
                  __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_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, 2069, __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_cuStreamSynchronize);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamSynchronize);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamSynchronize);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2069, __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, 2069, __pyx_L852_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":2067
 *             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_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":2070
 *                 global __cuStreamSynchronize
 *                 __cuStreamSynchronize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamSynchronize')
 *             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":2072
 *             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":2074
 *             try:
 *                 global __cuStreamCopyAttributes
 *                 __cuStreamCopyAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamCopyAttributes')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2074, __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, 2074, __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_cuStreamCopyAttributes};
                  __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_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_cuStreamCopyAttributes};
                  __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_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, 2074, __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_cuStreamCopyAttributes);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamCopyAttributes);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamCopyAttributes);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2074, __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, 2074, __pyx_L858_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":2072
 *             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_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":2075
 *                 global __cuStreamCopyAttributes
 *                 __cuStreamCopyAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamCopyAttributes')
 *             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":2077
 *             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":2079
 *             try:
 *                 global __cuStreamGetAttribute
 *                 __cuStreamGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetAttribute')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2079, __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, 2079, __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_cuStreamGetAttribute};
                  __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_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_cuStreamGetAttribute};
                  __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_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, 2079, __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_cuStreamGetAttribute);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamGetAttribute);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamGetAttribute);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2079, __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, 2079, __pyx_L864_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":2077
 *             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_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":2080
 *                 global __cuStreamGetAttribute
 *                 __cuStreamGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamGetAttribute')
 *             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":2082
 *             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":2084
 *             try:
 *                 global __cuStreamSetAttribute
 *                 __cuStreamSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamSetAttribute')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2084, __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, 2084, __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_cuStreamSetAttribute};
                  __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_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_cuStreamSetAttribute};
                  __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_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, 2084, __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_cuStreamSetAttribute);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamSetAttribute);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamSetAttribute);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2084, __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, 2084, __pyx_L870_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":2082
 *             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_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":2085
 *                 global __cuStreamSetAttribute
 *                 __cuStreamSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamSetAttribute')
 *             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":2087
 *             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":2089
 *             try:
 *                 global __cuEventRecord
 *                 __cuEventRecord = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventRecord')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2089, __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, 2089, __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_cuEventRecord};
                  __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_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_cuEventRecord};
                  __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_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, 2089, __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_cuEventRecord);
                  __Pyx_GIVEREF(__pyx_n_u_cuEventRecord);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuEventRecord);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2089, __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, 2089, __pyx_L876_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":2087
 *             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_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":2090
 *                 global __cuEventRecord
 *                 __cuEventRecord = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventRecord')
 *             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":2092
 *             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":2094
 *             try:
 *                 global __cuEventRecordWithFlags
 *                 __cuEventRecordWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventRecordWithFlags')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2094, __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, 2094, __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_cuEventRecordWithFlags};
                  __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_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_cuEventRecordWithFlags};
                  __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_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, 2094, __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_cuEventRecordWithFlags);
                  __Pyx_GIVEREF(__pyx_n_u_cuEventRecordWithFlags);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuEventRecordWithFlags);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2094, __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, 2094, __pyx_L882_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":2092
 *             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_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":2095
 *                 global __cuEventRecordWithFlags
 *                 __cuEventRecordWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventRecordWithFlags')
 *             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":2097
 *             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":2099
 *             try:
 *                 global __cuSignalExternalSemaphoresAsync
 *                 __cuSignalExternalSemaphoresAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSignalExternalSemaphoresAsync')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2099, __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, 2099, __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_cuSignalExternalSemaphoresAsync_2};
                  __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_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_cuSignalExternalSemaphoresAsync_2};
                  __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_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, 2099, __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_cuSignalExternalSemaphoresAsync_2);
                  __Pyx_GIVEREF(__pyx_n_u_cuSignalExternalSemaphoresAsync_2);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuSignalExternalSemaphoresAsync_2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2099, __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, 2099, __pyx_L888_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":2097
 *             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_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":2100
 *                 global __cuSignalExternalSemaphoresAsync
 *                 __cuSignalExternalSemaphoresAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSignalExternalSemaphoresAsync')
 *             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":2102
 *             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":2104
 *             try:
 *                 global __cuWaitExternalSemaphoresAsync
 *                 __cuWaitExternalSemaphoresAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuWaitExternalSemaphoresAsync')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2104, __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, 2104, __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_cuWaitExternalSemaphoresAsync};
                  __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_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_cuWaitExternalSemaphoresAsync};
                  __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_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, 2104, __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_cuWaitExternalSemaphoresAsync);
                  __Pyx_GIVEREF(__pyx_n_u_cuWaitExternalSemaphoresAsync);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuWaitExternalSemaphoresAsync);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2104, __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, 2104, __pyx_L894_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":2102
 *             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_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":2105
 *                 global __cuWaitExternalSemaphoresAsync
 *                 __cuWaitExternalSemaphoresAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuWaitExternalSemaphoresAsync')
 *             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":2107
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWaitValue32
 *                 __cuStreamWaitValue32 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue32')
 */
            {
              __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":2109
 *             try:
 *                 global __cuStreamWaitValue32
 *                 __cuStreamWaitValue32 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue32')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2109, __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, 2109, __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_cuStreamWaitValue32};
                  __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_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_cuStreamWaitValue32};
                  __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_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, 2109, __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_cuStreamWaitValue32);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamWaitValue32);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamWaitValue32);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2109, __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, 2109, __pyx_L900_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue32 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2107
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWaitValue32
 *                 __cuStreamWaitValue32 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue32')
 */
              }
              __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":2110
 *                 global __cuStreamWaitValue32
 *                 __cuStreamWaitValue32 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue32')
 *             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":2112
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWaitValue64
 *                 __cuStreamWaitValue64 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue64')
 */
            {
              __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":2114
 *             try:
 *                 global __cuStreamWaitValue64
 *                 __cuStreamWaitValue64 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue64')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2114, __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, 2114, __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_cuStreamWaitValue64};
                  __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_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_cuStreamWaitValue64};
                  __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_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, 2114, __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_cuStreamWaitValue64);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamWaitValue64);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamWaitValue64);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2114, __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, 2114, __pyx_L906_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue64 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2112
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWaitValue64
 *                 __cuStreamWaitValue64 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue64')
 */
              }
              __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":2115
 *                 global __cuStreamWaitValue64
 *                 __cuStreamWaitValue64 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue64')
 *             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":2117
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWriteValue32
 *                 __cuStreamWriteValue32 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue32')
 */
            {
              __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":2119
 *             try:
 *                 global __cuStreamWriteValue32
 *                 __cuStreamWriteValue32 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue32')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2119, __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, 2119, __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_cuStreamWriteValue32};
                  __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_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_cuStreamWriteValue32};
                  __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_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, 2119, __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_cuStreamWriteValue32);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamWriteValue32);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamWriteValue32);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2119, __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, 2119, __pyx_L912_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue32 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2117
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWriteValue32
 *                 __cuStreamWriteValue32 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue32')
 */
              }
              __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":2120
 *                 global __cuStreamWriteValue32
 *                 __cuStreamWriteValue32 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue32')
 *             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":2122
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWriteValue64
 *                 __cuStreamWriteValue64 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue64')
 */
            {
              __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":2124
 *             try:
 *                 global __cuStreamWriteValue64
 *                 __cuStreamWriteValue64 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue64')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2124, __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, 2124, __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_cuStreamWriteValue64};
                  __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_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_cuStreamWriteValue64};
                  __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_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, 2124, __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_cuStreamWriteValue64);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamWriteValue64);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamWriteValue64);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2124, __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, 2124, __pyx_L918_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue64 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2122
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWriteValue64
 *                 __cuStreamWriteValue64 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue64')
 */
              }
              __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":2125
 *                 global __cuStreamWriteValue64
 *                 __cuStreamWriteValue64 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue64')
 *             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":2127
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamBatchMemOp
 *                 __cuStreamBatchMemOp = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBatchMemOp')
 */
            {
              __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":2129
 *             try:
 *                 global __cuStreamBatchMemOp
 *                 __cuStreamBatchMemOp = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBatchMemOp')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2129, __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, 2129, __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_cuStreamBatchMemOp};
                  __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_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_cuStreamBatchMemOp};
                  __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_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, 2129, __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_cuStreamBatchMemOp);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamBatchMemOp);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamBatchMemOp);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2129, __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, 2129, __pyx_L924_error)
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_v_4cuda_5_cuda_5ccuda___cuStreamBatchMemOp = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

                /* "cuda/_cuda/ccuda.pyx":2127
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamBatchMemOp
 *                 __cuStreamBatchMemOp = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBatchMemOp')
 */
              }
              __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":2130
 *                 global __cuStreamBatchMemOp
 *                 __cuStreamBatchMemOp = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBatchMemOp')
 *             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":2132
 *             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_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":2134
 *             try:
 *                 global __cuStreamWaitValue32_v2
 *                 __cuStreamWaitValue32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue32_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2134, __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, 2134, __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_cuStreamWaitValue32_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, 2134, __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_cuStreamWaitValue32_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, 2134, __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, 2134, __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_cuStreamWaitValue32_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamWaitValue32_v2);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamWaitValue32_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2134, __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, 2134, __pyx_L930_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":2132
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWaitValue32_v2
 *                 __cuStreamWaitValue32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue32_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_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":2135
 *                 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_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":2137
 *             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_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":2139
 *             try:
 *                 global __cuStreamWaitValue64_v2
 *                 __cuStreamWaitValue64_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue64_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2139, __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, 2139, __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_cuStreamWaitValue64_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, 2139, __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_cuStreamWaitValue64_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, 2139, __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, 2139, __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_cuStreamWaitValue64_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamWaitValue64_v2);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamWaitValue64_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2139, __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, 2139, __pyx_L936_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":2137
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWaitValue64_v2
 *                 __cuStreamWaitValue64_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWaitValue64_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_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":2140
 *                 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_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":2142
 *             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_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":2144
 *             try:
 *                 global __cuStreamWriteValue32_v2
 *                 __cuStreamWriteValue32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue32_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2144, __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, 2144, __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_cuStreamWriteValue32_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, 2144, __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_cuStreamWriteValue32_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, 2144, __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, 2144, __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_cuStreamWriteValue32_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamWriteValue32_v2);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuStreamWriteValue32_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2144, __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, 2144, __pyx_L942_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":2142
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWriteValue32_v2
 *                 __cuStreamWriteValue32_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue32_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_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":2145
 *                 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_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":2147
 *             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_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":2149
 *             try:
 *                 global __cuStreamWriteValue64_v2
 *                 __cuStreamWriteValue64_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue64_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2149, __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, 2149, __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_cuStreamWriteValue64_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, 2149, __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_cuStreamWriteValue64_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, 2149, __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, 2149, __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_cuStreamWriteValue64_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamWriteValue64_v2);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuStreamWriteValue64_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2149, __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, 2149, __pyx_L948_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":2147
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamWriteValue64_v2
 *                 __cuStreamWriteValue64_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamWriteValue64_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_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":2150
 *                 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_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":2152
 *             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_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":2154
 *             try:
 *                 global __cuStreamBatchMemOp_v2
 *                 __cuStreamBatchMemOp_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBatchMemOp_v2')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2154, __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, 2154, __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_cuStreamBatchMemOp_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, 2154, __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_cuStreamBatchMemOp_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, 2154, __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, 2154, __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_cuStreamBatchMemOp_v2);
                  __Pyx_GIVEREF(__pyx_n_u_cuStreamBatchMemOp_v2);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuStreamBatchMemOp_v2);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2154, __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, 2154, __pyx_L954_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":2152
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuStreamBatchMemOp_v2
 *                 __cuStreamBatchMemOp_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamBatchMemOp_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_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":2155
 *                 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_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":2157
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuLaunchKernel
 *                 __cuLaunchKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchKernel')
 */
            {
              __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":2159
 *             try:
 *                 global __cuLaunchKernel
 *                 __cuLaunchKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchKernel')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2159, __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, 2159, __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_cuLaunchKernel};
                  __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_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_cuLaunchKernel};
                  __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_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, 2159, __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_cuLaunchKernel);
                  __Pyx_GIVEREF(__pyx_n_u_cuLaunchKernel);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuLaunchKernel);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2159, __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, 2159, __pyx_L960_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":2157
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuLaunchKernel
 *                 __cuLaunchKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchKernel')
 */
              }
              __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":2160
 *                 global __cuLaunchKernel
 *                 __cuLaunchKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchKernel')
 *             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":2162
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuLaunchKernelEx
 *                 __cuLaunchKernelEx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchKernelEx')
 */
            {
              __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":2164
 *             try:
 *                 global __cuLaunchKernelEx
 *                 __cuLaunchKernelEx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchKernelEx')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2164, __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, 2164, __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_cuLaunchKernelEx};
                  __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_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_cuLaunchKernelEx};
                  __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_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, 2164, __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_cuLaunchKernelEx);
                  __Pyx_GIVEREF(__pyx_n_u_cuLaunchKernelEx);
                  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuLaunchKernelEx);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2164, __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, 2164, __pyx_L966_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":2162
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuLaunchKernelEx
 *                 __cuLaunchKernelEx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchKernelEx')
 */
              }
              __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":2165
 *                 global __cuLaunchKernelEx
 *                 __cuLaunchKernelEx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchKernelEx')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *             try:
 */
              /*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:;
            }

            /* "cuda/_cuda/ccuda.pyx":2167
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuLaunchCooperativeKernel
 *                 __cuLaunchCooperativeKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchCooperativeKernel')
 */
            {
              __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":2169
 *             try:
 *                 global __cuLaunchCooperativeKernel
 *                 __cuLaunchCooperativeKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchCooperativeKernel')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2169, __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, 2169, __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_cuLaunchCooperativeKernel};
                  __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_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_cuLaunchCooperativeKernel};
                  __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_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, 2169, __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_cuLaunchCooperativeKernel);
                  __Pyx_GIVEREF(__pyx_n_u_cuLaunchCooperativeKernel);
                  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuLaunchCooperativeKernel);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2169, __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, 2169, __pyx_L972_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":2167
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuLaunchCooperativeKernel
 *                 __cuLaunchCooperativeKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchCooperativeKernel')
 */
              }
              __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":2170
 *                 global __cuLaunchCooperativeKernel
 *                 __cuLaunchCooperativeKernel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchCooperativeKernel')
 *             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":2172
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuLaunchHostFunc
 *                 __cuLaunchHostFunc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchHostFunc')
 */
            {
              __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":2174
 *             try:
 *                 global __cuLaunchHostFunc
 *                 __cuLaunchHostFunc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchHostFunc')             # <<<<<<<<<<<<<<
 *             except:
 *                 pass
 */
                __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2174, __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, 2174, __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_cuLaunchHostFunc};
                  __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_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_cuLaunchHostFunc};
                  __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_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, 2174, __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_cuLaunchHostFunc);
                  __Pyx_GIVEREF(__pyx_n_u_cuLaunchHostFunc);
                  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuLaunchHostFunc);
                  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2174, __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, 2174, __pyx_L978_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":2172
 *             except:
 *                 pass
 *             try:             # <<<<<<<<<<<<<<
 *                 global __cuLaunchHostFunc
 *                 __cuLaunchHostFunc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchHostFunc')
 */
              }
              __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":2175
 *                 global __cuLaunchHostFunc
 *                 __cuLaunchHostFunc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchHostFunc')
 *             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":2177
 *             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":2179
 *             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, 2179, __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, 2179, __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_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, 2179, __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_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, 2179, __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, 2179, __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_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, 2179, __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, 2179, __pyx_L984_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":2177
 *             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_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":2180
 *                 global __cuGraphUpload
 *                 __cuGraphUpload = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphUpload')
 *             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":2182
 *             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":2184
 *             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, 2184, __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, 2184, __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_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, 2184, __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_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, 2184, __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, 2184, __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_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, 2184, __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, 2184, __pyx_L990_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":2182
 *             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_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":2185
 *                 global __cuGraphLaunch
 *                 __cuGraphLaunch = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphLaunch')
 *             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":2187
 *             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":2189
 *             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, 2189, __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, 2189, __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_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, 2189, __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_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, 2189, __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, 2189, __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_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, 2189, __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, 2189, __pyx_L996_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":2187
 *             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_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":2190
 *                 global __cuGraphicsMapResources
 *                 __cuGraphicsMapResources = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsMapResources')
 *             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":2192
 *             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":2194
 *             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, 2194, __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, 2194, __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_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, 2194, __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_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, 2194, __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, 2194, __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_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, 2194, __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, 2194, __pyx_L1002_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":2192
 *             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_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":2195
 *                 global __cuGraphicsUnmapResources
 *                 __cuGraphicsUnmapResources = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsUnmapResources')
 *             except:             # <<<<<<<<<<<<<<
 *                 pass
 *         # Get remaining functions
 */
              /*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:;
            }
          }
          __pyx_L47:;

          /* "cuda/_cuda/ccuda.pyx":2198
 *                 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":2200
 *         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, 2200, __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, 2200, __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_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, 2200, __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_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, 2200, __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, 2200, __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_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, 2200, __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, 2200, __pyx_L1008_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":2198
 *                 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_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":2201
 *             global __cuGetErrorString
 *             __cuGetErrorString = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetErrorString')
 *         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":2203
 *         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":2205
 *         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, 2205, __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, 2205, __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_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, 2205, __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_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, 2205, __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, 2205, __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_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, 2205, __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, 2205, __pyx_L1014_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":2203
 *         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_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":2206
 *             global __cuGetErrorName
 *             __cuGetErrorName = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetErrorName')
 *         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":2208
 *         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":2210
 *         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, 2210, __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, 2210, __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_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, 2210, __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_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, 2210, __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, 2210, __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_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, 2210, __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, 2210, __pyx_L1020_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":2208
 *         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_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":2211
 *             global __cuInit
 *             __cuInit = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuInit')
 *         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":2213
 *         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":2215
 *         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, 2215, __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, 2215, __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_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, 2215, __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_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, 2215, __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, 2215, __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_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, 2215, __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, 2215, __pyx_L1026_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":2213
 *         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_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":2216
 *             global __cuDriverGetVersion
 *             __cuDriverGetVersion = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDriverGetVersion')
 *         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":2218
 *         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":2220
 *         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, 2220, __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, 2220, __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_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, 2220, __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_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, 2220, __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, 2220, __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_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, 2220, __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, 2220, __pyx_L1032_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":2218
 *         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_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":2221
 *             global __cuDeviceGet
 *             __cuDeviceGet = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGet')
 *         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":2223
 *         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":2225
 *         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, 2225, __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, 2225, __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_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, 2225, __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_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, 2225, __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, 2225, __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_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, 2225, __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, 2225, __pyx_L1038_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":2223
 *         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_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":2226
 *             global __cuDeviceGetCount
 *             __cuDeviceGetCount = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetCount')
 *         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":2228
 *         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":2230
 *         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, 2230, __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, 2230, __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_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, 2230, __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_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, 2230, __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, 2230, __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_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, 2230, __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, 2230, __pyx_L1044_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":2228
 *         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_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":2231
 *             global __cuDeviceGetName
 *             __cuDeviceGetName = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetName')
 *         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":2233
 *         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":2235
 *         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, 2235, __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, 2235, __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_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, 2235, __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_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, 2235, __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, 2235, __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_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, 2235, __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, 2235, __pyx_L1050_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":2233
 *         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_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":2236
 *             global __cuDeviceGetUuid
 *             __cuDeviceGetUuid = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetUuid')
 *         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":2238
 *         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":2240
 *         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, 2240, __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, 2240, __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_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, 2240, __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_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, 2240, __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, 2240, __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_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, 2240, __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, 2240, __pyx_L1056_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":2238
 *         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_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":2241
 *             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_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":2243
 *         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":2245
 *         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, 2245, __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, 2245, __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_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, 2245, __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_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, 2245, __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, 2245, __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_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, 2245, __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, 2245, __pyx_L1062_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":2243
 *         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_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":2246
 *             global __cuDeviceGetLuid
 *             __cuDeviceGetLuid = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetLuid')
 *         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":2248
 *         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":2250
 *         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, 2250, __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, 2250, __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_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, 2250, __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_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, 2250, __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, 2250, __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_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, 2250, __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, 2250, __pyx_L1068_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":2248
 *         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_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":2251
 *             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_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":2253
 *         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":2255
 *         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, 2255, __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, 2255, __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_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, 2255, __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_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, 2255, __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, 2255, __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_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, 2255, __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, 2255, __pyx_L1074_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":2253
 *         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_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":2256
 *             global __cuDeviceGetTexture1DLinearMaxWidth
 *             __cuDeviceGetTexture1DLinearMaxWidth = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetTexture1DLinearMaxWidth')
 *         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":2258
 *         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":2260
 *         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, 2260, __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, 2260, __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_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, 2260, __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_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, 2260, __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, 2260, __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_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, 2260, __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, 2260, __pyx_L1080_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":2258
 *         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_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":2261
 *             global __cuDeviceGetAttribute
 *             __cuDeviceGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetAttribute')
 *         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":2263
 *         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":2265
 *         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, 2265, __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, 2265, __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_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, 2265, __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_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, 2265, __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, 2265, __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_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, 2265, __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, 2265, __pyx_L1086_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":2263
 *         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_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":2266
 *             global __cuDeviceGetNvSciSyncAttributes
 *             __cuDeviceGetNvSciSyncAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetNvSciSyncAttributes')
 *         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":2268
 *         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":2270
 *         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, 2270, __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, 2270, __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_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, 2270, __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_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, 2270, __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, 2270, __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_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, 2270, __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, 2270, __pyx_L1092_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":2268
 *         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_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":2271
 *             global __cuDeviceSetMemPool
 *             __cuDeviceSetMemPool = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceSetMemPool')
 *         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":2273
 *         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":2275
 *         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, 2275, __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, 2275, __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_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, 2275, __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_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, 2275, __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, 2275, __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_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, 2275, __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, 2275, __pyx_L1098_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":2273
 *         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_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":2276
 *             global __cuDeviceGetMemPool
 *             __cuDeviceGetMemPool = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetMemPool')
 *         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":2278
 *         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":2280
 *         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, 2280, __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, 2280, __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_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, 2280, __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_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, 2280, __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, 2280, __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_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, 2280, __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, 2280, __pyx_L1104_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":2278
 *         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_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":2281
 *             global __cuDeviceGetDefaultMemPool
 *             __cuDeviceGetDefaultMemPool = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetDefaultMemPool')
 *         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":2283
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFlushGPUDirectRDMAWrites
 *             __cuFlushGPUDirectRDMAWrites = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFlushGPUDirectRDMAWrites')
 */
          {
            __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":2285
 *         try:
 *             global __cuFlushGPUDirectRDMAWrites
 *             __cuFlushGPUDirectRDMAWrites = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFlushGPUDirectRDMAWrites')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2285, __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, 2285, __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_cuFlushGPUDirectRDMAWrites};
                __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_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_cuFlushGPUDirectRDMAWrites};
                __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_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, 2285, __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_cuFlushGPUDirectRDMAWrites);
                __Pyx_GIVEREF(__pyx_n_u_cuFlushGPUDirectRDMAWrites);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuFlushGPUDirectRDMAWrites);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2285, __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, 2285, __pyx_L1110_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":2283
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFlushGPUDirectRDMAWrites
 *             __cuFlushGPUDirectRDMAWrites = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFlushGPUDirectRDMAWrites')
 */
            }
            __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":2286
 *             global __cuFlushGPUDirectRDMAWrites
 *             __cuFlushGPUDirectRDMAWrites = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFlushGPUDirectRDMAWrites')
 *         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":2288
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetProperties
 *             __cuDeviceGetProperties = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetProperties')
 */
          {
            __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":2290
 *         try:
 *             global __cuDeviceGetProperties
 *             __cuDeviceGetProperties = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetProperties')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2290, __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, 2290, __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_cuDeviceGetProperties};
                __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_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_cuDeviceGetProperties};
                __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_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, 2290, __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_cuDeviceGetProperties);
                __Pyx_GIVEREF(__pyx_n_u_cuDeviceGetProperties);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuDeviceGetProperties);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2290, __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, 2290, __pyx_L1116_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":2288
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetProperties
 *             __cuDeviceGetProperties = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetProperties')
 */
            }
            __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":2291
 *             global __cuDeviceGetProperties
 *             __cuDeviceGetProperties = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetProperties')
 *         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":2293
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceComputeCapability
 *             __cuDeviceComputeCapability = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceComputeCapability')
 */
          {
            __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":2295
 *         try:
 *             global __cuDeviceComputeCapability
 *             __cuDeviceComputeCapability = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceComputeCapability')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2295, __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, 2295, __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_cuDeviceComputeCapability};
                __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_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_cuDeviceComputeCapability};
                __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_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, 2295, __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_cuDeviceComputeCapability);
                __Pyx_GIVEREF(__pyx_n_u_cuDeviceComputeCapability);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuDeviceComputeCapability);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2295, __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, 2295, __pyx_L1122_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":2293
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceComputeCapability
 *             __cuDeviceComputeCapability = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceComputeCapability')
 */
            }
            __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":2296
 *             global __cuDeviceComputeCapability
 *             __cuDeviceComputeCapability = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceComputeCapability')
 *         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":2298
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDevicePrimaryCtxRetain
 *             __cuDevicePrimaryCtxRetain = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxRetain')
 */
          {
            __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":2300
 *         try:
 *             global __cuDevicePrimaryCtxRetain
 *             __cuDevicePrimaryCtxRetain = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxRetain')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2300, __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, 2300, __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_cuDevicePrimaryCtxRetain};
                __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_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_cuDevicePrimaryCtxRetain};
                __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_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, 2300, __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_cuDevicePrimaryCtxRetain);
                __Pyx_GIVEREF(__pyx_n_u_cuDevicePrimaryCtxRetain);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuDevicePrimaryCtxRetain);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2300, __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, 2300, __pyx_L1128_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":2298
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDevicePrimaryCtxRetain
 *             __cuDevicePrimaryCtxRetain = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxRetain')
 */
            }
            __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":2301
 *             global __cuDevicePrimaryCtxRetain
 *             __cuDevicePrimaryCtxRetain = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxRetain')
 *         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":2303
 *         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_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":2305
 *         try:
 *             global __cuDevicePrimaryCtxRelease_v2
 *             __cuDevicePrimaryCtxRelease_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxRelease_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2305, __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, 2305, __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_cuDevicePrimaryCtxRelease_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, 2305, __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_cuDevicePrimaryCtxRelease_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, 2305, __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, 2305, __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_cuDevicePrimaryCtxRelease_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuDevicePrimaryCtxRelease_v2);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuDevicePrimaryCtxRelease_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2305, __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, 2305, __pyx_L1134_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":2303
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDevicePrimaryCtxRelease_v2
 *             __cuDevicePrimaryCtxRelease_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxRelease_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_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":2306
 *             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_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":2308
 *         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_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":2310
 *         try:
 *             global __cuDevicePrimaryCtxSetFlags_v2
 *             __cuDevicePrimaryCtxSetFlags_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxSetFlags_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2310, __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, 2310, __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_cuDevicePrimaryCtxSetFlags_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, 2310, __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_cuDevicePrimaryCtxSetFlags_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, 2310, __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, 2310, __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_cuDevicePrimaryCtxSetFlags_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuDevicePrimaryCtxSetFlags_v2);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuDevicePrimaryCtxSetFlags_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2310, __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, 2310, __pyx_L1140_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":2308
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDevicePrimaryCtxSetFlags_v2
 *             __cuDevicePrimaryCtxSetFlags_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxSetFlags_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":2311
 *             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_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":2313
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDevicePrimaryCtxGetState
 *             __cuDevicePrimaryCtxGetState = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxGetState')
 */
          {
            __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":2315
 *         try:
 *             global __cuDevicePrimaryCtxGetState
 *             __cuDevicePrimaryCtxGetState = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxGetState')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2315, __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, 2315, __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_cuDevicePrimaryCtxGetState};
                __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_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_cuDevicePrimaryCtxGetState};
                __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_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, 2315, __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_cuDevicePrimaryCtxGetState);
                __Pyx_GIVEREF(__pyx_n_u_cuDevicePrimaryCtxGetState);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuDevicePrimaryCtxGetState);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2315, __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, 2315, __pyx_L1146_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":2313
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDevicePrimaryCtxGetState
 *             __cuDevicePrimaryCtxGetState = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxGetState')
 */
            }
            __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":2316
 *             global __cuDevicePrimaryCtxGetState
 *             __cuDevicePrimaryCtxGetState = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxGetState')
 *         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":2318
 *         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_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":2320
 *         try:
 *             global __cuDevicePrimaryCtxReset_v2
 *             __cuDevicePrimaryCtxReset_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxReset_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2320, __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, 2320, __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_cuDevicePrimaryCtxReset_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, 2320, __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_cuDevicePrimaryCtxReset_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, 2320, __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, 2320, __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_cuDevicePrimaryCtxReset_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuDevicePrimaryCtxReset_v2);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuDevicePrimaryCtxReset_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2320, __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, 2320, __pyx_L1152_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":2318
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDevicePrimaryCtxReset_v2
 *             __cuDevicePrimaryCtxReset_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDevicePrimaryCtxReset_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":2321
 *             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_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":2323
 *         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":2325
 *         try:
 *             global __cuDeviceGetExecAffinitySupport
 *             __cuDeviceGetExecAffinitySupport = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetExecAffinitySupport')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2325, __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, 2325, __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_cuDeviceGetExecAffinitySupport};
                __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_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_cuDeviceGetExecAffinitySupport};
                __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_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, 2325, __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_cuDeviceGetExecAffinitySupport);
                __Pyx_GIVEREF(__pyx_n_u_cuDeviceGetExecAffinitySupport);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuDeviceGetExecAffinitySupport);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2325, __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, 2325, __pyx_L1158_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":2323
 *         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_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":2326
 *             global __cuDeviceGetExecAffinitySupport
 *             __cuDeviceGetExecAffinitySupport = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetExecAffinitySupport')
 *         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":2328
 *         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":2330
 *         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, 2330, __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, 2330, __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_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, 2330, __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_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, 2330, __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, 2330, __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_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, 2330, __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, 2330, __pyx_L1164_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":2328
 *         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_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":2331
 *             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_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":2333
 *         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":2335
 *         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, 2335, __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, 2335, __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_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, 2335, __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_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, 2335, __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, 2335, __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_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, 2335, __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, 2335, __pyx_L1170_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":2333
 *         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_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":2336
 *             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_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":2338
 *         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":2340
 *         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, 2340, __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, 2340, __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_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, 2340, __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_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, 2340, __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, 2340, __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_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, 2340, __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, 2340, __pyx_L1176_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":2338
 *         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_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":2341
 *             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_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":2343
 *         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":2345
 *         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, 2345, __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, 2345, __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_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, 2345, __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_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, 2345, __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, 2345, __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_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, 2345, __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, 2345, __pyx_L1182_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":2343
 *         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_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":2346
 *             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_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":2348
 *         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":2350
 *         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, 2350, __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, 2350, __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_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, 2350, __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_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, 2350, __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, 2350, __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_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, 2350, __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, 2350, __pyx_L1188_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":2348
 *         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_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":2351
 *             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_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":2353
 *         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":2355
 *         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, 2355, __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, 2355, __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_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, 2355, __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_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, 2355, __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, 2355, __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_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, 2355, __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, 2355, __pyx_L1194_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":2353
 *         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_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":2356
 *             global __cuCtxSetCurrent
 *             __cuCtxSetCurrent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSetCurrent')
 *         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":2358
 *         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":2360
 *         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, 2360, __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, 2360, __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_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, 2360, __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_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, 2360, __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, 2360, __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_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, 2360, __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, 2360, __pyx_L1200_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":2358
 *         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_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":2361
 *             global __cuCtxGetCurrent
 *             __cuCtxGetCurrent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetCurrent')
 *         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":2363
 *         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":2365
 *         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, 2365, __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, 2365, __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_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, 2365, __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_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, 2365, __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, 2365, __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_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, 2365, __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, 2365, __pyx_L1206_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":2363
 *         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_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":2366
 *             global __cuCtxGetDevice
 *             __cuCtxGetDevice = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetDevice')
 *         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":2368
 *         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":2370
 *         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, 2370, __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, 2370, __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_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, 2370, __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_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, 2370, __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, 2370, __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_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, 2370, __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, 2370, __pyx_L1212_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":2368
 *         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_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":2371
 *             global __cuCtxGetFlags
 *             __cuCtxGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetFlags')
 *         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":2373
 *         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":2375
 *         try:
 *             global __cuCtxSynchronize
 *             __cuCtxSynchronize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSynchronize')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2375, __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, 2375, __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_cuCtxSynchronize};
                __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_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_cuCtxSynchronize};
                __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_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, 2375, __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_cuCtxSynchronize);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxSynchronize);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuCtxSynchronize);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2375, __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, 2375, __pyx_L1218_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":2373
 *         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_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":2376
 *             global __cuCtxSynchronize
 *             __cuCtxSynchronize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSynchronize')
 *         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":2378
 *         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":2380
 *         try:
 *             global __cuCtxSetLimit
 *             __cuCtxSetLimit = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSetLimit')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2380, __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, 2380, __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_cuCtxSetLimit};
                __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_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_cuCtxSetLimit};
                __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_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, 2380, __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_cuCtxSetLimit);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxSetLimit);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuCtxSetLimit);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2380, __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, 2380, __pyx_L1224_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":2378
 *         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_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":2381
 *             global __cuCtxSetLimit
 *             __cuCtxSetLimit = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSetLimit')
 *         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":2383
 *         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":2385
 *         try:
 *             global __cuCtxGetLimit
 *             __cuCtxGetLimit = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetLimit')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2385, __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, 2385, __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_cuCtxGetLimit};
                __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_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_cuCtxGetLimit};
                __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_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, 2385, __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_cuCtxGetLimit);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxGetLimit);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuCtxGetLimit);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2385, __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, 2385, __pyx_L1230_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":2383
 *         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_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":2386
 *             global __cuCtxGetLimit
 *             __cuCtxGetLimit = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetLimit')
 *         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":2388
 *         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":2390
 *         try:
 *             global __cuCtxGetCacheConfig
 *             __cuCtxGetCacheConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetCacheConfig')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2390, __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, 2390, __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_cuCtxGetCacheConfig};
                __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_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_cuCtxGetCacheConfig};
                __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_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, 2390, __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_cuCtxGetCacheConfig);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxGetCacheConfig);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuCtxGetCacheConfig);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2390, __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, 2390, __pyx_L1236_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":2388
 *         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_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":2391
 *             global __cuCtxGetCacheConfig
 *             __cuCtxGetCacheConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetCacheConfig')
 *         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":2393
 *         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":2395
 *         try:
 *             global __cuCtxSetCacheConfig
 *             __cuCtxSetCacheConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSetCacheConfig')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2395, __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, 2395, __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_cuCtxSetCacheConfig};
                __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_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_cuCtxSetCacheConfig};
                __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_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, 2395, __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_cuCtxSetCacheConfig);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxSetCacheConfig);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuCtxSetCacheConfig);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2395, __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, 2395, __pyx_L1242_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":2393
 *         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_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":2396
 *             global __cuCtxSetCacheConfig
 *             __cuCtxSetCacheConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSetCacheConfig')
 *         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":2398
 *         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":2400
 *         try:
 *             global __cuCtxGetSharedMemConfig
 *             __cuCtxGetSharedMemConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetSharedMemConfig')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2400, __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, 2400, __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_cuCtxGetSharedMemConfig};
                __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_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_cuCtxGetSharedMemConfig};
                __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_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, 2400, __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_cuCtxGetSharedMemConfig);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxGetSharedMemConfig);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuCtxGetSharedMemConfig);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2400, __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, 2400, __pyx_L1248_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":2398
 *         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_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":2401
 *             global __cuCtxGetSharedMemConfig
 *             __cuCtxGetSharedMemConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetSharedMemConfig')
 *         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":2403
 *         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":2405
 *         try:
 *             global __cuCtxSetSharedMemConfig
 *             __cuCtxSetSharedMemConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSetSharedMemConfig')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2405, __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, 2405, __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_cuCtxSetSharedMemConfig};
                __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_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_cuCtxSetSharedMemConfig};
                __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_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, 2405, __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_cuCtxSetSharedMemConfig);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxSetSharedMemConfig);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuCtxSetSharedMemConfig);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2405, __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, 2405, __pyx_L1254_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":2403
 *         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_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":2406
 *             global __cuCtxSetSharedMemConfig
 *             __cuCtxSetSharedMemConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxSetSharedMemConfig')
 *         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":2408
 *         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":2410
 *         try:
 *             global __cuCtxGetApiVersion
 *             __cuCtxGetApiVersion = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetApiVersion')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2410, __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, 2410, __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_cuCtxGetApiVersion};
                __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_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_cuCtxGetApiVersion};
                __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_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, 2410, __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_cuCtxGetApiVersion);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxGetApiVersion);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuCtxGetApiVersion);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2410, __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, 2410, __pyx_L1260_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":2408
 *         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_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":2411
 *             global __cuCtxGetApiVersion
 *             __cuCtxGetApiVersion = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetApiVersion')
 *         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":2413
 *         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":2415
 *         try:
 *             global __cuCtxGetStreamPriorityRange
 *             __cuCtxGetStreamPriorityRange = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetStreamPriorityRange')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2415, __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, 2415, __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_cuCtxGetStreamPriorityRange};
                __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_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_cuCtxGetStreamPriorityRange};
                __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_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, 2415, __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_cuCtxGetStreamPriorityRange);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxGetStreamPriorityRange);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuCtxGetStreamPriorityRange);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2415, __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, 2415, __pyx_L1266_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":2413
 *         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_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":2416
 *             global __cuCtxGetStreamPriorityRange
 *             __cuCtxGetStreamPriorityRange = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetStreamPriorityRange')
 *         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":2418
 *         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":2420
 *         try:
 *             global __cuCtxResetPersistingL2Cache
 *             __cuCtxResetPersistingL2Cache = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxResetPersistingL2Cache')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2420, __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, 2420, __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_cuCtxResetPersistingL2Cache};
                __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_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_cuCtxResetPersistingL2Cache};
                __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_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, 2420, __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_cuCtxResetPersistingL2Cache);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxResetPersistingL2Cache);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuCtxResetPersistingL2Cache);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2420, __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, 2420, __pyx_L1272_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":2418
 *         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_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":2421
 *             global __cuCtxResetPersistingL2Cache
 *             __cuCtxResetPersistingL2Cache = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxResetPersistingL2Cache')
 *         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":2423
 *         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":2425
 *         try:
 *             global __cuCtxGetExecAffinity
 *             __cuCtxGetExecAffinity = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetExecAffinity')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2425, __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, 2425, __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_cuCtxGetExecAffinity};
                __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_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_cuCtxGetExecAffinity};
                __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_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, 2425, __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_cuCtxGetExecAffinity);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxGetExecAffinity);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuCtxGetExecAffinity);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2425, __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, 2425, __pyx_L1278_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":2423
 *         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_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":2426
 *             global __cuCtxGetExecAffinity
 *             __cuCtxGetExecAffinity = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxGetExecAffinity')
 *         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":2428
 *         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":2430
 *         try:
 *             global __cuCtxAttach
 *             __cuCtxAttach = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxAttach')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2430, __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, 2430, __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_cuCtxAttach};
                __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_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_cuCtxAttach};
                __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_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, 2430, __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_cuCtxAttach);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxAttach);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuCtxAttach);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2430, __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, 2430, __pyx_L1284_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":2428
 *         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_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":2431
 *             global __cuCtxAttach
 *             __cuCtxAttach = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxAttach')
 *         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":2433
 *         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":2435
 *         try:
 *             global __cuCtxDetach
 *             __cuCtxDetach = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxDetach')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2435, __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, 2435, __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_cuCtxDetach};
                __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_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_cuCtxDetach};
                __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_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, 2435, __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_cuCtxDetach);
                __Pyx_GIVEREF(__pyx_n_u_cuCtxDetach);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuCtxDetach);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2435, __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, 2435, __pyx_L1290_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":2433
 *         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_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":2436
 *             global __cuCtxDetach
 *             __cuCtxDetach = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxDetach')
 *         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":2438
 *         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":2440
 *         try:
 *             global __cuModuleLoad
 *             __cuModuleLoad = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleLoad')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2440, __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, 2440, __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_cuModuleLoad};
                __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_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_cuModuleLoad};
                __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_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, 2440, __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_cuModuleLoad);
                __Pyx_GIVEREF(__pyx_n_u_cuModuleLoad);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuModuleLoad);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2440, __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, 2440, __pyx_L1296_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":2438
 *         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_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":2441
 *             global __cuModuleLoad
 *             __cuModuleLoad = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleLoad')
 *         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":2443
 *         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":2445
 *         try:
 *             global __cuModuleLoadData
 *             __cuModuleLoadData = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleLoadData')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2445, __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, 2445, __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_cuModuleLoadData};
                __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_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_cuModuleLoadData};
                __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_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, 2445, __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_cuModuleLoadData);
                __Pyx_GIVEREF(__pyx_n_u_cuModuleLoadData);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuModuleLoadData);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2445, __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, 2445, __pyx_L1302_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":2443
 *         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_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":2446
 *             global __cuModuleLoadData
 *             __cuModuleLoadData = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleLoadData')
 *         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":2448
 *         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":2450
 *         try:
 *             global __cuModuleLoadDataEx
 *             __cuModuleLoadDataEx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleLoadDataEx')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2450, __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, 2450, __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_cuModuleLoadDataEx};
                __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_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_cuModuleLoadDataEx};
                __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_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, 2450, __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_cuModuleLoadDataEx);
                __Pyx_GIVEREF(__pyx_n_u_cuModuleLoadDataEx);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuModuleLoadDataEx);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2450, __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, 2450, __pyx_L1308_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":2448
 *         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_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":2451
 *             global __cuModuleLoadDataEx
 *             __cuModuleLoadDataEx = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleLoadDataEx')
 *         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":2453
 *         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":2455
 *         try:
 *             global __cuModuleLoadFatBinary
 *             __cuModuleLoadFatBinary = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleLoadFatBinary')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2455, __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, 2455, __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_cuModuleLoadFatBinary};
                __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_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_cuModuleLoadFatBinary};
                __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_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, 2455, __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_cuModuleLoadFatBinary);
                __Pyx_GIVEREF(__pyx_n_u_cuModuleLoadFatBinary);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuModuleLoadFatBinary);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2455, __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, 2455, __pyx_L1314_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":2453
 *         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_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":2456
 *             global __cuModuleLoadFatBinary
 *             __cuModuleLoadFatBinary = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleLoadFatBinary')
 *         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":2458
 *         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":2460
 *         try:
 *             global __cuModuleUnload
 *             __cuModuleUnload = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleUnload')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2460, __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, 2460, __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_cuModuleUnload};
                __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_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_cuModuleUnload};
                __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_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, 2460, __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_cuModuleUnload);
                __Pyx_GIVEREF(__pyx_n_u_cuModuleUnload);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuModuleUnload);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2460, __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, 2460, __pyx_L1320_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":2458
 *         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_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":2461
 *             global __cuModuleUnload
 *             __cuModuleUnload = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleUnload')
 *         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":2463
 *         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":2465
 *         try:
 *             global __cuModuleGetLoadingMode
 *             __cuModuleGetLoadingMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetLoadingMode')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2465, __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, 2465, __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_cuModuleGetLoadingMode};
                __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_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_cuModuleGetLoadingMode};
                __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_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, 2465, __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_cuModuleGetLoadingMode);
                __Pyx_GIVEREF(__pyx_n_u_cuModuleGetLoadingMode);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuModuleGetLoadingMode);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2465, __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, 2465, __pyx_L1326_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":2463
 *         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_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":2466
 *             global __cuModuleGetLoadingMode
 *             __cuModuleGetLoadingMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetLoadingMode')
 *         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":2468
 *         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":2470
 *         try:
 *             global __cuModuleGetFunction
 *             __cuModuleGetFunction = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetFunction')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2470, __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, 2470, __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_cuModuleGetFunction};
                __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_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_cuModuleGetFunction};
                __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_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, 2470, __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_cuModuleGetFunction);
                __Pyx_GIVEREF(__pyx_n_u_cuModuleGetFunction);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuModuleGetFunction);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2470, __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, 2470, __pyx_L1332_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":2468
 *         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_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":2471
 *             global __cuModuleGetFunction
 *             __cuModuleGetFunction = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetFunction')
 *         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":2473
 *         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":2475
 *         try:
 *             global __cuModuleGetGlobal_v2
 *             __cuModuleGetGlobal_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetGlobal_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2475, __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, 2475, __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_cuModuleGetGlobal_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, 2475, __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_cuModuleGetGlobal_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, 2475, __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, 2475, __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_cuModuleGetGlobal_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuModuleGetGlobal_v2);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuModuleGetGlobal_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2475, __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, 2475, __pyx_L1338_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":2473
 *         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_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":2476
 *             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_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":2478
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuModuleGetTexRef
 *             __cuModuleGetTexRef = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetTexRef')
 */
          {
            __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":2480
 *         try:
 *             global __cuModuleGetTexRef
 *             __cuModuleGetTexRef = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetTexRef')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2480, __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, 2480, __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_cuModuleGetTexRef};
                __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_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_cuModuleGetTexRef};
                __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_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, 2480, __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_cuModuleGetTexRef);
                __Pyx_GIVEREF(__pyx_n_u_cuModuleGetTexRef);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuModuleGetTexRef);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2480, __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, 2480, __pyx_L1344_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":2478
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuModuleGetTexRef
 *             __cuModuleGetTexRef = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetTexRef')
 */
            }
            __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":2481
 *             global __cuModuleGetTexRef
 *             __cuModuleGetTexRef = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetTexRef')
 *         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":2483
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuModuleGetSurfRef
 *             __cuModuleGetSurfRef = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetSurfRef')
 */
          {
            __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":2485
 *         try:
 *             global __cuModuleGetSurfRef
 *             __cuModuleGetSurfRef = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetSurfRef')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2485, __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, 2485, __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_cuModuleGetSurfRef};
                __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_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_cuModuleGetSurfRef};
                __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_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, 2485, __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_cuModuleGetSurfRef);
                __Pyx_GIVEREF(__pyx_n_u_cuModuleGetSurfRef);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuModuleGetSurfRef);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2485, __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, 2485, __pyx_L1350_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":2483
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuModuleGetSurfRef
 *             __cuModuleGetSurfRef = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetSurfRef')
 */
            }
            __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":2486
 *             global __cuModuleGetSurfRef
 *             __cuModuleGetSurfRef = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuModuleGetSurfRef')
 *         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":2488
 *         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":2490
 *         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, 2490, __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, 2490, __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_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, 2490, __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_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, 2490, __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, 2490, __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_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, 2490, __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, 2490, __pyx_L1356_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":2488
 *         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_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":2491
 *             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_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":2493
 *         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":2495
 *         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, 2495, __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, 2495, __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_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, 2495, __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_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, 2495, __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, 2495, __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_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, 2495, __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, 2495, __pyx_L1362_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":2493
 *         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_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":2496
 *             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_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":2498
 *         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":2500
 *         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, 2500, __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, 2500, __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_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, 2500, __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_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, 2500, __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, 2500, __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_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, 2500, __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, 2500, __pyx_L1368_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":2498
 *         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_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":2501
 *             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_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":2503
 *         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":2505
 *         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, 2505, __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, 2505, __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_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, 2505, __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_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, 2505, __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, 2505, __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_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, 2505, __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, 2505, __pyx_L1374_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":2503
 *         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_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":2506
 *             global __cuLinkComplete
 *             __cuLinkComplete = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLinkComplete')
 *         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":2508
 *         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":2510
 *         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, 2510, __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, 2510, __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_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, 2510, __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_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, 2510, __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, 2510, __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_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, 2510, __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, 2510, __pyx_L1380_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":2508
 *         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_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":2511
 *             global __cuLinkDestroy
 *             __cuLinkDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLinkDestroy')
 *         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":2513
 *         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":2515
 *         try:
 *             global __cuMemGetInfo_v2
 *             __cuMemGetInfo_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetInfo_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2515, __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, 2515, __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_cuMemGetInfo_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, 2515, __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_cuMemGetInfo_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, 2515, __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, 2515, __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_cuMemGetInfo_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuMemGetInfo_v2);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemGetInfo_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2515, __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, 2515, __pyx_L1386_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":2513
 *         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_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":2516
 *             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_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":2518
 *         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":2520
 *         try:
 *             global __cuMemAlloc_v2
 *             __cuMemAlloc_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAlloc_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2520, __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, 2520, __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_cuMemAlloc_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, 2520, __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_cuMemAlloc_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, 2520, __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, 2520, __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_cuMemAlloc_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuMemAlloc_v2);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemAlloc_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2520, __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, 2520, __pyx_L1392_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":2518
 *         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_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":2521
 *             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_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":2523
 *         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":2525
 *         try:
 *             global __cuMemAllocPitch_v2
 *             __cuMemAllocPitch_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocPitch_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2525, __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, 2525, __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_cuMemAllocPitch_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, 2525, __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_cuMemAllocPitch_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, 2525, __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, 2525, __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_cuMemAllocPitch_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuMemAllocPitch_v2);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemAllocPitch_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2525, __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, 2525, __pyx_L1398_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":2523
 *         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_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":2526
 *             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_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":2528
 *         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":2530
 *         try:
 *             global __cuMemFree_v2
 *             __cuMemFree_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemFree_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2530, __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, 2530, __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_cuMemFree_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_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_cuMemFree_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_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, 2530, __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_cuMemFree_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuMemFree_v2);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemFree_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2530, __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, 2530, __pyx_L1404_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":2528
 *         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_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":2531
 *             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_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":2533
 *         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":2535
 *         try:
 *             global __cuMemGetAddressRange_v2
 *             __cuMemGetAddressRange_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetAddressRange_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2535, __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, 2535, __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_cuMemGetAddressRange_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_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_cuMemGetAddressRange_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_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, 2535, __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_cuMemGetAddressRange_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuMemGetAddressRange_v2);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemGetAddressRange_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2535, __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, 2535, __pyx_L1410_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":2533
 *         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_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":2536
 *             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_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":2538
 *         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":2540
 *         try:
 *             global __cuMemAllocHost_v2
 *             __cuMemAllocHost_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocHost_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2540, __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, 2540, __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_cuMemAllocHost_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_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_cuMemAllocHost_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_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, 2540, __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_cuMemAllocHost_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuMemAllocHost_v2);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemAllocHost_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2540, __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, 2540, __pyx_L1416_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":2538
 *         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_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":2541
 *             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_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":2543
 *         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":2545
 *         try:
 *             global __cuMemFreeHost
 *             __cuMemFreeHost = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemFreeHost')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2545, __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, 2545, __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_cuMemFreeHost};
                __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_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_cuMemFreeHost};
                __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_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, 2545, __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_cuMemFreeHost);
                __Pyx_GIVEREF(__pyx_n_u_cuMemFreeHost);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemFreeHost);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2545, __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, 2545, __pyx_L1422_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":2543
 *         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_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":2546
 *             global __cuMemFreeHost
 *             __cuMemFreeHost = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemFreeHost')
 *         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":2548
 *         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":2550
 *         try:
 *             global __cuMemHostAlloc
 *             __cuMemHostAlloc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemHostAlloc')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2550, __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, 2550, __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_cuMemHostAlloc};
                __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_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_cuMemHostAlloc};
                __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_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, 2550, __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_cuMemHostAlloc);
                __Pyx_GIVEREF(__pyx_n_u_cuMemHostAlloc);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemHostAlloc);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2550, __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, 2550, __pyx_L1428_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":2548
 *         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_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":2551
 *             global __cuMemHostAlloc
 *             __cuMemHostAlloc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemHostAlloc')
 *         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":2553
 *         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":2555
 *         try:
 *             global __cuMemHostGetDevicePointer_v2
 *             __cuMemHostGetDevicePointer_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemHostGetDevicePointer_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2555, __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, 2555, __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_cuMemHostGetDevicePointer_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, 2555, __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_cuMemHostGetDevicePointer_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, 2555, __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, 2555, __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_cuMemHostGetDevicePointer_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuMemHostGetDevicePointer_v2);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemHostGetDevicePointer_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2555, __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, 2555, __pyx_L1434_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":2553
 *         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_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":2556
 *             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_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":2558
 *         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":2560
 *         try:
 *             global __cuMemHostGetFlags
 *             __cuMemHostGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemHostGetFlags')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2560, __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, 2560, __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_cuMemHostGetFlags};
                __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_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_cuMemHostGetFlags};
                __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_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, 2560, __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_cuMemHostGetFlags);
                __Pyx_GIVEREF(__pyx_n_u_cuMemHostGetFlags);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemHostGetFlags);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2560, __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, 2560, __pyx_L1440_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":2558
 *         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_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":2561
 *             global __cuMemHostGetFlags
 *             __cuMemHostGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemHostGetFlags')
 *         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":2563
 *         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":2565
 *         try:
 *             global __cuMemAllocManaged
 *             __cuMemAllocManaged = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocManaged')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2565, __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, 2565, __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_cuMemAllocManaged};
                __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_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_cuMemAllocManaged};
                __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_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, 2565, __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_cuMemAllocManaged);
                __Pyx_GIVEREF(__pyx_n_u_cuMemAllocManaged);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemAllocManaged);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2565, __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, 2565, __pyx_L1446_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":2563
 *         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_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":2566
 *             global __cuMemAllocManaged
 *             __cuMemAllocManaged = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAllocManaged')
 *         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":2568
 *         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":2570
 *         try:
 *             global __cuDeviceGetByPCIBusId
 *             __cuDeviceGetByPCIBusId = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetByPCIBusId')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2570, __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, 2570, __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_cuDeviceGetByPCIBusId};
                __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_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_cuDeviceGetByPCIBusId};
                __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_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, 2570, __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_cuDeviceGetByPCIBusId);
                __Pyx_GIVEREF(__pyx_n_u_cuDeviceGetByPCIBusId);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuDeviceGetByPCIBusId);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2570, __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, 2570, __pyx_L1452_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":2568
 *         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_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":2571
 *             global __cuDeviceGetByPCIBusId
 *             __cuDeviceGetByPCIBusId = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetByPCIBusId')
 *         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":2573
 *         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":2575
 *         try:
 *             global __cuDeviceGetPCIBusId
 *             __cuDeviceGetPCIBusId = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetPCIBusId')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2575, __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, 2575, __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_cuDeviceGetPCIBusId};
                __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_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_cuDeviceGetPCIBusId};
                __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_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, 2575, __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_cuDeviceGetPCIBusId);
                __Pyx_GIVEREF(__pyx_n_u_cuDeviceGetPCIBusId);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuDeviceGetPCIBusId);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2575, __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, 2575, __pyx_L1458_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":2573
 *         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_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":2576
 *             global __cuDeviceGetPCIBusId
 *             __cuDeviceGetPCIBusId = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetPCIBusId')
 *         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":2578
 *         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":2580
 *         try:
 *             global __cuIpcGetEventHandle
 *             __cuIpcGetEventHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuIpcGetEventHandle')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2580, __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, 2580, __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_cuIpcGetEventHandle};
                __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_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_cuIpcGetEventHandle};
                __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_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, 2580, __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_cuIpcGetEventHandle);
                __Pyx_GIVEREF(__pyx_n_u_cuIpcGetEventHandle);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuIpcGetEventHandle);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2580, __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, 2580, __pyx_L1464_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":2578
 *         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_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":2581
 *             global __cuIpcGetEventHandle
 *             __cuIpcGetEventHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuIpcGetEventHandle')
 *         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":2583
 *         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":2585
 *         try:
 *             global __cuIpcOpenEventHandle
 *             __cuIpcOpenEventHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuIpcOpenEventHandle')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2585, __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, 2585, __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_cuIpcOpenEventHandle};
                __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_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_cuIpcOpenEventHandle};
                __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_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, 2585, __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_cuIpcOpenEventHandle);
                __Pyx_GIVEREF(__pyx_n_u_cuIpcOpenEventHandle);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuIpcOpenEventHandle);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2585, __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, 2585, __pyx_L1470_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":2583
 *         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_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":2586
 *             global __cuIpcOpenEventHandle
 *             __cuIpcOpenEventHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuIpcOpenEventHandle')
 *         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":2588
 *         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":2590
 *         try:
 *             global __cuIpcGetMemHandle
 *             __cuIpcGetMemHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuIpcGetMemHandle')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2590, __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, 2590, __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_cuIpcGetMemHandle};
                __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_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_cuIpcGetMemHandle};
                __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_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, 2590, __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_cuIpcGetMemHandle);
                __Pyx_GIVEREF(__pyx_n_u_cuIpcGetMemHandle);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuIpcGetMemHandle);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2590, __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, 2590, __pyx_L1476_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":2588
 *         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_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":2591
 *             global __cuIpcGetMemHandle
 *             __cuIpcGetMemHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuIpcGetMemHandle')
 *         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":2593
 *         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":2595
 *         try:
 *             global __cuIpcOpenMemHandle_v2
 *             __cuIpcOpenMemHandle_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuIpcOpenMemHandle_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2595, __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, 2595, __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_cuIpcOpenMemHandle_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, 2595, __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_cuIpcOpenMemHandle_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, 2595, __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, 2595, __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_cuIpcOpenMemHandle_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuIpcOpenMemHandle_v2);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuIpcOpenMemHandle_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2595, __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, 2595, __pyx_L1482_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":2593
 *         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_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":2596
 *             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_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":2598
 *         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":2600
 *         try:
 *             global __cuIpcCloseMemHandle
 *             __cuIpcCloseMemHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuIpcCloseMemHandle')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2600, __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, 2600, __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_cuIpcCloseMemHandle};
                __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_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_cuIpcCloseMemHandle};
                __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_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, 2600, __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_cuIpcCloseMemHandle);
                __Pyx_GIVEREF(__pyx_n_u_cuIpcCloseMemHandle);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuIpcCloseMemHandle);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2600, __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, 2600, __pyx_L1488_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":2598
 *         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_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":2601
 *             global __cuIpcCloseMemHandle
 *             __cuIpcCloseMemHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuIpcCloseMemHandle')
 *         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":2603
 *         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":2605
 *         try:
 *             global __cuMemHostRegister_v2
 *             __cuMemHostRegister_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemHostRegister_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2605, __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, 2605, __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_cuMemHostRegister_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, 2605, __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_cuMemHostRegister_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, 2605, __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, 2605, __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_cuMemHostRegister_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuMemHostRegister_v2);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemHostRegister_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2605, __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, 2605, __pyx_L1494_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":2603
 *         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_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":2606
 *             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_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":2608
 *         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":2610
 *         try:
 *             global __cuMemHostUnregister
 *             __cuMemHostUnregister = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemHostUnregister')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2610, __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, 2610, __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_cuMemHostUnregister};
                __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_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_cuMemHostUnregister};
                __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_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, 2610, __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_cuMemHostUnregister);
                __Pyx_GIVEREF(__pyx_n_u_cuMemHostUnregister);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemHostUnregister);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2610, __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, 2610, __pyx_L1500_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":2608
 *         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_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":2611
 *             global __cuMemHostUnregister
 *             __cuMemHostUnregister = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemHostUnregister')
 *         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":2613
 *         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":2615
 *         try:
 *             global __cuArrayCreate_v2
 *             __cuArrayCreate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayCreate_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2615, __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, 2615, __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_cuArrayCreate_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, 2615, __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_cuArrayCreate_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, 2615, __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, 2615, __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_cuArrayCreate_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuArrayCreate_v2);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuArrayCreate_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2615, __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, 2615, __pyx_L1506_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":2613
 *         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_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":2616
 *             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_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":2618
 *         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":2620
 *         try:
 *             global __cuArrayGetDescriptor_v2
 *             __cuArrayGetDescriptor_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayGetDescriptor_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2620, __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, 2620, __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_cuArrayGetDescriptor_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, 2620, __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_cuArrayGetDescriptor_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, 2620, __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, 2620, __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_cuArrayGetDescriptor_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuArrayGetDescriptor_v2);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuArrayGetDescriptor_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2620, __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, 2620, __pyx_L1512_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":2618
 *         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_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":2621
 *             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_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":2623
 *         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":2625
 *         try:
 *             global __cuArrayGetSparseProperties
 *             __cuArrayGetSparseProperties = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayGetSparseProperties')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2625, __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, 2625, __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_cuArrayGetSparseProperties};
                __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_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_cuArrayGetSparseProperties};
                __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_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, 2625, __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_cuArrayGetSparseProperties);
                __Pyx_GIVEREF(__pyx_n_u_cuArrayGetSparseProperties);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuArrayGetSparseProperties);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2625, __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, 2625, __pyx_L1518_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":2623
 *         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_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":2626
 *             global __cuArrayGetSparseProperties
 *             __cuArrayGetSparseProperties = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayGetSparseProperties')
 *         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":2628
 *         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":2630
 *         try:
 *             global __cuMipmappedArrayGetSparseProperties
 *             __cuMipmappedArrayGetSparseProperties = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayGetSparseProperties')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2630, __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, 2630, __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_cuMipmappedArrayGetSparsePropert};
                __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_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_cuMipmappedArrayGetSparsePropert};
                __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_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, 2630, __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_cuMipmappedArrayGetSparsePropert);
                __Pyx_GIVEREF(__pyx_n_u_cuMipmappedArrayGetSparsePropert);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMipmappedArrayGetSparsePropert);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2630, __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, 2630, __pyx_L1524_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":2628
 *         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_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":2631
 *             global __cuMipmappedArrayGetSparseProperties
 *             __cuMipmappedArrayGetSparseProperties = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayGetSparseProperties')
 *         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":2633
 *         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":2635
 *         try:
 *             global __cuArrayGetMemoryRequirements
 *             __cuArrayGetMemoryRequirements = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayGetMemoryRequirements')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2635, __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, 2635, __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_cuArrayGetMemoryRequirements};
                __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_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_cuArrayGetMemoryRequirements};
                __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_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, 2635, __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_cuArrayGetMemoryRequirements);
                __Pyx_GIVEREF(__pyx_n_u_cuArrayGetMemoryRequirements);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuArrayGetMemoryRequirements);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2635, __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, 2635, __pyx_L1530_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":2633
 *         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_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":2636
 *             global __cuArrayGetMemoryRequirements
 *             __cuArrayGetMemoryRequirements = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayGetMemoryRequirements')
 *         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":2638
 *         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":2640
 *         try:
 *             global __cuMipmappedArrayGetMemoryRequirements
 *             __cuMipmappedArrayGetMemoryRequirements = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayGetMemoryRequirements')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2640, __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, 2640, __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_cuMipmappedArrayGetMemoryRequire};
                __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_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_cuMipmappedArrayGetMemoryRequire};
                __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_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, 2640, __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_cuMipmappedArrayGetMemoryRequire);
                __Pyx_GIVEREF(__pyx_n_u_cuMipmappedArrayGetMemoryRequire);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMipmappedArrayGetMemoryRequire);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2640, __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, 2640, __pyx_L1536_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":2638
 *         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_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":2641
 *             global __cuMipmappedArrayGetMemoryRequirements
 *             __cuMipmappedArrayGetMemoryRequirements = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayGetMemoryRequirements')
 *         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":2643
 *         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":2645
 *         try:
 *             global __cuArrayGetPlane
 *             __cuArrayGetPlane = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayGetPlane')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2645, __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, 2645, __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_cuArrayGetPlane};
                __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_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_cuArrayGetPlane};
                __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_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, 2645, __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_cuArrayGetPlane);
                __Pyx_GIVEREF(__pyx_n_u_cuArrayGetPlane);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuArrayGetPlane);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2645, __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, 2645, __pyx_L1542_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":2643
 *         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_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":2646
 *             global __cuArrayGetPlane
 *             __cuArrayGetPlane = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayGetPlane')
 *         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":2648
 *         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":2650
 *         try:
 *             global __cuArrayDestroy
 *             __cuArrayDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayDestroy')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2650, __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, 2650, __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_cuArrayDestroy};
                __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_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_cuArrayDestroy};
                __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_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, 2650, __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_cuArrayDestroy);
                __Pyx_GIVEREF(__pyx_n_u_cuArrayDestroy);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuArrayDestroy);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2650, __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, 2650, __pyx_L1548_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":2648
 *         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_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":2651
 *             global __cuArrayDestroy
 *             __cuArrayDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArrayDestroy')
 *         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":2653
 *         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":2655
 *         try:
 *             global __cuArray3DCreate_v2
 *             __cuArray3DCreate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArray3DCreate_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2655, __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, 2655, __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_cuArray3DCreate_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_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_cuArray3DCreate_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_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, 2655, __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_cuArray3DCreate_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuArray3DCreate_v2);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuArray3DCreate_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2655, __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, 2655, __pyx_L1554_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":2653
 *         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_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":2656
 *             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_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":2658
 *         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":2660
 *         try:
 *             global __cuArray3DGetDescriptor_v2
 *             __cuArray3DGetDescriptor_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuArray3DGetDescriptor_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2660, __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, 2660, __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_cuArray3DGetDescriptor_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, 2660, __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_cuArray3DGetDescriptor_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, 2660, __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, 2660, __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_cuArray3DGetDescriptor_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuArray3DGetDescriptor_v2);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuArray3DGetDescriptor_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2660, __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, 2660, __pyx_L1560_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":2658
 *         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_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":2661
 *             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_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":2663
 *         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":2665
 *         try:
 *             global __cuMipmappedArrayCreate
 *             __cuMipmappedArrayCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayCreate')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2665, __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, 2665, __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_cuMipmappedArrayCreate};
                __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_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_cuMipmappedArrayCreate};
                __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_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, 2665, __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_cuMipmappedArrayCreate);
                __Pyx_GIVEREF(__pyx_n_u_cuMipmappedArrayCreate);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMipmappedArrayCreate);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2665, __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, 2665, __pyx_L1566_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":2663
 *         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_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":2666
 *             global __cuMipmappedArrayCreate
 *             __cuMipmappedArrayCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayCreate')
 *         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":2668
 *         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":2670
 *         try:
 *             global __cuMipmappedArrayGetLevel
 *             __cuMipmappedArrayGetLevel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayGetLevel')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2670, __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, 2670, __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_cuMipmappedArrayGetLevel};
                __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_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_cuMipmappedArrayGetLevel};
                __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_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, 2670, __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_cuMipmappedArrayGetLevel);
                __Pyx_GIVEREF(__pyx_n_u_cuMipmappedArrayGetLevel);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMipmappedArrayGetLevel);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2670, __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, 2670, __pyx_L1572_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":2668
 *         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_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":2671
 *             global __cuMipmappedArrayGetLevel
 *             __cuMipmappedArrayGetLevel = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayGetLevel')
 *         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":2673
 *         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":2675
 *         try:
 *             global __cuMipmappedArrayDestroy
 *             __cuMipmappedArrayDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayDestroy')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2675, __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, 2675, __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_cuMipmappedArrayDestroy};
                __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_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_cuMipmappedArrayDestroy};
                __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_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, 2675, __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_cuMipmappedArrayDestroy);
                __Pyx_GIVEREF(__pyx_n_u_cuMipmappedArrayDestroy);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMipmappedArrayDestroy);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2675, __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, 2675, __pyx_L1578_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":2673
 *         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_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":2676
 *             global __cuMipmappedArrayDestroy
 *             __cuMipmappedArrayDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMipmappedArrayDestroy')
 *         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":2678
 *         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":2680
 *         try:
 *             global __cuMemGetHandleForAddressRange
 *             __cuMemGetHandleForAddressRange = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetHandleForAddressRange')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2680, __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, 2680, __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_cuMemGetHandleForAddressRange};
                __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_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_cuMemGetHandleForAddressRange};
                __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_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, 2680, __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_cuMemGetHandleForAddressRange);
                __Pyx_GIVEREF(__pyx_n_u_cuMemGetHandleForAddressRange);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemGetHandleForAddressRange);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2680, __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, 2680, __pyx_L1584_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":2678
 *         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_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":2681
 *             global __cuMemGetHandleForAddressRange
 *             __cuMemGetHandleForAddressRange = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetHandleForAddressRange')
 *         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":2683
 *         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":2685
 *         try:
 *             global __cuMemAddressReserve
 *             __cuMemAddressReserve = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAddressReserve')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2685, __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, 2685, __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_cuMemAddressReserve};
                __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_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_cuMemAddressReserve};
                __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_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, 2685, __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_cuMemAddressReserve);
                __Pyx_GIVEREF(__pyx_n_u_cuMemAddressReserve);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemAddressReserve);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2685, __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, 2685, __pyx_L1590_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":2683
 *         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_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":2686
 *             global __cuMemAddressReserve
 *             __cuMemAddressReserve = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAddressReserve')
 *         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":2688
 *         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":2690
 *         try:
 *             global __cuMemAddressFree
 *             __cuMemAddressFree = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAddressFree')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2690, __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, 2690, __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_cuMemAddressFree};
                __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_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_cuMemAddressFree};
                __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_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, 2690, __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_cuMemAddressFree);
                __Pyx_GIVEREF(__pyx_n_u_cuMemAddressFree);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemAddressFree);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2690, __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, 2690, __pyx_L1596_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":2688
 *         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_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":2691
 *             global __cuMemAddressFree
 *             __cuMemAddressFree = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAddressFree')
 *         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":2693
 *         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":2695
 *         try:
 *             global __cuMemCreate
 *             __cuMemCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemCreate')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2695, __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, 2695, __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_cuMemCreate};
                __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_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_cuMemCreate};
                __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_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, 2695, __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_cuMemCreate);
                __Pyx_GIVEREF(__pyx_n_u_cuMemCreate);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemCreate);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2695, __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, 2695, __pyx_L1602_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":2693
 *         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_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":2696
 *             global __cuMemCreate
 *             __cuMemCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemCreate')
 *         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":2698
 *         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":2700
 *         try:
 *             global __cuMemRelease
 *             __cuMemRelease = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemRelease')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2700, __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, 2700, __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_cuMemRelease};
                __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_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_cuMemRelease};
                __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_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, 2700, __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_cuMemRelease);
                __Pyx_GIVEREF(__pyx_n_u_cuMemRelease);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemRelease);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2700, __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, 2700, __pyx_L1608_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":2698
 *         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_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":2701
 *             global __cuMemRelease
 *             __cuMemRelease = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemRelease')
 *         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":2703
 *         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":2705
 *         try:
 *             global __cuMemMap
 *             __cuMemMap = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemMap')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2705, __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, 2705, __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_cuMemMap};
                __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_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_cuMemMap};
                __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_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, 2705, __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_cuMemMap);
                __Pyx_GIVEREF(__pyx_n_u_cuMemMap);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemMap);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2705, __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, 2705, __pyx_L1614_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":2703
 *         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_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":2706
 *             global __cuMemMap
 *             __cuMemMap = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemMap')
 *         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":2708
 *         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":2710
 *         try:
 *             global __cuMemUnmap
 *             __cuMemUnmap = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemUnmap')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2710, __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, 2710, __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_cuMemUnmap};
                __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_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_cuMemUnmap};
                __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_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, 2710, __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_cuMemUnmap);
                __Pyx_GIVEREF(__pyx_n_u_cuMemUnmap);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemUnmap);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2710, __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, 2710, __pyx_L1620_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":2708
 *         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_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":2711
 *             global __cuMemUnmap
 *             __cuMemUnmap = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemUnmap')
 *         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":2713
 *         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":2715
 *         try:
 *             global __cuMemSetAccess
 *             __cuMemSetAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemSetAccess')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2715, __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, 2715, __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_cuMemSetAccess};
                __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_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_cuMemSetAccess};
                __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_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, 2715, __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_cuMemSetAccess);
                __Pyx_GIVEREF(__pyx_n_u_cuMemSetAccess);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemSetAccess);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2715, __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, 2715, __pyx_L1626_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":2713
 *         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_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":2716
 *             global __cuMemSetAccess
 *             __cuMemSetAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemSetAccess')
 *         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":2718
 *         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":2720
 *         try:
 *             global __cuMemGetAccess
 *             __cuMemGetAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetAccess')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2720, __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, 2720, __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_cuMemGetAccess};
                __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_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_cuMemGetAccess};
                __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_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, 2720, __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_cuMemGetAccess);
                __Pyx_GIVEREF(__pyx_n_u_cuMemGetAccess);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemGetAccess);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2720, __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, 2720, __pyx_L1632_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":2718
 *         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_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":2721
 *             global __cuMemGetAccess
 *             __cuMemGetAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetAccess')
 *         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":2723
 *         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":2725
 *         try:
 *             global __cuMemExportToShareableHandle
 *             __cuMemExportToShareableHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemExportToShareableHandle')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2725, __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, 2725, __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_cuMemExportToShareableHandle};
                __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_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_cuMemExportToShareableHandle};
                __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_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, 2725, __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_cuMemExportToShareableHandle);
                __Pyx_GIVEREF(__pyx_n_u_cuMemExportToShareableHandle);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemExportToShareableHandle);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2725, __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, 2725, __pyx_L1638_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":2723
 *         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_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":2726
 *             global __cuMemExportToShareableHandle
 *             __cuMemExportToShareableHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemExportToShareableHandle')
 *         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":2728
 *         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":2730
 *         try:
 *             global __cuMemImportFromShareableHandle
 *             __cuMemImportFromShareableHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemImportFromShareableHandle')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2730, __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, 2730, __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_cuMemImportFromShareableHandle};
                __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_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_cuMemImportFromShareableHandle};
                __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_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, 2730, __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_cuMemImportFromShareableHandle);
                __Pyx_GIVEREF(__pyx_n_u_cuMemImportFromShareableHandle);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemImportFromShareableHandle);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2730, __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, 2730, __pyx_L1644_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":2728
 *         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_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":2731
 *             global __cuMemImportFromShareableHandle
 *             __cuMemImportFromShareableHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemImportFromShareableHandle')
 *         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":2733
 *         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":2735
 *         try:
 *             global __cuMemGetAllocationGranularity
 *             __cuMemGetAllocationGranularity = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetAllocationGranularity')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2735, __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, 2735, __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_cuMemGetAllocationGranularity};
                __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_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_cuMemGetAllocationGranularity};
                __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_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, 2735, __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_cuMemGetAllocationGranularity);
                __Pyx_GIVEREF(__pyx_n_u_cuMemGetAllocationGranularity);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemGetAllocationGranularity);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2735, __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, 2735, __pyx_L1650_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":2733
 *         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_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":2736
 *             global __cuMemGetAllocationGranularity
 *             __cuMemGetAllocationGranularity = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetAllocationGranularity')
 *         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":2738
 *         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":2740
 *         try:
 *             global __cuMemGetAllocationPropertiesFromHandle
 *             __cuMemGetAllocationPropertiesFromHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetAllocationPropertiesFromHandle')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2740, __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, 2740, __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_cuMemGetAllocationPropertiesFrom};
                __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_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_cuMemGetAllocationPropertiesFrom};
                __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_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, 2740, __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_cuMemGetAllocationPropertiesFrom);
                __Pyx_GIVEREF(__pyx_n_u_cuMemGetAllocationPropertiesFrom);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemGetAllocationPropertiesFrom);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2740, __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, 2740, __pyx_L1656_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":2738
 *         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_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":2741
 *             global __cuMemGetAllocationPropertiesFromHandle
 *             __cuMemGetAllocationPropertiesFromHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemGetAllocationPropertiesFromHandle')
 *         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":2743
 *         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":2745
 *         try:
 *             global __cuMemRetainAllocationHandle
 *             __cuMemRetainAllocationHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemRetainAllocationHandle')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2745, __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, 2745, __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_cuMemRetainAllocationHandle};
                __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_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_cuMemRetainAllocationHandle};
                __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_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, 2745, __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_cuMemRetainAllocationHandle);
                __Pyx_GIVEREF(__pyx_n_u_cuMemRetainAllocationHandle);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemRetainAllocationHandle);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2745, __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, 2745, __pyx_L1662_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":2743
 *         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_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":2746
 *             global __cuMemRetainAllocationHandle
 *             __cuMemRetainAllocationHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemRetainAllocationHandle')
 *         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":2748
 *         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":2750
 *         try:
 *             global __cuMemPoolTrimTo
 *             __cuMemPoolTrimTo = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolTrimTo')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2750, __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, 2750, __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_cuMemPoolTrimTo};
                __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_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_cuMemPoolTrimTo};
                __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_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, 2750, __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_cuMemPoolTrimTo);
                __Pyx_GIVEREF(__pyx_n_u_cuMemPoolTrimTo);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemPoolTrimTo);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2750, __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, 2750, __pyx_L1668_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":2748
 *         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_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":2751
 *             global __cuMemPoolTrimTo
 *             __cuMemPoolTrimTo = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolTrimTo')
 *         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":2753
 *         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":2755
 *         try:
 *             global __cuMemPoolSetAttribute
 *             __cuMemPoolSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolSetAttribute')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2755, __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, 2755, __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_cuMemPoolSetAttribute};
                __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_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_cuMemPoolSetAttribute};
                __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_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, 2755, __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_cuMemPoolSetAttribute);
                __Pyx_GIVEREF(__pyx_n_u_cuMemPoolSetAttribute);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemPoolSetAttribute);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2755, __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, 2755, __pyx_L1674_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":2753
 *         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_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":2756
 *             global __cuMemPoolSetAttribute
 *             __cuMemPoolSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolSetAttribute')
 *         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":2758
 *         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":2760
 *         try:
 *             global __cuMemPoolGetAttribute
 *             __cuMemPoolGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolGetAttribute')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2760, __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, 2760, __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_cuMemPoolGetAttribute};
                __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_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_cuMemPoolGetAttribute};
                __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_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, 2760, __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_cuMemPoolGetAttribute);
                __Pyx_GIVEREF(__pyx_n_u_cuMemPoolGetAttribute);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemPoolGetAttribute);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2760, __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, 2760, __pyx_L1680_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":2758
 *         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_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":2761
 *             global __cuMemPoolGetAttribute
 *             __cuMemPoolGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolGetAttribute')
 *         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":2763
 *         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":2765
 *         try:
 *             global __cuMemPoolSetAccess
 *             __cuMemPoolSetAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolSetAccess')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2765, __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, 2765, __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_cuMemPoolSetAccess};
                __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_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_cuMemPoolSetAccess};
                __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_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, 2765, __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_cuMemPoolSetAccess);
                __Pyx_GIVEREF(__pyx_n_u_cuMemPoolSetAccess);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemPoolSetAccess);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2765, __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, 2765, __pyx_L1686_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":2763
 *         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_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":2766
 *             global __cuMemPoolSetAccess
 *             __cuMemPoolSetAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolSetAccess')
 *         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":2768
 *         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":2770
 *         try:
 *             global __cuMemPoolGetAccess
 *             __cuMemPoolGetAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolGetAccess')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2770, __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, 2770, __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_cuMemPoolGetAccess};
                __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_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_cuMemPoolGetAccess};
                __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_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, 2770, __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_cuMemPoolGetAccess);
                __Pyx_GIVEREF(__pyx_n_u_cuMemPoolGetAccess);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemPoolGetAccess);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2770, __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, 2770, __pyx_L1692_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":2768
 *         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_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":2771
 *             global __cuMemPoolGetAccess
 *             __cuMemPoolGetAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolGetAccess')
 *         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":2773
 *         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":2775
 *         try:
 *             global __cuMemPoolCreate
 *             __cuMemPoolCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolCreate')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2775, __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, 2775, __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_cuMemPoolCreate};
                __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_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_cuMemPoolCreate};
                __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_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, 2775, __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_cuMemPoolCreate);
                __Pyx_GIVEREF(__pyx_n_u_cuMemPoolCreate);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemPoolCreate);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2775, __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, 2775, __pyx_L1698_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":2773
 *         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_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":2776
 *             global __cuMemPoolCreate
 *             __cuMemPoolCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolCreate')
 *         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":2778
 *         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":2780
 *         try:
 *             global __cuMemPoolDestroy
 *             __cuMemPoolDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolDestroy')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2780, __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, 2780, __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_cuMemPoolDestroy};
                __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_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_cuMemPoolDestroy};
                __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_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, 2780, __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_cuMemPoolDestroy);
                __Pyx_GIVEREF(__pyx_n_u_cuMemPoolDestroy);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemPoolDestroy);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2780, __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, 2780, __pyx_L1704_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":2778
 *         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_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":2781
 *             global __cuMemPoolDestroy
 *             __cuMemPoolDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolDestroy')
 *         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":2783
 *         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":2785
 *         try:
 *             global __cuMemPoolExportToShareableHandle
 *             __cuMemPoolExportToShareableHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolExportToShareableHandle')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2785, __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, 2785, __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_cuMemPoolExportToShareableHandle};
                __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_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_cuMemPoolExportToShareableHandle};
                __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_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, 2785, __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_cuMemPoolExportToShareableHandle);
                __Pyx_GIVEREF(__pyx_n_u_cuMemPoolExportToShareableHandle);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemPoolExportToShareableHandle);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2785, __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, 2785, __pyx_L1710_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":2783
 *         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_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":2786
 *             global __cuMemPoolExportToShareableHandle
 *             __cuMemPoolExportToShareableHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolExportToShareableHandle')
 *         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":2788
 *         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":2790
 *         try:
 *             global __cuMemPoolImportFromShareableHandle
 *             __cuMemPoolImportFromShareableHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolImportFromShareableHandle')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2790, __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, 2790, __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_cuMemPoolImportFromShareableHand};
                __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_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_cuMemPoolImportFromShareableHand};
                __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_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, 2790, __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_cuMemPoolImportFromShareableHand);
                __Pyx_GIVEREF(__pyx_n_u_cuMemPoolImportFromShareableHand);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuMemPoolImportFromShareableHand);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2790, __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, 2790, __pyx_L1716_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":2788
 *         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_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":2791
 *             global __cuMemPoolImportFromShareableHandle
 *             __cuMemPoolImportFromShareableHandle = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolImportFromShareableHandle')
 *         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":2793
 *         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":2795
 *         try:
 *             global __cuMemPoolExportPointer
 *             __cuMemPoolExportPointer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolExportPointer')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2795, __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, 2795, __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_cuMemPoolExportPointer};
                __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_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_cuMemPoolExportPointer};
                __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_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, 2795, __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_cuMemPoolExportPointer);
                __Pyx_GIVEREF(__pyx_n_u_cuMemPoolExportPointer);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemPoolExportPointer);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2795, __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, 2795, __pyx_L1722_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":2793
 *         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_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":2796
 *             global __cuMemPoolExportPointer
 *             __cuMemPoolExportPointer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolExportPointer')
 *         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":2798
 *         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":2800
 *         try:
 *             global __cuMemPoolImportPointer
 *             __cuMemPoolImportPointer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolImportPointer')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2800, __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, 2800, __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_cuMemPoolImportPointer};
                __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_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_cuMemPoolImportPointer};
                __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_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, 2800, __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_cuMemPoolImportPointer);
                __Pyx_GIVEREF(__pyx_n_u_cuMemPoolImportPointer);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuMemPoolImportPointer);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2800, __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, 2800, __pyx_L1728_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":2798
 *         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_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":2801
 *             global __cuMemPoolImportPointer
 *             __cuMemPoolImportPointer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemPoolImportPointer')
 *         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":2803
 *         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":2805
 *         try:
 *             global __cuPointerGetAttribute
 *             __cuPointerGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuPointerGetAttribute')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2805, __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, 2805, __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_cuPointerGetAttribute};
                __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_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_cuPointerGetAttribute};
                __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_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, 2805, __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_cuPointerGetAttribute);
                __Pyx_GIVEREF(__pyx_n_u_cuPointerGetAttribute);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuPointerGetAttribute);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2805, __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, 2805, __pyx_L1734_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":2803
 *         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_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":2806
 *             global __cuPointerGetAttribute
 *             __cuPointerGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuPointerGetAttribute')
 *         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":2808
 *         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":2810
 *         try:
 *             global __cuMemAdvise
 *             __cuMemAdvise = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAdvise')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2810, __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, 2810, __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_cuMemAdvise};
                __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_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_cuMemAdvise};
                __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_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, 2810, __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_cuMemAdvise);
                __Pyx_GIVEREF(__pyx_n_u_cuMemAdvise);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuMemAdvise);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2810, __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, 2810, __pyx_L1740_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":2808
 *         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_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":2811
 *             global __cuMemAdvise
 *             __cuMemAdvise = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemAdvise')
 *         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":2813
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemRangeGetAttribute
 *             __cuMemRangeGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemRangeGetAttribute')
 */
          {
            __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":2815
 *         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, 2815, __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, 2815, __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_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, 2815, __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_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, 2815, __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, 2815, __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_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, 2815, __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, 2815, __pyx_L1746_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":2813
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemRangeGetAttribute
 *             __cuMemRangeGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemRangeGetAttribute')
 */
            }
            __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":2816
 *             global __cuMemRangeGetAttribute
 *             __cuMemRangeGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemRangeGetAttribute')
 *         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":2818
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemRangeGetAttributes
 *             __cuMemRangeGetAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemRangeGetAttributes')
 */
          {
            __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":2820
 *         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, 2820, __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, 2820, __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_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, 2820, __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_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, 2820, __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, 2820, __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_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, 2820, __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, 2820, __pyx_L1752_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":2818
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuMemRangeGetAttributes
 *             __cuMemRangeGetAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemRangeGetAttributes')
 */
            }
            __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":2821
 *             global __cuMemRangeGetAttributes
 *             __cuMemRangeGetAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuMemRangeGetAttributes')
 *         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":2823
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuPointerSetAttribute
 *             __cuPointerSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuPointerSetAttribute')
 */
          {
            __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":2825
 *         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, 2825, __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, 2825, __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_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, 2825, __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_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, 2825, __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, 2825, __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_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, 2825, __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, 2825, __pyx_L1758_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":2823
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuPointerSetAttribute
 *             __cuPointerSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuPointerSetAttribute')
 */
            }
            __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":2826
 *             global __cuPointerSetAttribute
 *             __cuPointerSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuPointerSetAttribute')
 *         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":2828
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuPointerGetAttributes
 *             __cuPointerGetAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuPointerGetAttributes')
 */
          {
            __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":2830
 *         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, 2830, __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, 2830, __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_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, 2830, __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_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, 2830, __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, 2830, __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_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, 2830, __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, 2830, __pyx_L1764_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":2828
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuPointerGetAttributes
 *             __cuPointerGetAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuPointerGetAttributes')
 */
            }
            __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":2831
 *             global __cuPointerGetAttributes
 *             __cuPointerGetAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuPointerGetAttributes')
 *         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":2833
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuStreamCreate
 *             __cuStreamCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamCreate')
 */
          {
            __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":2835
 *         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, 2835, __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, 2835, __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_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, 2835, __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_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, 2835, __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, 2835, __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_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, 2835, __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, 2835, __pyx_L1770_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":2833
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuStreamCreate
 *             __cuStreamCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamCreate')
 */
            }
            __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":2836
 *             global __cuStreamCreate
 *             __cuStreamCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamCreate')
 *         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":2838
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuStreamCreateWithPriority
 *             __cuStreamCreateWithPriority = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamCreateWithPriority')
 */
          {
            __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":2840
 *         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, 2840, __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, 2840, __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_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, 2840, __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_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, 2840, __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, 2840, __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_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, 2840, __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, 2840, __pyx_L1776_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":2838
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuStreamCreateWithPriority
 *             __cuStreamCreateWithPriority = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamCreateWithPriority')
 */
            }
            __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":2841
 *             global __cuStreamCreateWithPriority
 *             __cuStreamCreateWithPriority = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamCreateWithPriority')
 *         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":2843
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuThreadExchangeStreamCaptureMode
 *             __cuThreadExchangeStreamCaptureMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuThreadExchangeStreamCaptureMode')
 */
          {
            __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":2845
 *         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, 2845, __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, 2845, __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_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, 2845, __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_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, 2845, __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, 2845, __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_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, 2845, __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, 2845, __pyx_L1782_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":2843
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuThreadExchangeStreamCaptureMode
 *             __cuThreadExchangeStreamCaptureMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuThreadExchangeStreamCaptureMode')
 */
            }
            __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":2846
 *             global __cuThreadExchangeStreamCaptureMode
 *             __cuThreadExchangeStreamCaptureMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuThreadExchangeStreamCaptureMode')
 *         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":2848
 *         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_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":2850
 *         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, 2850, __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, 2850, __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_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, 2850, __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_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, 2850, __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, 2850, __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_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, 2850, __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, 2850, __pyx_L1788_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":2848
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuStreamDestroy_v2
 *             __cuStreamDestroy_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuStreamDestroy_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_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":2851
 *             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_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":2853
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEventCreate
 *             __cuEventCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventCreate')
 */
          {
            __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":2855
 *         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, 2855, __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, 2855, __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_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, 2855, __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_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, 2855, __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, 2855, __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_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, 2855, __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, 2855, __pyx_L1794_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":2853
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEventCreate
 *             __cuEventCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventCreate')
 */
            }
            __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":2856
 *             global __cuEventCreate
 *             __cuEventCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventCreate')
 *         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":2858
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEventQuery
 *             __cuEventQuery = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventQuery')
 */
          {
            __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":2860
 *         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, 2860, __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, 2860, __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_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, 2860, __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_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, 2860, __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, 2860, __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_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, 2860, __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, 2860, __pyx_L1800_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":2858
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEventQuery
 *             __cuEventQuery = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventQuery')
 */
            }
            __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":2861
 *             global __cuEventQuery
 *             __cuEventQuery = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventQuery')
 *         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":2863
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEventSynchronize
 *             __cuEventSynchronize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventSynchronize')
 */
          {
            __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":2865
 *         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, 2865, __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, 2865, __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_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, 2865, __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_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, 2865, __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, 2865, __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_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, 2865, __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, 2865, __pyx_L1806_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":2863
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEventSynchronize
 *             __cuEventSynchronize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventSynchronize')
 */
            }
            __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":2866
 *             global __cuEventSynchronize
 *             __cuEventSynchronize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventSynchronize')
 *         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":2868
 *         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_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":2870
 *         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, 2870, __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, 2870, __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_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, 2870, __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_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, 2870, __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, 2870, __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_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, 2870, __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, 2870, __pyx_L1812_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":2868
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEventDestroy_v2
 *             __cuEventDestroy_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventDestroy_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_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":2871
 *             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_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":2873
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEventElapsedTime
 *             __cuEventElapsedTime = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventElapsedTime')
 */
          {
            __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":2875
 *         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, 2875, __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, 2875, __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_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, 2875, __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_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, 2875, __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, 2875, __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_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, 2875, __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, 2875, __pyx_L1818_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":2873
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuEventElapsedTime
 *             __cuEventElapsedTime = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventElapsedTime')
 */
            }
            __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":2876
 *             global __cuEventElapsedTime
 *             __cuEventElapsedTime = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventElapsedTime')
 *         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":2878
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuImportExternalMemory
 *             __cuImportExternalMemory = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuImportExternalMemory')
 */
          {
            __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":2880
 *         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, 2880, __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, 2880, __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_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, 2880, __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_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, 2880, __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, 2880, __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_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, 2880, __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, 2880, __pyx_L1824_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":2878
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuImportExternalMemory
 *             __cuImportExternalMemory = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuImportExternalMemory')
 */
            }
            __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":2881
 *             global __cuImportExternalMemory
 *             __cuImportExternalMemory = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuImportExternalMemory')
 *         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":2883
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuExternalMemoryGetMappedBuffer
 *             __cuExternalMemoryGetMappedBuffer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuExternalMemoryGetMappedBuffer')
 */
          {
            __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":2885
 *         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, 2885, __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, 2885, __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_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, 2885, __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_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, 2885, __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, 2885, __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_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, 2885, __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, 2885, __pyx_L1830_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":2883
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuExternalMemoryGetMappedBuffer
 *             __cuExternalMemoryGetMappedBuffer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuExternalMemoryGetMappedBuffer')
 */
            }
            __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":2886
 *             global __cuExternalMemoryGetMappedBuffer
 *             __cuExternalMemoryGetMappedBuffer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuExternalMemoryGetMappedBuffer')
 *         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":2888
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuExternalMemoryGetMappedMipmappedArray
 *             __cuExternalMemoryGetMappedMipmappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuExternalMemoryGetMappedMipmappedArray')
 */
          {
            __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":2890
 *         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, 2890, __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, 2890, __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_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, 2890, __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_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, 2890, __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, 2890, __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_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, 2890, __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, 2890, __pyx_L1836_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":2888
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuExternalMemoryGetMappedMipmappedArray
 *             __cuExternalMemoryGetMappedMipmappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuExternalMemoryGetMappedMipmappedArray')
 */
            }
            __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":2891
 *             global __cuExternalMemoryGetMappedMipmappedArray
 *             __cuExternalMemoryGetMappedMipmappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuExternalMemoryGetMappedMipmappedArray')
 *         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":2893
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDestroyExternalMemory
 *             __cuDestroyExternalMemory = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDestroyExternalMemory')
 */
          {
            __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":2895
 *         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, 2895, __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, 2895, __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_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, 2895, __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_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, 2895, __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, 2895, __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_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, 2895, __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, 2895, __pyx_L1842_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":2893
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDestroyExternalMemory
 *             __cuDestroyExternalMemory = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDestroyExternalMemory')
 */
            }
            __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":2896
 *             global __cuDestroyExternalMemory
 *             __cuDestroyExternalMemory = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDestroyExternalMemory')
 *         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":2898
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuImportExternalSemaphore
 *             __cuImportExternalSemaphore = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuImportExternalSemaphore')
 */
          {
            __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":2900
 *         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, 2900, __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, 2900, __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_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, 2900, __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_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, 2900, __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, 2900, __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_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, 2900, __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, 2900, __pyx_L1848_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":2898
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuImportExternalSemaphore
 *             __cuImportExternalSemaphore = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuImportExternalSemaphore')
 */
            }
            __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":2901
 *             global __cuImportExternalSemaphore
 *             __cuImportExternalSemaphore = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuImportExternalSemaphore')
 *         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":2903
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDestroyExternalSemaphore
 *             __cuDestroyExternalSemaphore = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDestroyExternalSemaphore')
 */
          {
            __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":2905
 *         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, 2905, __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, 2905, __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_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, 2905, __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_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, 2905, __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, 2905, __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_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, 2905, __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, 2905, __pyx_L1854_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":2903
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDestroyExternalSemaphore
 *             __cuDestroyExternalSemaphore = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDestroyExternalSemaphore')
 */
            }
            __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":2906
 *             global __cuDestroyExternalSemaphore
 *             __cuDestroyExternalSemaphore = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDestroyExternalSemaphore')
 *         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":2908
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFuncGetAttribute
 *             __cuFuncGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncGetAttribute')
 */
          {
            __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":2910
 *         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, 2910, __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, 2910, __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_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, 2910, __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_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, 2910, __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, 2910, __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_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, 2910, __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, 2910, __pyx_L1860_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":2908
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFuncGetAttribute
 *             __cuFuncGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncGetAttribute')
 */
            }
            __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":2911
 *             global __cuFuncGetAttribute
 *             __cuFuncGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncGetAttribute')
 *         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":2913
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFuncSetAttribute
 *             __cuFuncSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetAttribute')
 */
          {
            __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":2915
 *         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, 2915, __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, 2915, __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_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, 2915, __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_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, 2915, __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, 2915, __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_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, 2915, __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, 2915, __pyx_L1866_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":2913
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFuncSetAttribute
 *             __cuFuncSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetAttribute')
 */
            }
            __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":2916
 *             global __cuFuncSetAttribute
 *             __cuFuncSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetAttribute')
 *         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":2918
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFuncSetCacheConfig
 *             __cuFuncSetCacheConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetCacheConfig')
 */
          {
            __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":2920
 *         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, 2920, __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, 2920, __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_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, 2920, __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_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, 2920, __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, 2920, __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_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, 2920, __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, 2920, __pyx_L1872_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":2918
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFuncSetCacheConfig
 *             __cuFuncSetCacheConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetCacheConfig')
 */
            }
            __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":2921
 *             global __cuFuncSetCacheConfig
 *             __cuFuncSetCacheConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetCacheConfig')
 *         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":2923
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFuncSetSharedMemConfig
 *             __cuFuncSetSharedMemConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetSharedMemConfig')
 */
          {
            __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":2925
 *         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, 2925, __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, 2925, __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_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, 2925, __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_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, 2925, __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, 2925, __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_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, 2925, __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, 2925, __pyx_L1878_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":2923
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFuncSetSharedMemConfig
 *             __cuFuncSetSharedMemConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetSharedMemConfig')
 */
            }
            __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":2926
 *             global __cuFuncSetSharedMemConfig
 *             __cuFuncSetSharedMemConfig = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetSharedMemConfig')
 *         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":2928
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFuncGetModule
 *             __cuFuncGetModule = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncGetModule')
 */
          {
            __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":2930
 *         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, 2930, __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, 2930, __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_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, 2930, __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_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, 2930, __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, 2930, __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_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, 2930, __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, 2930, __pyx_L1884_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":2928
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFuncGetModule
 *             __cuFuncGetModule = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncGetModule')
 */
            }
            __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":2931
 *             global __cuFuncGetModule
 *             __cuFuncGetModule = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncGetModule')
 *         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":2933
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLaunchCooperativeKernelMultiDevice
 *             __cuLaunchCooperativeKernelMultiDevice = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchCooperativeKernelMultiDevice')
 */
          {
            __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":2935
 *         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, 2935, __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, 2935, __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_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, 2935, __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_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, 2935, __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, 2935, __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_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, 2935, __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, 2935, __pyx_L1890_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":2933
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLaunchCooperativeKernelMultiDevice
 *             __cuLaunchCooperativeKernelMultiDevice = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchCooperativeKernelMultiDevice')
 */
            }
            __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":2936
 *             global __cuLaunchCooperativeKernelMultiDevice
 *             __cuLaunchCooperativeKernelMultiDevice = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchCooperativeKernelMultiDevice')
 *         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":2938
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFuncSetBlockShape
 *             __cuFuncSetBlockShape = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetBlockShape')
 */
          {
            __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":2940
 *         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, 2940, __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, 2940, __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_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, 2940, __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_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, 2940, __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, 2940, __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_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, 2940, __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, 2940, __pyx_L1896_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":2938
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFuncSetBlockShape
 *             __cuFuncSetBlockShape = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetBlockShape')
 */
            }
            __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":2941
 *             global __cuFuncSetBlockShape
 *             __cuFuncSetBlockShape = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetBlockShape')
 *         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":2943
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFuncSetSharedSize
 *             __cuFuncSetSharedSize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetSharedSize')
 */
          {
            __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":2945
 *         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, 2945, __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, 2945, __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_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, 2945, __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_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, 2945, __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, 2945, __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_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, 2945, __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, 2945, __pyx_L1902_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":2943
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuFuncSetSharedSize
 *             __cuFuncSetSharedSize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetSharedSize')
 */
            }
            __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":2946
 *             global __cuFuncSetSharedSize
 *             __cuFuncSetSharedSize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuFuncSetSharedSize')
 *         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":2948
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuParamSetSize
 *             __cuParamSetSize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSetSize')
 */
          {
            __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":2950
 *         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, 2950, __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, 2950, __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_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, 2950, __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_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, 2950, __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, 2950, __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_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, 2950, __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, 2950, __pyx_L1908_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":2948
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuParamSetSize
 *             __cuParamSetSize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSetSize')
 */
            }
            __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":2951
 *             global __cuParamSetSize
 *             __cuParamSetSize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSetSize')
 *         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":2953
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuParamSeti
 *             __cuParamSeti = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSeti')
 */
          {
            __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":2955
 *         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, 2955, __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, 2955, __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_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, 2955, __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_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, 2955, __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, 2955, __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_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, 2955, __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, 2955, __pyx_L1914_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":2953
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuParamSeti
 *             __cuParamSeti = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSeti')
 */
            }
            __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":2956
 *             global __cuParamSeti
 *             __cuParamSeti = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSeti')
 *         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":2958
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuParamSetf
 *             __cuParamSetf = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSetf')
 */
          {
            __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":2960
 *         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, 2960, __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, 2960, __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_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, 2960, __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_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, 2960, __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, 2960, __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_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, 2960, __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, 2960, __pyx_L1920_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":2958
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuParamSetf
 *             __cuParamSetf = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSetf')
 */
            }
            __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":2961
 *             global __cuParamSetf
 *             __cuParamSetf = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSetf')
 *         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":2963
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuParamSetv
 *             __cuParamSetv = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSetv')
 */
          {
            __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":2965
 *         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, 2965, __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, 2965, __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_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, 2965, __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_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, 2965, __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, 2965, __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_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, 2965, __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, 2965, __pyx_L1926_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":2963
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuParamSetv
 *             __cuParamSetv = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSetv')
 */
            }
            __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":2966
 *             global __cuParamSetv
 *             __cuParamSetv = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSetv')
 *         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":2968
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLaunch
 *             __cuLaunch = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunch')
 */
          {
            __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":2970
 *         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, 2970, __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, 2970, __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_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, 2970, __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_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, 2970, __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, 2970, __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_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, 2970, __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, 2970, __pyx_L1932_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":2968
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLaunch
 *             __cuLaunch = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunch')
 */
            }
            __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":2971
 *             global __cuLaunch
 *             __cuLaunch = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunch')
 *         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":2973
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLaunchGrid
 *             __cuLaunchGrid = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchGrid')
 */
          {
            __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":2975
 *         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, 2975, __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, 2975, __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_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, 2975, __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_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, 2975, __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, 2975, __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_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, 2975, __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, 2975, __pyx_L1938_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":2973
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLaunchGrid
 *             __cuLaunchGrid = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchGrid')
 */
            }
            __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":2976
 *             global __cuLaunchGrid
 *             __cuLaunchGrid = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchGrid')
 *         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":2978
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLaunchGridAsync
 *             __cuLaunchGridAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchGridAsync')
 */
          {
            __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":2980
 *         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, 2980, __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, 2980, __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_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, 2980, __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_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, 2980, __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, 2980, __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_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, 2980, __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, 2980, __pyx_L1944_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":2978
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuLaunchGridAsync
 *             __cuLaunchGridAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchGridAsync')
 */
            }
            __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":2981
 *             global __cuLaunchGridAsync
 *             __cuLaunchGridAsync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuLaunchGridAsync')
 *         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":2983
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuParamSetTexRef
 *             __cuParamSetTexRef = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSetTexRef')
 */
          {
            __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":2985
 *         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, 2985, __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, 2985, __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_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, 2985, __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_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, 2985, __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, 2985, __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_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, 2985, __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, 2985, __pyx_L1950_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":2983
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuParamSetTexRef
 *             __cuParamSetTexRef = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSetTexRef')
 */
            }
            __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":2986
 *             global __cuParamSetTexRef
 *             __cuParamSetTexRef = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuParamSetTexRef')
 *         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":2988
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphCreate
 *             __cuGraphCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphCreate')
 */
          {
            __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":2990
 *         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, 2990, __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, 2990, __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_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, 2990, __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_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, 2990, __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, 2990, __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_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, 2990, __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, 2990, __pyx_L1956_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":2988
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphCreate
 *             __cuGraphCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphCreate')
 */
            }
            __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":2991
 *             global __cuGraphCreate
 *             __cuGraphCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphCreate')
 *         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":2993
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddKernelNode
 *             __cuGraphAddKernelNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddKernelNode')
 */
          {
            __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":2995
 *         try:
 *             global __cuGraphAddKernelNode
 *             __cuGraphAddKernelNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddKernelNode')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2995, __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, 2995, __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_cuGraphAddKernelNode};
                __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_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_cuGraphAddKernelNode};
                __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_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, 2995, __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_cuGraphAddKernelNode);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphAddKernelNode);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphAddKernelNode);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2995, __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, 2995, __pyx_L1962_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddKernelNode = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2993
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddKernelNode
 *             __cuGraphAddKernelNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddKernelNode')
 */
            }
            __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":2996
 *             global __cuGraphAddKernelNode
 *             __cuGraphAddKernelNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddKernelNode')
 *         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":2998
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphKernelNodeGetParams
 *             __cuGraphKernelNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeGetParams')
 */
          {
            __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":3000
 *         try:
 *             global __cuGraphKernelNodeGetParams
 *             __cuGraphKernelNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeGetParams')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3000, __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, 3000, __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_cuGraphKernelNodeGetParams};
                __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_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_cuGraphKernelNodeGetParams};
                __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_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, 3000, __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_cuGraphKernelNodeGetParams);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphKernelNodeGetParams);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphKernelNodeGetParams);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3000, __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, 3000, __pyx_L1968_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeGetParams = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":2998
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphKernelNodeGetParams
 *             __cuGraphKernelNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeGetParams')
 */
            }
            __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":3001
 *             global __cuGraphKernelNodeGetParams
 *             __cuGraphKernelNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeGetParams')
 *         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":3003
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphKernelNodeSetParams
 *             __cuGraphKernelNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeSetParams')
 */
          {
            __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":3005
 *         try:
 *             global __cuGraphKernelNodeSetParams
 *             __cuGraphKernelNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeSetParams')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3005, __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, 3005, __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_cuGraphKernelNodeSetParams};
                __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_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_cuGraphKernelNodeSetParams};
                __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_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, 3005, __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_cuGraphKernelNodeSetParams);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphKernelNodeSetParams);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphKernelNodeSetParams);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3005, __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, 3005, __pyx_L1974_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeSetParams = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3003
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphKernelNodeSetParams
 *             __cuGraphKernelNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeSetParams')
 */
            }
            __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":3006
 *             global __cuGraphKernelNodeSetParams
 *             __cuGraphKernelNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeSetParams')
 *         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":3008
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddMemcpyNode
 *             __cuGraphAddMemcpyNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddMemcpyNode')
 */
          {
            __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":3010
 *         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, 3010, __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, 3010, __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_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, 3010, __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_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, 3010, __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, 3010, __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_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, 3010, __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, 3010, __pyx_L1980_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":3008
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddMemcpyNode
 *             __cuGraphAddMemcpyNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddMemcpyNode')
 */
            }
            __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":3011
 *             global __cuGraphAddMemcpyNode
 *             __cuGraphAddMemcpyNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddMemcpyNode')
 *         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":3013
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphMemcpyNodeGetParams
 *             __cuGraphMemcpyNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemcpyNodeGetParams')
 */
          {
            __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":3015
 *         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, 3015, __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, 3015, __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_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, 3015, __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_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, 3015, __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, 3015, __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_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, 3015, __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, 3015, __pyx_L1986_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":3013
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphMemcpyNodeGetParams
 *             __cuGraphMemcpyNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemcpyNodeGetParams')
 */
            }
            __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":3016
 *             global __cuGraphMemcpyNodeGetParams
 *             __cuGraphMemcpyNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemcpyNodeGetParams')
 *         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":3018
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphMemcpyNodeSetParams
 *             __cuGraphMemcpyNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemcpyNodeSetParams')
 */
          {
            __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":3020
 *         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, 3020, __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, 3020, __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_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, 3020, __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_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, 3020, __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, 3020, __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_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, 3020, __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, 3020, __pyx_L1992_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":3018
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphMemcpyNodeSetParams
 *             __cuGraphMemcpyNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemcpyNodeSetParams')
 */
            }
            __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":3021
 *             global __cuGraphMemcpyNodeSetParams
 *             __cuGraphMemcpyNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemcpyNodeSetParams')
 *         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":3023
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddMemsetNode
 *             __cuGraphAddMemsetNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddMemsetNode')
 */
          {
            __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":3025
 *         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, 3025, __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, 3025, __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_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, 3025, __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_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, 3025, __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, 3025, __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_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, 3025, __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, 3025, __pyx_L1998_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":3023
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddMemsetNode
 *             __cuGraphAddMemsetNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddMemsetNode')
 */
            }
            __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":3026
 *             global __cuGraphAddMemsetNode
 *             __cuGraphAddMemsetNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddMemsetNode')
 *         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":3028
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphMemsetNodeGetParams
 *             __cuGraphMemsetNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemsetNodeGetParams')
 */
          {
            __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":3030
 *         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, 3030, __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, 3030, __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_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, 3030, __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_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, 3030, __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, 3030, __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_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, 3030, __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, 3030, __pyx_L2004_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":3028
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphMemsetNodeGetParams
 *             __cuGraphMemsetNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemsetNodeGetParams')
 */
            }
            __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":3031
 *             global __cuGraphMemsetNodeGetParams
 *             __cuGraphMemsetNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemsetNodeGetParams')
 *         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":3033
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphMemsetNodeSetParams
 *             __cuGraphMemsetNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemsetNodeSetParams')
 */
          {
            __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":3035
 *         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, 3035, __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, 3035, __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_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, 3035, __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_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, 3035, __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, 3035, __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_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, 3035, __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, 3035, __pyx_L2010_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":3033
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphMemsetNodeSetParams
 *             __cuGraphMemsetNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemsetNodeSetParams')
 */
            }
            __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":3036
 *             global __cuGraphMemsetNodeSetParams
 *             __cuGraphMemsetNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemsetNodeSetParams')
 *         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":3038
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddHostNode
 *             __cuGraphAddHostNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddHostNode')
 */
          {
            __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":3040
 *         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, 3040, __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, 3040, __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_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, 3040, __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_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, 3040, __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, 3040, __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_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, 3040, __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, 3040, __pyx_L2016_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":3038
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddHostNode
 *             __cuGraphAddHostNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddHostNode')
 */
            }
            __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":3041
 *             global __cuGraphAddHostNode
 *             __cuGraphAddHostNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddHostNode')
 *         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":3043
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphHostNodeGetParams
 *             __cuGraphHostNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphHostNodeGetParams')
 */
          {
            __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":3045
 *         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, 3045, __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, 3045, __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_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, 3045, __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_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, 3045, __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, 3045, __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_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, 3045, __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, 3045, __pyx_L2022_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":3043
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphHostNodeGetParams
 *             __cuGraphHostNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphHostNodeGetParams')
 */
            }
            __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":3046
 *             global __cuGraphHostNodeGetParams
 *             __cuGraphHostNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphHostNodeGetParams')
 *         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":3048
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphHostNodeSetParams
 *             __cuGraphHostNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphHostNodeSetParams')
 */
          {
            __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":3050
 *         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, 3050, __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, 3050, __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_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, 3050, __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_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, 3050, __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, 3050, __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_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, 3050, __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, 3050, __pyx_L2028_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":3048
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphHostNodeSetParams
 *             __cuGraphHostNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphHostNodeSetParams')
 */
            }
            __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":3051
 *             global __cuGraphHostNodeSetParams
 *             __cuGraphHostNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphHostNodeSetParams')
 *         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":3053
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddChildGraphNode
 *             __cuGraphAddChildGraphNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddChildGraphNode')
 */
          {
            __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":3055
 *         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, 3055, __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, 3055, __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_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, 3055, __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_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, 3055, __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, 3055, __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_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, 3055, __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, 3055, __pyx_L2034_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":3053
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddChildGraphNode
 *             __cuGraphAddChildGraphNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddChildGraphNode')
 */
            }
            __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":3056
 *             global __cuGraphAddChildGraphNode
 *             __cuGraphAddChildGraphNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddChildGraphNode')
 *         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":3058
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphChildGraphNodeGetGraph
 *             __cuGraphChildGraphNodeGetGraph = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphChildGraphNodeGetGraph')
 */
          {
            __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":3060
 *         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, 3060, __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, 3060, __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_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, 3060, __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_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, 3060, __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, 3060, __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_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, 3060, __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, 3060, __pyx_L2040_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":3058
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphChildGraphNodeGetGraph
 *             __cuGraphChildGraphNodeGetGraph = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphChildGraphNodeGetGraph')
 */
            }
            __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":3061
 *             global __cuGraphChildGraphNodeGetGraph
 *             __cuGraphChildGraphNodeGetGraph = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphChildGraphNodeGetGraph')
 *         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":3063
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddEmptyNode
 *             __cuGraphAddEmptyNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddEmptyNode')
 */
          {
            __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":3065
 *         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, 3065, __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, 3065, __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_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, 3065, __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_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, 3065, __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, 3065, __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_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, 3065, __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, 3065, __pyx_L2046_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":3063
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddEmptyNode
 *             __cuGraphAddEmptyNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddEmptyNode')
 */
            }
            __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":3066
 *             global __cuGraphAddEmptyNode
 *             __cuGraphAddEmptyNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddEmptyNode')
 *         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":3068
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddEventRecordNode
 *             __cuGraphAddEventRecordNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddEventRecordNode')
 */
          {
            __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":3070
 *         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, 3070, __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, 3070, __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_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, 3070, __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_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, 3070, __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, 3070, __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_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, 3070, __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, 3070, __pyx_L2052_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":3068
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddEventRecordNode
 *             __cuGraphAddEventRecordNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddEventRecordNode')
 */
            }
            __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":3071
 *             global __cuGraphAddEventRecordNode
 *             __cuGraphAddEventRecordNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddEventRecordNode')
 *         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":3073
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphEventRecordNodeGetEvent
 *             __cuGraphEventRecordNodeGetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphEventRecordNodeGetEvent')
 */
          {
            __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":3075
 *         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, 3075, __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, 3075, __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_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, 3075, __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_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, 3075, __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, 3075, __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_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, 3075, __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, 3075, __pyx_L2058_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":3073
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphEventRecordNodeGetEvent
 *             __cuGraphEventRecordNodeGetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphEventRecordNodeGetEvent')
 */
            }
            __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":3076
 *             global __cuGraphEventRecordNodeGetEvent
 *             __cuGraphEventRecordNodeGetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphEventRecordNodeGetEvent')
 *         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":3078
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphEventRecordNodeSetEvent
 *             __cuGraphEventRecordNodeSetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphEventRecordNodeSetEvent')
 */
          {
            __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":3080
 *         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, 3080, __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, 3080, __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_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, 3080, __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_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, 3080, __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, 3080, __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_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, 3080, __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, 3080, __pyx_L2064_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":3078
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphEventRecordNodeSetEvent
 *             __cuGraphEventRecordNodeSetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphEventRecordNodeSetEvent')
 */
            }
            __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":3081
 *             global __cuGraphEventRecordNodeSetEvent
 *             __cuGraphEventRecordNodeSetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphEventRecordNodeSetEvent')
 *         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":3083
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddEventWaitNode
 *             __cuGraphAddEventWaitNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddEventWaitNode')
 */
          {
            __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":3085
 *         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, 3085, __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, 3085, __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_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, 3085, __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_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, 3085, __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, 3085, __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_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, 3085, __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, 3085, __pyx_L2070_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":3083
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddEventWaitNode
 *             __cuGraphAddEventWaitNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddEventWaitNode')
 */
            }
            __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":3086
 *             global __cuGraphAddEventWaitNode
 *             __cuGraphAddEventWaitNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddEventWaitNode')
 *         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":3088
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphEventWaitNodeGetEvent
 *             __cuGraphEventWaitNodeGetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphEventWaitNodeGetEvent')
 */
          {
            __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":3090
 *         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, 3090, __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, 3090, __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_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, 3090, __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_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, 3090, __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, 3090, __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_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, 3090, __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, 3090, __pyx_L2076_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":3088
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphEventWaitNodeGetEvent
 *             __cuGraphEventWaitNodeGetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphEventWaitNodeGetEvent')
 */
            }
            __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":3091
 *             global __cuGraphEventWaitNodeGetEvent
 *             __cuGraphEventWaitNodeGetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphEventWaitNodeGetEvent')
 *         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":3093
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphEventWaitNodeSetEvent
 *             __cuGraphEventWaitNodeSetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphEventWaitNodeSetEvent')
 */
          {
            __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":3095
 *         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, 3095, __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, 3095, __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_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, 3095, __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_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, 3095, __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, 3095, __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_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, 3095, __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, 3095, __pyx_L2082_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":3093
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphEventWaitNodeSetEvent
 *             __cuGraphEventWaitNodeSetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphEventWaitNodeSetEvent')
 */
            }
            __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":3096
 *             global __cuGraphEventWaitNodeSetEvent
 *             __cuGraphEventWaitNodeSetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphEventWaitNodeSetEvent')
 *         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":3098
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddExternalSemaphoresSignalNode
 *             __cuGraphAddExternalSemaphoresSignalNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddExternalSemaphoresSignalNode')
 */
          {
            __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":3100
 *         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, 3100, __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, 3100, __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_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, 3100, __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_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, 3100, __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, 3100, __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_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, 3100, __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, 3100, __pyx_L2088_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":3098
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddExternalSemaphoresSignalNode
 *             __cuGraphAddExternalSemaphoresSignalNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddExternalSemaphoresSignalNode')
 */
            }
            __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":3101
 *             global __cuGraphAddExternalSemaphoresSignalNode
 *             __cuGraphAddExternalSemaphoresSignalNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddExternalSemaphoresSignalNode')
 *         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":3103
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExternalSemaphoresSignalNodeGetParams
 *             __cuGraphExternalSemaphoresSignalNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresSignalNodeGetParams')
 */
          {
            __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":3105
 *         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, 3105, __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, 3105, __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_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, 3105, __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_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, 3105, __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, 3105, __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_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, 3105, __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, 3105, __pyx_L2094_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":3103
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExternalSemaphoresSignalNodeGetParams
 *             __cuGraphExternalSemaphoresSignalNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresSignalNodeGetParams')
 */
            }
            __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":3106
 *             global __cuGraphExternalSemaphoresSignalNodeGetParams
 *             __cuGraphExternalSemaphoresSignalNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresSignalNodeGetParams')
 *         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":3108
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExternalSemaphoresSignalNodeSetParams
 *             __cuGraphExternalSemaphoresSignalNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresSignalNodeSetParams')
 */
          {
            __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":3110
 *         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, 3110, __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, 3110, __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_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, 3110, __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_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, 3110, __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, 3110, __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_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, 3110, __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, 3110, __pyx_L2100_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":3108
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExternalSemaphoresSignalNodeSetParams
 *             __cuGraphExternalSemaphoresSignalNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresSignalNodeSetParams')
 */
            }
            __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":3111
 *             global __cuGraphExternalSemaphoresSignalNodeSetParams
 *             __cuGraphExternalSemaphoresSignalNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresSignalNodeSetParams')
 *         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":3113
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddExternalSemaphoresWaitNode
 *             __cuGraphAddExternalSemaphoresWaitNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddExternalSemaphoresWaitNode')
 */
          {
            __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":3115
 *         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, 3115, __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, 3115, __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_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, 3115, __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_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, 3115, __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, 3115, __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_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, 3115, __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, 3115, __pyx_L2106_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":3113
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddExternalSemaphoresWaitNode
 *             __cuGraphAddExternalSemaphoresWaitNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddExternalSemaphoresWaitNode')
 */
            }
            __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":3116
 *             global __cuGraphAddExternalSemaphoresWaitNode
 *             __cuGraphAddExternalSemaphoresWaitNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddExternalSemaphoresWaitNode')
 *         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":3118
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExternalSemaphoresWaitNodeGetParams
 *             __cuGraphExternalSemaphoresWaitNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresWaitNodeGetParams')
 */
          {
            __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":3120
 *         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, 3120, __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, 3120, __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_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, 3120, __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_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, 3120, __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, 3120, __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_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, 3120, __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, 3120, __pyx_L2112_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":3118
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExternalSemaphoresWaitNodeGetParams
 *             __cuGraphExternalSemaphoresWaitNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresWaitNodeGetParams')
 */
            }
            __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":3121
 *             global __cuGraphExternalSemaphoresWaitNodeGetParams
 *             __cuGraphExternalSemaphoresWaitNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresWaitNodeGetParams')
 *         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":3123
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExternalSemaphoresWaitNodeSetParams
 *             __cuGraphExternalSemaphoresWaitNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresWaitNodeSetParams')
 */
          {
            __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":3125
 *         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, 3125, __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, 3125, __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_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, 3125, __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_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, 3125, __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, 3125, __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_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, 3125, __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, 3125, __pyx_L2118_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":3123
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExternalSemaphoresWaitNodeSetParams
 *             __cuGraphExternalSemaphoresWaitNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresWaitNodeSetParams')
 */
            }
            __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":3126
 *             global __cuGraphExternalSemaphoresWaitNodeSetParams
 *             __cuGraphExternalSemaphoresWaitNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExternalSemaphoresWaitNodeSetParams')
 *         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":3128
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddBatchMemOpNode
 *             __cuGraphAddBatchMemOpNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddBatchMemOpNode')
 */
          {
            __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":3130
 *         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, 3130, __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, 3130, __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_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, 3130, __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_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, 3130, __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, 3130, __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_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, 3130, __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, 3130, __pyx_L2124_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":3128
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddBatchMemOpNode
 *             __cuGraphAddBatchMemOpNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddBatchMemOpNode')
 */
            }
            __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":3131
 *             global __cuGraphAddBatchMemOpNode
 *             __cuGraphAddBatchMemOpNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddBatchMemOpNode')
 *         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":3133
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphBatchMemOpNodeGetParams
 *             __cuGraphBatchMemOpNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphBatchMemOpNodeGetParams')
 */
          {
            __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":3135
 *         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, 3135, __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, 3135, __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_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, 3135, __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_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, 3135, __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, 3135, __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_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, 3135, __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, 3135, __pyx_L2130_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":3133
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphBatchMemOpNodeGetParams
 *             __cuGraphBatchMemOpNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphBatchMemOpNodeGetParams')
 */
            }
            __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":3136
 *             global __cuGraphBatchMemOpNodeGetParams
 *             __cuGraphBatchMemOpNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphBatchMemOpNodeGetParams')
 *         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":3138
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphBatchMemOpNodeSetParams
 *             __cuGraphBatchMemOpNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphBatchMemOpNodeSetParams')
 */
          {
            __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":3140
 *         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, 3140, __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, 3140, __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_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, 3140, __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_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, 3140, __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, 3140, __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_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, 3140, __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, 3140, __pyx_L2136_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":3138
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphBatchMemOpNodeSetParams
 *             __cuGraphBatchMemOpNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphBatchMemOpNodeSetParams')
 */
            }
            __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":3141
 *             global __cuGraphBatchMemOpNodeSetParams
 *             __cuGraphBatchMemOpNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphBatchMemOpNodeSetParams')
 *         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":3143
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecBatchMemOpNodeSetParams
 *             __cuGraphExecBatchMemOpNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecBatchMemOpNodeSetParams')
 */
          {
            __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":3145
 *         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, 3145, __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, 3145, __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_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, 3145, __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_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, 3145, __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, 3145, __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_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, 3145, __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, 3145, __pyx_L2142_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":3143
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecBatchMemOpNodeSetParams
 *             __cuGraphExecBatchMemOpNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecBatchMemOpNodeSetParams')
 */
            }
            __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":3146
 *             global __cuGraphExecBatchMemOpNodeSetParams
 *             __cuGraphExecBatchMemOpNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecBatchMemOpNodeSetParams')
 *         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":3148
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddMemAllocNode
 *             __cuGraphAddMemAllocNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddMemAllocNode')
 */
          {
            __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":3150
 *         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, 3150, __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, 3150, __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_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, 3150, __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_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, 3150, __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, 3150, __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_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, 3150, __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, 3150, __pyx_L2148_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":3148
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddMemAllocNode
 *             __cuGraphAddMemAllocNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddMemAllocNode')
 */
            }
            __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":3151
 *             global __cuGraphAddMemAllocNode
 *             __cuGraphAddMemAllocNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddMemAllocNode')
 *         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":3153
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphMemAllocNodeGetParams
 *             __cuGraphMemAllocNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemAllocNodeGetParams')
 */
          {
            __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":3155
 *         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, 3155, __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, 3155, __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_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, 3155, __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_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, 3155, __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, 3155, __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_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, 3155, __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, 3155, __pyx_L2154_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":3153
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphMemAllocNodeGetParams
 *             __cuGraphMemAllocNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemAllocNodeGetParams')
 */
            }
            __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":3156
 *             global __cuGraphMemAllocNodeGetParams
 *             __cuGraphMemAllocNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemAllocNodeGetParams')
 *         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":3158
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddMemFreeNode
 *             __cuGraphAddMemFreeNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddMemFreeNode')
 */
          {
            __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":3160
 *         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, 3160, __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, 3160, __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_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, 3160, __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_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, 3160, __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, 3160, __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_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, 3160, __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, 3160, __pyx_L2160_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":3158
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddMemFreeNode
 *             __cuGraphAddMemFreeNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddMemFreeNode')
 */
            }
            __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":3161
 *             global __cuGraphAddMemFreeNode
 *             __cuGraphAddMemFreeNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddMemFreeNode')
 *         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":3163
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphMemFreeNodeGetParams
 *             __cuGraphMemFreeNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemFreeNodeGetParams')
 */
          {
            __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":3165
 *         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, 3165, __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, 3165, __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_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, 3165, __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_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, 3165, __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, 3165, __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_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, 3165, __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, 3165, __pyx_L2166_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":3163
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphMemFreeNodeGetParams
 *             __cuGraphMemFreeNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemFreeNodeGetParams')
 */
            }
            __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":3166
 *             global __cuGraphMemFreeNodeGetParams
 *             __cuGraphMemFreeNodeGetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphMemFreeNodeGetParams')
 *         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":3168
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGraphMemTrim
 *             __cuDeviceGraphMemTrim = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGraphMemTrim')
 */
          {
            __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":3170
 *         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, 3170, __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, 3170, __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_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, 3170, __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_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, 3170, __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, 3170, __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_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, 3170, __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, 3170, __pyx_L2172_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":3168
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGraphMemTrim
 *             __cuDeviceGraphMemTrim = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGraphMemTrim')
 */
            }
            __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":3171
 *             global __cuDeviceGraphMemTrim
 *             __cuDeviceGraphMemTrim = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGraphMemTrim')
 *         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":3173
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetGraphMemAttribute
 *             __cuDeviceGetGraphMemAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetGraphMemAttribute')
 */
          {
            __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":3175
 *         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, 3175, __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, 3175, __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_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, 3175, __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_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, 3175, __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, 3175, __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_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, 3175, __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, 3175, __pyx_L2178_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":3173
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetGraphMemAttribute
 *             __cuDeviceGetGraphMemAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetGraphMemAttribute')
 */
            }
            __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":3176
 *             global __cuDeviceGetGraphMemAttribute
 *             __cuDeviceGetGraphMemAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetGraphMemAttribute')
 *         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":3178
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceSetGraphMemAttribute
 *             __cuDeviceSetGraphMemAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceSetGraphMemAttribute')
 */
          {
            __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":3180
 *         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, 3180, __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, 3180, __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_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, 3180, __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_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, 3180, __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, 3180, __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_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, 3180, __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, 3180, __pyx_L2184_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":3178
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceSetGraphMemAttribute
 *             __cuDeviceSetGraphMemAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceSetGraphMemAttribute')
 */
            }
            __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":3181
 *             global __cuDeviceSetGraphMemAttribute
 *             __cuDeviceSetGraphMemAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceSetGraphMemAttribute')
 *         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":3183
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphClone
 *             __cuGraphClone = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphClone')
 */
          {
            __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":3185
 *         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, 3185, __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, 3185, __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_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, 3185, __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_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, 3185, __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, 3185, __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_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, 3185, __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, 3185, __pyx_L2190_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":3183
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphClone
 *             __cuGraphClone = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphClone')
 */
            }
            __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":3186
 *             global __cuGraphClone
 *             __cuGraphClone = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphClone')
 *         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":3188
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphNodeFindInClone
 *             __cuGraphNodeFindInClone = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeFindInClone')
 */
          {
            __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":3190
 *         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, 3190, __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, 3190, __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_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, 3190, __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_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, 3190, __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, 3190, __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_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, 3190, __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, 3190, __pyx_L2196_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":3188
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphNodeFindInClone
 *             __cuGraphNodeFindInClone = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeFindInClone')
 */
            }
            __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":3191
 *             global __cuGraphNodeFindInClone
 *             __cuGraphNodeFindInClone = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeFindInClone')
 *         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":3193
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphNodeGetType
 *             __cuGraphNodeGetType = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeGetType')
 */
          {
            __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":3195
 *         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, 3195, __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, 3195, __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_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, 3195, __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_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, 3195, __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, 3195, __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_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, 3195, __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, 3195, __pyx_L2202_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":3193
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphNodeGetType
 *             __cuGraphNodeGetType = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeGetType')
 */
            }
            __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":3196
 *             global __cuGraphNodeGetType
 *             __cuGraphNodeGetType = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeGetType')
 *         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":3198
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphGetNodes
 *             __cuGraphGetNodes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphGetNodes')
 */
          {
            __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":3200
 *         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, 3200, __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, 3200, __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_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, 3200, __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_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, 3200, __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, 3200, __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_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, 3200, __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, 3200, __pyx_L2208_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":3198
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphGetNodes
 *             __cuGraphGetNodes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphGetNodes')
 */
            }
            __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":3201
 *             global __cuGraphGetNodes
 *             __cuGraphGetNodes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphGetNodes')
 *         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":3203
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphGetRootNodes
 *             __cuGraphGetRootNodes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphGetRootNodes')
 */
          {
            __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":3205
 *         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, 3205, __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, 3205, __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_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, 3205, __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_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, 3205, __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, 3205, __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_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, 3205, __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, 3205, __pyx_L2214_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":3203
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphGetRootNodes
 *             __cuGraphGetRootNodes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphGetRootNodes')
 */
            }
            __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":3206
 *             global __cuGraphGetRootNodes
 *             __cuGraphGetRootNodes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphGetRootNodes')
 *         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":3208
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphGetEdges
 *             __cuGraphGetEdges = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphGetEdges')
 */
          {
            __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":3210
 *         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, 3210, __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, 3210, __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_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, 3210, __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_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, 3210, __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, 3210, __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_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, 3210, __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, 3210, __pyx_L2220_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":3208
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphGetEdges
 *             __cuGraphGetEdges = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphGetEdges')
 */
            }
            __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":3211
 *             global __cuGraphGetEdges
 *             __cuGraphGetEdges = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphGetEdges')
 *         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":3213
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphNodeGetDependencies
 *             __cuGraphNodeGetDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeGetDependencies')
 */
          {
            __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":3215
 *         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, 3215, __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, 3215, __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_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, 3215, __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_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, 3215, __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, 3215, __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_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, 3215, __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, 3215, __pyx_L2226_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":3213
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphNodeGetDependencies
 *             __cuGraphNodeGetDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeGetDependencies')
 */
            }
            __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":3216
 *             global __cuGraphNodeGetDependencies
 *             __cuGraphNodeGetDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeGetDependencies')
 *         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":3218
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphNodeGetDependentNodes
 *             __cuGraphNodeGetDependentNodes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeGetDependentNodes')
 */
          {
            __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":3220
 *         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, 3220, __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, 3220, __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_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, 3220, __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_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, 3220, __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, 3220, __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_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, 3220, __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, 3220, __pyx_L2232_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":3218
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphNodeGetDependentNodes
 *             __cuGraphNodeGetDependentNodes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeGetDependentNodes')
 */
            }
            __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":3221
 *             global __cuGraphNodeGetDependentNodes
 *             __cuGraphNodeGetDependentNodes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeGetDependentNodes')
 *         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":3223
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddDependencies
 *             __cuGraphAddDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddDependencies')
 */
          {
            __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":3225
 *         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, 3225, __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, 3225, __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_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, 3225, __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_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, 3225, __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, 3225, __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_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, 3225, __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, 3225, __pyx_L2238_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":3223
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphAddDependencies
 *             __cuGraphAddDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddDependencies')
 */
            }
            __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":3226
 *             global __cuGraphAddDependencies
 *             __cuGraphAddDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphAddDependencies')
 *         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":3228
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphRemoveDependencies
 *             __cuGraphRemoveDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphRemoveDependencies')
 */
          {
            __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":3230
 *         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, 3230, __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, 3230, __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_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, 3230, __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_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, 3230, __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, 3230, __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_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, 3230, __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, 3230, __pyx_L2244_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":3228
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphRemoveDependencies
 *             __cuGraphRemoveDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphRemoveDependencies')
 */
            }
            __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":3231
 *             global __cuGraphRemoveDependencies
 *             __cuGraphRemoveDependencies = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphRemoveDependencies')
 *         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":3233
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphDestroyNode
 *             __cuGraphDestroyNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphDestroyNode')
 */
          {
            __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":3235
 *         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, 3235, __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, 3235, __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_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, 3235, __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_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, 3235, __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, 3235, __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_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, 3235, __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, 3235, __pyx_L2250_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":3233
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphDestroyNode
 *             __cuGraphDestroyNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphDestroyNode')
 */
            }
            __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":3236
 *             global __cuGraphDestroyNode
 *             __cuGraphDestroyNode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphDestroyNode')
 *         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":3238
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphInstantiate_v2
 *             __cuGraphInstantiate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphInstantiate_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":3240
 *         try:
 *             global __cuGraphInstantiate_v2
 *             __cuGraphInstantiate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphInstantiate_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3240, __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, 3240, __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_cuGraphInstantiate_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, 3240, __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_cuGraphInstantiate_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, 3240, __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, 3240, __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_cuGraphInstantiate_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphInstantiate_v2);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphInstantiate_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3240, __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, 3240, __pyx_L2256_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphInstantiate_v2 = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3238
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphInstantiate_v2
 *             __cuGraphInstantiate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphInstantiate_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_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":3241
 *             global __cuGraphInstantiate_v2
 *             __cuGraphInstantiate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphInstantiate_v2')
 *         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":3243
 *         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":3245
 *         try:
 *             global __cuGraphInstantiateWithFlags
 *             __cuGraphInstantiateWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphInstantiateWithFlags')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3245, __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, 3245, __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_cuGraphInstantiateWithFlags};
                __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_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_cuGraphInstantiateWithFlags};
                __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_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, 3245, __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_cuGraphInstantiateWithFlags);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphInstantiateWithFlags);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphInstantiateWithFlags);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3245, __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, 3245, __pyx_L2262_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":3243
 *         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_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":3246
 *             global __cuGraphInstantiateWithFlags
 *             __cuGraphInstantiateWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphInstantiateWithFlags')
 *         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":3248
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecKernelNodeSetParams
 *             __cuGraphExecKernelNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecKernelNodeSetParams')
 */
          {
            __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":3250
 *         try:
 *             global __cuGraphExecKernelNodeSetParams
 *             __cuGraphExecKernelNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecKernelNodeSetParams')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3250, __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, 3250, __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_cuGraphExecKernelNodeSetParams};
                __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_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_cuGraphExecKernelNodeSetParams};
                __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_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, 3250, __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_cuGraphExecKernelNodeSetParams);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphExecKernelNodeSetParams);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGraphExecKernelNodeSetParams);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3250, __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, 3250, __pyx_L2268_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecKernelNodeSetParams = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3248
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecKernelNodeSetParams
 *             __cuGraphExecKernelNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecKernelNodeSetParams')
 */
            }
            __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":3251
 *             global __cuGraphExecKernelNodeSetParams
 *             __cuGraphExecKernelNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecKernelNodeSetParams')
 *         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":3253
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecMemcpyNodeSetParams
 *             __cuGraphExecMemcpyNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecMemcpyNodeSetParams')
 */
          {
            __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":3255
 *         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, 3255, __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, 3255, __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_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, 3255, __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_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, 3255, __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, 3255, __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_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, 3255, __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, 3255, __pyx_L2274_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":3253
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecMemcpyNodeSetParams
 *             __cuGraphExecMemcpyNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecMemcpyNodeSetParams')
 */
            }
            __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":3256
 *             global __cuGraphExecMemcpyNodeSetParams
 *             __cuGraphExecMemcpyNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecMemcpyNodeSetParams')
 *         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":3258
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecMemsetNodeSetParams
 *             __cuGraphExecMemsetNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecMemsetNodeSetParams')
 */
          {
            __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":3260
 *         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, 3260, __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, 3260, __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_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, 3260, __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_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, 3260, __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, 3260, __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_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, 3260, __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, 3260, __pyx_L2280_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":3258
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecMemsetNodeSetParams
 *             __cuGraphExecMemsetNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecMemsetNodeSetParams')
 */
            }
            __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":3261
 *             global __cuGraphExecMemsetNodeSetParams
 *             __cuGraphExecMemsetNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecMemsetNodeSetParams')
 *         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":3263
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecHostNodeSetParams
 *             __cuGraphExecHostNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecHostNodeSetParams')
 */
          {
            __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":3265
 *         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, 3265, __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, 3265, __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_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, 3265, __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_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, 3265, __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, 3265, __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_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, 3265, __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, 3265, __pyx_L2286_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":3263
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecHostNodeSetParams
 *             __cuGraphExecHostNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecHostNodeSetParams')
 */
            }
            __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":3266
 *             global __cuGraphExecHostNodeSetParams
 *             __cuGraphExecHostNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecHostNodeSetParams')
 *         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":3268
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecChildGraphNodeSetParams
 *             __cuGraphExecChildGraphNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecChildGraphNodeSetParams')
 */
          {
            __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":3270
 *         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, 3270, __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, 3270, __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_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, 3270, __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_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, 3270, __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, 3270, __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_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, 3270, __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, 3270, __pyx_L2292_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":3268
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecChildGraphNodeSetParams
 *             __cuGraphExecChildGraphNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecChildGraphNodeSetParams')
 */
            }
            __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":3271
 *             global __cuGraphExecChildGraphNodeSetParams
 *             __cuGraphExecChildGraphNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecChildGraphNodeSetParams')
 *         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":3273
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecEventRecordNodeSetEvent
 *             __cuGraphExecEventRecordNodeSetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecEventRecordNodeSetEvent')
 */
          {
            __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":3275
 *         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, 3275, __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, 3275, __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_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, 3275, __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_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, 3275, __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, 3275, __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_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, 3275, __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, 3275, __pyx_L2298_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":3273
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecEventRecordNodeSetEvent
 *             __cuGraphExecEventRecordNodeSetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecEventRecordNodeSetEvent')
 */
            }
            __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":3276
 *             global __cuGraphExecEventRecordNodeSetEvent
 *             __cuGraphExecEventRecordNodeSetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecEventRecordNodeSetEvent')
 *         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":3278
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecEventWaitNodeSetEvent
 *             __cuGraphExecEventWaitNodeSetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecEventWaitNodeSetEvent')
 */
          {
            __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":3280
 *         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, 3280, __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, 3280, __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_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, 3280, __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_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, 3280, __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, 3280, __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_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, 3280, __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, 3280, __pyx_L2304_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":3278
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecEventWaitNodeSetEvent
 *             __cuGraphExecEventWaitNodeSetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecEventWaitNodeSetEvent')
 */
            }
            __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":3281
 *             global __cuGraphExecEventWaitNodeSetEvent
 *             __cuGraphExecEventWaitNodeSetEvent = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecEventWaitNodeSetEvent')
 *         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":3283
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecExternalSemaphoresSignalNodeSetParams
 *             __cuGraphExecExternalSemaphoresSignalNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecExternalSemaphoresSignalNodeSetParams')
 */
          {
            __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":3285
 *         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, 3285, __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, 3285, __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_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, 3285, __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_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, 3285, __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, 3285, __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_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, 3285, __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, 3285, __pyx_L2310_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":3283
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecExternalSemaphoresSignalNodeSetParams
 *             __cuGraphExecExternalSemaphoresSignalNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecExternalSemaphoresSignalNodeSetParams')
 */
            }
            __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":3286
 *             global __cuGraphExecExternalSemaphoresSignalNodeSetParams
 *             __cuGraphExecExternalSemaphoresSignalNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecExternalSemaphoresSignalNodeSetParams')
 *         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":3288
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecExternalSemaphoresWaitNodeSetParams
 *             __cuGraphExecExternalSemaphoresWaitNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecExternalSemaphoresWaitNodeSetParams')
 */
          {
            __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":3290
 *         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, 3290, __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, 3290, __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_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, 3290, __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_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, 3290, __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, 3290, __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_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, 3290, __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, 3290, __pyx_L2316_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":3288
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecExternalSemaphoresWaitNodeSetParams
 *             __cuGraphExecExternalSemaphoresWaitNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecExternalSemaphoresWaitNodeSetParams')
 */
            }
            __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":3291
 *             global __cuGraphExecExternalSemaphoresWaitNodeSetParams
 *             __cuGraphExecExternalSemaphoresWaitNodeSetParams = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecExternalSemaphoresWaitNodeSetParams')
 *         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":3293
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphNodeSetEnabled
 *             __cuGraphNodeSetEnabled = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeSetEnabled')
 */
          {
            __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":3295
 *         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, 3295, __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, 3295, __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_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, 3295, __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_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, 3295, __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, 3295, __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_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, 3295, __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, 3295, __pyx_L2322_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":3293
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphNodeSetEnabled
 *             __cuGraphNodeSetEnabled = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeSetEnabled')
 */
            }
            __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":3296
 *             global __cuGraphNodeSetEnabled
 *             __cuGraphNodeSetEnabled = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeSetEnabled')
 *         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":3298
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphNodeGetEnabled
 *             __cuGraphNodeGetEnabled = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeGetEnabled')
 */
          {
            __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":3300
 *         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, 3300, __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, 3300, __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_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, 3300, __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_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, 3300, __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, 3300, __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_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, 3300, __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, 3300, __pyx_L2328_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":3298
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphNodeGetEnabled
 *             __cuGraphNodeGetEnabled = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeGetEnabled')
 */
            }
            __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":3301
 *             global __cuGraphNodeGetEnabled
 *             __cuGraphNodeGetEnabled = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphNodeGetEnabled')
 *         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":3303
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecDestroy
 *             __cuGraphExecDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecDestroy')
 */
          {
            __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":3305
 *         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, 3305, __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, 3305, __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_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, 3305, __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_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, 3305, __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, 3305, __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_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, 3305, __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, 3305, __pyx_L2334_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":3303
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecDestroy
 *             __cuGraphExecDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecDestroy')
 */
            }
            __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":3306
 *             global __cuGraphExecDestroy
 *             __cuGraphExecDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecDestroy')
 *         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":3308
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphDestroy
 *             __cuGraphDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphDestroy')
 */
          {
            __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":3310
 *         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, 3310, __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, 3310, __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_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, 3310, __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_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, 3310, __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, 3310, __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_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, 3310, __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, 3310, __pyx_L2340_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":3308
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphDestroy
 *             __cuGraphDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphDestroy')
 */
            }
            __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":3311
 *             global __cuGraphDestroy
 *             __cuGraphDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphDestroy')
 *         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":3313
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecUpdate
 *             __cuGraphExecUpdate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecUpdate')
 */
          {
            __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":3315
 *         try:
 *             global __cuGraphExecUpdate
 *             __cuGraphExecUpdate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecUpdate')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3315, __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, 3315, __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_cuGraphExecUpdate};
                __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_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_cuGraphExecUpdate};
                __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_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, 3315, __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_cuGraphExecUpdate);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphExecUpdate);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphExecUpdate);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3315, __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, 3315, __pyx_L2346_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecUpdate = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3313
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphExecUpdate
 *             __cuGraphExecUpdate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecUpdate')
 */
            }
            __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":3316
 *             global __cuGraphExecUpdate
 *             __cuGraphExecUpdate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphExecUpdate')
 *         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":3318
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphKernelNodeCopyAttributes
 *             __cuGraphKernelNodeCopyAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeCopyAttributes')
 */
          {
            __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":3320
 *         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, 3320, __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, 3320, __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_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, 3320, __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_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, 3320, __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, 3320, __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_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, 3320, __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, 3320, __pyx_L2352_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":3318
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphKernelNodeCopyAttributes
 *             __cuGraphKernelNodeCopyAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeCopyAttributes')
 */
            }
            __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":3321
 *             global __cuGraphKernelNodeCopyAttributes
 *             __cuGraphKernelNodeCopyAttributes = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeCopyAttributes')
 *         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":3323
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphKernelNodeGetAttribute
 *             __cuGraphKernelNodeGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeGetAttribute')
 */
          {
            __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":3325
 *         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, 3325, __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, 3325, __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_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, 3325, __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_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, 3325, __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, 3325, __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_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, 3325, __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, 3325, __pyx_L2358_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":3323
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphKernelNodeGetAttribute
 *             __cuGraphKernelNodeGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeGetAttribute')
 */
            }
            __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":3326
 *             global __cuGraphKernelNodeGetAttribute
 *             __cuGraphKernelNodeGetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeGetAttribute')
 *         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":3328
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphKernelNodeSetAttribute
 *             __cuGraphKernelNodeSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeSetAttribute')
 */
          {
            __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":3330
 *         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, 3330, __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, 3330, __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_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, 3330, __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_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, 3330, __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, 3330, __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_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, 3330, __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, 3330, __pyx_L2364_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":3328
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphKernelNodeSetAttribute
 *             __cuGraphKernelNodeSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeSetAttribute')
 */
            }
            __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":3331
 *             global __cuGraphKernelNodeSetAttribute
 *             __cuGraphKernelNodeSetAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphKernelNodeSetAttribute')
 *         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":3333
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphDebugDotPrint
 *             __cuGraphDebugDotPrint = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphDebugDotPrint')
 */
          {
            __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":3335
 *         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, 3335, __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, 3335, __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_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, 3335, __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_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, 3335, __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, 3335, __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_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, 3335, __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, 3335, __pyx_L2370_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":3333
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphDebugDotPrint
 *             __cuGraphDebugDotPrint = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphDebugDotPrint')
 */
            }
            __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":3336
 *             global __cuGraphDebugDotPrint
 *             __cuGraphDebugDotPrint = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphDebugDotPrint')
 *         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":3338
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuUserObjectCreate
 *             __cuUserObjectCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuUserObjectCreate')
 */
          {
            __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":3340
 *         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, 3340, __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, 3340, __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_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, 3340, __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_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, 3340, __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, 3340, __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_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, 3340, __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, 3340, __pyx_L2376_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":3338
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuUserObjectCreate
 *             __cuUserObjectCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuUserObjectCreate')
 */
            }
            __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":3341
 *             global __cuUserObjectCreate
 *             __cuUserObjectCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuUserObjectCreate')
 *         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":3343
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuUserObjectRetain
 *             __cuUserObjectRetain = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuUserObjectRetain')
 */
          {
            __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":3345
 *         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, 3345, __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, 3345, __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_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, 3345, __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_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, 3345, __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, 3345, __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_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, 3345, __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, 3345, __pyx_L2382_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":3343
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuUserObjectRetain
 *             __cuUserObjectRetain = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuUserObjectRetain')
 */
            }
            __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":3346
 *             global __cuUserObjectRetain
 *             __cuUserObjectRetain = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuUserObjectRetain')
 *         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":3348
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuUserObjectRelease
 *             __cuUserObjectRelease = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuUserObjectRelease')
 */
          {
            __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":3350
 *         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, 3350, __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, 3350, __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_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, 3350, __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_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, 3350, __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, 3350, __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_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, 3350, __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, 3350, __pyx_L2388_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":3348
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuUserObjectRelease
 *             __cuUserObjectRelease = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuUserObjectRelease')
 */
            }
            __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":3351
 *             global __cuUserObjectRelease
 *             __cuUserObjectRelease = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuUserObjectRelease')
 *         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":3353
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphRetainUserObject
 *             __cuGraphRetainUserObject = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphRetainUserObject')
 */
          {
            __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":3355
 *         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, 3355, __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, 3355, __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_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, 3355, __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_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, 3355, __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, 3355, __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_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, 3355, __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, 3355, __pyx_L2394_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":3353
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphRetainUserObject
 *             __cuGraphRetainUserObject = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphRetainUserObject')
 */
            }
            __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":3356
 *             global __cuGraphRetainUserObject
 *             __cuGraphRetainUserObject = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphRetainUserObject')
 *         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":3358
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphReleaseUserObject
 *             __cuGraphReleaseUserObject = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphReleaseUserObject')
 */
          {
            __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":3360
 *         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, 3360, __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, 3360, __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_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, 3360, __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_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, 3360, __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, 3360, __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_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, 3360, __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, 3360, __pyx_L2400_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":3358
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphReleaseUserObject
 *             __cuGraphReleaseUserObject = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphReleaseUserObject')
 */
            }
            __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":3361
 *             global __cuGraphReleaseUserObject
 *             __cuGraphReleaseUserObject = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphReleaseUserObject')
 *         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":3363
 *         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":3365
 *         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, 3365, __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, 3365, __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_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, 3365, __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_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, 3365, __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, 3365, __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_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, 3365, __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, 3365, __pyx_L2406_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":3363
 *         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_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":3366
 *             global __cuOccupancyMaxActiveBlocksPerMultiprocessor
 *             __cuOccupancyMaxActiveBlocksPerMultiprocessor = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessor')
 *         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":3368
 *         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":3370
 *         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, 3370, __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, 3370, __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_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, 3370, __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_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, 3370, __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, 3370, __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_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, 3370, __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, 3370, __pyx_L2412_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":3368
 *         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_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":3371
 *             global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags
 *             __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags')
 *         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":3373
 *         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":3375
 *         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, 3375, __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, 3375, __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_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, 3375, __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_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, 3375, __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, 3375, __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_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, 3375, __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, 3375, __pyx_L2418_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":3373
 *         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_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":3376
 *             global __cuOccupancyMaxPotentialBlockSize
 *             __cuOccupancyMaxPotentialBlockSize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxPotentialBlockSize')
 *         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":3378
 *         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":3380
 *         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, 3380, __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, 3380, __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_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, 3380, __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_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, 3380, __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, 3380, __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_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, 3380, __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, 3380, __pyx_L2424_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":3378
 *         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_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":3381
 *             global __cuOccupancyMaxPotentialBlockSizeWithFlags
 *             __cuOccupancyMaxPotentialBlockSizeWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxPotentialBlockSizeWithFlags')
 *         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":3383
 *         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":3385
 *         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, 3385, __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, 3385, __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_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, 3385, __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_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, 3385, __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, 3385, __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_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, 3385, __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, 3385, __pyx_L2430_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":3383
 *         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_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":3386
 *             global __cuOccupancyAvailableDynamicSMemPerBlock
 *             __cuOccupancyAvailableDynamicSMemPerBlock = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyAvailableDynamicSMemPerBlock')
 *         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":3388
 *         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":3390
 *         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, 3390, __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, 3390, __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_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, 3390, __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_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, 3390, __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, 3390, __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_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, 3390, __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, 3390, __pyx_L2436_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":3388
 *         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_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":3391
 *             global __cuOccupancyMaxPotentialClusterSize
 *             __cuOccupancyMaxPotentialClusterSize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxPotentialClusterSize')
 *         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":3393
 *         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":3395
 *         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, 3395, __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, 3395, __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_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, 3395, __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_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, 3395, __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, 3395, __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_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, 3395, __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, 3395, __pyx_L2442_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":3393
 *         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_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":3396
 *             global __cuOccupancyMaxActiveClusters
 *             __cuOccupancyMaxActiveClusters = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuOccupancyMaxActiveClusters')
 *         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":3398
 *         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":3400
 *         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, 3400, __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, 3400, __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_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, 3400, __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_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, 3400, __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, 3400, __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_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, 3400, __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, 3400, __pyx_L2448_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":3398
 *         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_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":3401
 *             global __cuTexRefSetArray
 *             __cuTexRefSetArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetArray')
 *         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":3403
 *         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":3405
 *         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, 3405, __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, 3405, __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_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, 3405, __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_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, 3405, __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, 3405, __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_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, 3405, __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, 3405, __pyx_L2454_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":3403
 *         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_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":3406
 *             global __cuTexRefSetMipmappedArray
 *             __cuTexRefSetMipmappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetMipmappedArray')
 *         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":3408
 *         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":3410
 *         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, 3410, __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, 3410, __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_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, 3410, __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_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, 3410, __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, 3410, __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_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, 3410, __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, 3410, __pyx_L2460_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":3408
 *         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_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":3411
 *             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_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":3413
 *         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":3415
 *         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, 3415, __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, 3415, __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_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, 3415, __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_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, 3415, __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, 3415, __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_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, 3415, __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, 3415, __pyx_L2466_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":3413
 *         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_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":3416
 *             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_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":3418
 *         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":3420
 *         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, 3420, __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, 3420, __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_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, 3420, __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_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, 3420, __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, 3420, __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_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, 3420, __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, 3420, __pyx_L2472_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":3418
 *         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_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":3421
 *             global __cuTexRefSetFormat
 *             __cuTexRefSetFormat = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetFormat')
 *         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":3423
 *         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":3425
 *         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, 3425, __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, 3425, __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_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, 3425, __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_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, 3425, __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, 3425, __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_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, 3425, __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, 3425, __pyx_L2478_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":3423
 *         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_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":3426
 *             global __cuTexRefSetAddressMode
 *             __cuTexRefSetAddressMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetAddressMode')
 *         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":3428
 *         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":3430
 *         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, 3430, __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, 3430, __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_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, 3430, __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_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, 3430, __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, 3430, __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_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, 3430, __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, 3430, __pyx_L2484_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":3428
 *         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_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":3431
 *             global __cuTexRefSetFilterMode
 *             __cuTexRefSetFilterMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetFilterMode')
 *         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":3433
 *         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":3435
 *         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, 3435, __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, 3435, __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_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, 3435, __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_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, 3435, __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, 3435, __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_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, 3435, __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, 3435, __pyx_L2490_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":3433
 *         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_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":3436
 *             global __cuTexRefSetMipmapFilterMode
 *             __cuTexRefSetMipmapFilterMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetMipmapFilterMode')
 *         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":3438
 *         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":3440
 *         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, 3440, __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, 3440, __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_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, 3440, __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_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, 3440, __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, 3440, __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_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, 3440, __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, 3440, __pyx_L2496_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":3438
 *         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_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":3441
 *             global __cuTexRefSetMipmapLevelBias
 *             __cuTexRefSetMipmapLevelBias = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetMipmapLevelBias')
 *         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":3443
 *         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":3445
 *         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, 3445, __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, 3445, __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_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, 3445, __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_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, 3445, __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, 3445, __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_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, 3445, __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, 3445, __pyx_L2502_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":3443
 *         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_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":3446
 *             global __cuTexRefSetMipmapLevelClamp
 *             __cuTexRefSetMipmapLevelClamp = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetMipmapLevelClamp')
 *         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":3448
 *         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":3450
 *         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, 3450, __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, 3450, __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_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, 3450, __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_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, 3450, __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, 3450, __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_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, 3450, __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, 3450, __pyx_L2508_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":3448
 *         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_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":3451
 *             global __cuTexRefSetMaxAnisotropy
 *             __cuTexRefSetMaxAnisotropy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetMaxAnisotropy')
 *         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":3453
 *         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":3455
 *         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, 3455, __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, 3455, __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_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, 3455, __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_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, 3455, __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, 3455, __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_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, 3455, __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, 3455, __pyx_L2514_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":3453
 *         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_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":3456
 *             global __cuTexRefSetBorderColor
 *             __cuTexRefSetBorderColor = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetBorderColor')
 *         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":3458
 *         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":3460
 *         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, 3460, __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, 3460, __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_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, 3460, __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_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, 3460, __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, 3460, __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_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, 3460, __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, 3460, __pyx_L2520_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":3458
 *         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_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":3461
 *             global __cuTexRefSetFlags
 *             __cuTexRefSetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefSetFlags')
 *         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":3463
 *         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":3465
 *         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, 3465, __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, 3465, __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_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, 3465, __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_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, 3465, __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, 3465, __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_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, 3465, __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, 3465, __pyx_L2526_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":3463
 *         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_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":3466
 *             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_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":3468
 *         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":3470
 *         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, 3470, __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, 3470, __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_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, 3470, __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_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, 3470, __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, 3470, __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_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, 3470, __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, 3470, __pyx_L2532_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":3468
 *         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_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":3471
 *             global __cuTexRefGetArray
 *             __cuTexRefGetArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetArray')
 *         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":3473
 *         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":3475
 *         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, 3475, __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, 3475, __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_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, 3475, __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_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, 3475, __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, 3475, __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_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, 3475, __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, 3475, __pyx_L2538_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":3473
 *         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_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":3476
 *             global __cuTexRefGetMipmappedArray
 *             __cuTexRefGetMipmappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetMipmappedArray')
 *         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":3478
 *         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":3480
 *         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, 3480, __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, 3480, __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_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, 3480, __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_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, 3480, __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, 3480, __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_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, 3480, __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, 3480, __pyx_L2544_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":3478
 *         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_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":3481
 *             global __cuTexRefGetAddressMode
 *             __cuTexRefGetAddressMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetAddressMode')
 *         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":3483
 *         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":3485
 *         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, 3485, __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, 3485, __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_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, 3485, __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_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, 3485, __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, 3485, __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_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, 3485, __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, 3485, __pyx_L2550_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":3483
 *         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_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":3486
 *             global __cuTexRefGetFilterMode
 *             __cuTexRefGetFilterMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetFilterMode')
 *         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":3488
 *         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":3490
 *         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, 3490, __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, 3490, __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_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, 3490, __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_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, 3490, __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, 3490, __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_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, 3490, __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, 3490, __pyx_L2556_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":3488
 *         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_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":3491
 *             global __cuTexRefGetFormat
 *             __cuTexRefGetFormat = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetFormat')
 *         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":3493
 *         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":3495
 *         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, 3495, __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, 3495, __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_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, 3495, __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_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, 3495, __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, 3495, __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_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, 3495, __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, 3495, __pyx_L2562_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":3493
 *         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_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":3496
 *             global __cuTexRefGetMipmapFilterMode
 *             __cuTexRefGetMipmapFilterMode = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetMipmapFilterMode')
 *         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":3498
 *         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":3500
 *         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, 3500, __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, 3500, __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_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, 3500, __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_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, 3500, __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, 3500, __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_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, 3500, __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, 3500, __pyx_L2568_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":3498
 *         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_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":3501
 *             global __cuTexRefGetMipmapLevelBias
 *             __cuTexRefGetMipmapLevelBias = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetMipmapLevelBias')
 *         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":3503
 *         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":3505
 *         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, 3505, __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, 3505, __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_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, 3505, __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_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, 3505, __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, 3505, __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_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, 3505, __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, 3505, __pyx_L2574_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":3503
 *         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_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":3506
 *             global __cuTexRefGetMipmapLevelClamp
 *             __cuTexRefGetMipmapLevelClamp = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetMipmapLevelClamp')
 *         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":3508
 *         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":3510
 *         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, 3510, __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, 3510, __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_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, 3510, __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_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, 3510, __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, 3510, __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_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, 3510, __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, 3510, __pyx_L2580_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":3508
 *         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_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":3511
 *             global __cuTexRefGetMaxAnisotropy
 *             __cuTexRefGetMaxAnisotropy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetMaxAnisotropy')
 *         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":3513
 *         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":3515
 *         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, 3515, __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, 3515, __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_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, 3515, __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_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, 3515, __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, 3515, __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_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, 3515, __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, 3515, __pyx_L2586_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":3513
 *         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_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":3516
 *             global __cuTexRefGetBorderColor
 *             __cuTexRefGetBorderColor = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetBorderColor')
 *         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":3518
 *         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":3520
 *         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, 3520, __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, 3520, __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_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, 3520, __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_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, 3520, __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, 3520, __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_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, 3520, __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, 3520, __pyx_L2592_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":3518
 *         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_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":3521
 *             global __cuTexRefGetFlags
 *             __cuTexRefGetFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefGetFlags')
 *         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":3523
 *         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":3525
 *         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, 3525, __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, 3525, __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_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, 3525, __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_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, 3525, __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, 3525, __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_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, 3525, __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, 3525, __pyx_L2598_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":3523
 *         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_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":3526
 *             global __cuTexRefCreate
 *             __cuTexRefCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefCreate')
 *         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":3528
 *         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":3530
 *         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, 3530, __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, 3530, __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_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, 3530, __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_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, 3530, __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, 3530, __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_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, 3530, __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, 3530, __pyx_L2604_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":3528
 *         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_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":3531
 *             global __cuTexRefDestroy
 *             __cuTexRefDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexRefDestroy')
 *         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":3533
 *         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":3535
 *         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, 3535, __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, 3535, __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_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, 3535, __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_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, 3535, __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, 3535, __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_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, 3535, __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, 3535, __pyx_L2610_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":3533
 *         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_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":3536
 *             global __cuSurfRefSetArray
 *             __cuSurfRefSetArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSurfRefSetArray')
 *         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":3538
 *         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":3540
 *         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, 3540, __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, 3540, __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_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, 3540, __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_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, 3540, __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, 3540, __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_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, 3540, __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, 3540, __pyx_L2616_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":3538
 *         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_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":3541
 *             global __cuSurfRefGetArray
 *             __cuSurfRefGetArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSurfRefGetArray')
 *         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":3543
 *         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":3545
 *         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, 3545, __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, 3545, __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_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, 3545, __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_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, 3545, __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, 3545, __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_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, 3545, __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, 3545, __pyx_L2622_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":3543
 *         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_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":3546
 *             global __cuTexObjectCreate
 *             __cuTexObjectCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexObjectCreate')
 *         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":3548
 *         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":3550
 *         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, 3550, __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, 3550, __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_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, 3550, __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_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, 3550, __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, 3550, __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_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, 3550, __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, 3550, __pyx_L2628_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":3548
 *         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_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":3551
 *             global __cuTexObjectDestroy
 *             __cuTexObjectDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexObjectDestroy')
 *         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":3553
 *         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":3555
 *         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, 3555, __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, 3555, __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_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, 3555, __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_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, 3555, __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, 3555, __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_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, 3555, __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, 3555, __pyx_L2634_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":3553
 *         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_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":3556
 *             global __cuTexObjectGetResourceDesc
 *             __cuTexObjectGetResourceDesc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexObjectGetResourceDesc')
 *         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":3558
 *         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":3560
 *         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, 3560, __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, 3560, __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_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, 3560, __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_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, 3560, __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, 3560, __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_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, 3560, __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, 3560, __pyx_L2640_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":3558
 *         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_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":3561
 *             global __cuTexObjectGetTextureDesc
 *             __cuTexObjectGetTextureDesc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexObjectGetTextureDesc')
 *         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":3563
 *         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":3565
 *         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, 3565, __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, 3565, __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_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, 3565, __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_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, 3565, __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, 3565, __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_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, 3565, __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, 3565, __pyx_L2646_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":3563
 *         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_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":3566
 *             global __cuTexObjectGetResourceViewDesc
 *             __cuTexObjectGetResourceViewDesc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuTexObjectGetResourceViewDesc')
 *         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":3568
 *         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":3570
 *         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, 3570, __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, 3570, __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_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, 3570, __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_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, 3570, __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, 3570, __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_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, 3570, __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, 3570, __pyx_L2652_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":3568
 *         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_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":3571
 *             global __cuSurfObjectCreate
 *             __cuSurfObjectCreate = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSurfObjectCreate')
 *         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":3573
 *         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":3575
 *         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, 3575, __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, 3575, __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_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, 3575, __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_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, 3575, __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, 3575, __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_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, 3575, __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, 3575, __pyx_L2658_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":3573
 *         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_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":3576
 *             global __cuSurfObjectDestroy
 *             __cuSurfObjectDestroy = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSurfObjectDestroy')
 *         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":3578
 *         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":3580
 *         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, 3580, __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, 3580, __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_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, 3580, __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_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, 3580, __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, 3580, __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_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, 3580, __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, 3580, __pyx_L2664_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":3578
 *         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_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":3581
 *             global __cuSurfObjectGetResourceDesc
 *             __cuSurfObjectGetResourceDesc = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuSurfObjectGetResourceDesc')
 *         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":3583
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceCanAccessPeer
 *             __cuDeviceCanAccessPeer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceCanAccessPeer')
 */
          {
            __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":3585
 *         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, 3585, __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, 3585, __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_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, 3585, __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_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, 3585, __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, 3585, __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_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, 3585, __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, 3585, __pyx_L2670_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":3583
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceCanAccessPeer
 *             __cuDeviceCanAccessPeer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceCanAccessPeer')
 */
            }
            __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":3586
 *             global __cuDeviceCanAccessPeer
 *             __cuDeviceCanAccessPeer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceCanAccessPeer')
 *         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":3588
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxEnablePeerAccess
 *             __cuCtxEnablePeerAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxEnablePeerAccess')
 */
          {
            __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":3590
 *         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, 3590, __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, 3590, __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_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, 3590, __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_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, 3590, __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, 3590, __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_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, 3590, __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, 3590, __pyx_L2676_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":3588
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxEnablePeerAccess
 *             __cuCtxEnablePeerAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxEnablePeerAccess')
 */
            }
            __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":3591
 *             global __cuCtxEnablePeerAccess
 *             __cuCtxEnablePeerAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxEnablePeerAccess')
 *         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":3593
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxDisablePeerAccess
 *             __cuCtxDisablePeerAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxDisablePeerAccess')
 */
          {
            __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":3595
 *         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, 3595, __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, 3595, __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_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, 3595, __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_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, 3595, __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, 3595, __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_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, 3595, __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, 3595, __pyx_L2682_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":3593
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuCtxDisablePeerAccess
 *             __cuCtxDisablePeerAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxDisablePeerAccess')
 */
            }
            __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":3596
 *             global __cuCtxDisablePeerAccess
 *             __cuCtxDisablePeerAccess = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuCtxDisablePeerAccess')
 *         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":3598
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetP2PAttribute
 *             __cuDeviceGetP2PAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetP2PAttribute')
 */
          {
            __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":3600
 *         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, 3600, __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, 3600, __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_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, 3600, __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_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, 3600, __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, 3600, __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_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, 3600, __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, 3600, __pyx_L2688_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":3598
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuDeviceGetP2PAttribute
 *             __cuDeviceGetP2PAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetP2PAttribute')
 */
            }
            __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":3601
 *             global __cuDeviceGetP2PAttribute
 *             __cuDeviceGetP2PAttribute = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuDeviceGetP2PAttribute')
 *         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":3603
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsUnregisterResource
 *             __cuGraphicsUnregisterResource = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsUnregisterResource')
 */
          {
            __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":3605
 *         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, 3605, __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, 3605, __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_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, 3605, __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_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, 3605, __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, 3605, __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_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, 3605, __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, 3605, __pyx_L2694_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":3603
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsUnregisterResource
 *             __cuGraphicsUnregisterResource = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsUnregisterResource')
 */
            }
            __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":3606
 *             global __cuGraphicsUnregisterResource
 *             __cuGraphicsUnregisterResource = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsUnregisterResource')
 *         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":3608
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsSubResourceGetMappedArray
 *             __cuGraphicsSubResourceGetMappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsSubResourceGetMappedArray')
 */
          {
            __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":3610
 *         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, 3610, __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, 3610, __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_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, 3610, __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_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, 3610, __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, 3610, __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_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, 3610, __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, 3610, __pyx_L2700_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":3608
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsSubResourceGetMappedArray
 *             __cuGraphicsSubResourceGetMappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsSubResourceGetMappedArray')
 */
            }
            __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":3611
 *             global __cuGraphicsSubResourceGetMappedArray
 *             __cuGraphicsSubResourceGetMappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsSubResourceGetMappedArray')
 *         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":3613
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsResourceGetMappedMipmappedArray
 *             __cuGraphicsResourceGetMappedMipmappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsResourceGetMappedMipmappedArray')
 */
          {
            __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":3615
 *         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, 3615, __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, 3615, __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_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, 3615, __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_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, 3615, __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, 3615, __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_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, 3615, __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, 3615, __pyx_L2706_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":3613
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsResourceGetMappedMipmappedArray
 *             __cuGraphicsResourceGetMappedMipmappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsResourceGetMappedMipmappedArray')
 */
            }
            __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":3616
 *             global __cuGraphicsResourceGetMappedMipmappedArray
 *             __cuGraphicsResourceGetMappedMipmappedArray = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsResourceGetMappedMipmappedArray')
 *         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":3618
 *         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_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":3620
 *         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, 3620, __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, 3620, __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_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, 3620, __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_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, 3620, __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, 3620, __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_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, 3620, __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, 3620, __pyx_L2712_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":3618
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsResourceGetMappedPointer_v2
 *             __cuGraphicsResourceGetMappedPointer_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsResourceGetMappedPointer_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_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":3621
 *             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_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":3623
 *         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_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":3625
 *         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, 3625, __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, 3625, __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_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, 3625, __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_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, 3625, __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, 3625, __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_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, 3625, __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, 3625, __pyx_L2718_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":3623
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsResourceSetMapFlags_v2
 *             __cuGraphicsResourceSetMapFlags_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsResourceSetMapFlags_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_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":3626
 *             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_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":3628
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGetProcAddress
 *             __cuGetProcAddress = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetProcAddress')
 */
          {
            __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":3630
 *         try:
 *             global __cuGetProcAddress
 *             __cuGetProcAddress = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetProcAddress')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3630, __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, 3630, __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_cuGetProcAddress};
                __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_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_cuGetProcAddress};
                __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_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, 3630, __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_cuGetProcAddress);
                __Pyx_GIVEREF(__pyx_n_u_cuGetProcAddress);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGetProcAddress);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3630, __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, 3630, __pyx_L2724_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuGetProcAddress = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3628
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGetProcAddress
 *             __cuGetProcAddress = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetProcAddress')
 */
            }
            __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":3631
 *             global __cuGetProcAddress
 *             __cuGetProcAddress = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetProcAddress')
 *         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":3633
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGetExportTable
 *             __cuGetExportTable = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetExportTable')
 */
          {
            __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":3635
 *         try:
 *             global __cuGetExportTable
 *             __cuGetExportTable = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetExportTable')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3635, __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, 3635, __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_cuGetExportTable};
                __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_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_cuGetExportTable};
                __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_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, 3635, __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_cuGetExportTable);
                __Pyx_GIVEREF(__pyx_n_u_cuGetExportTable);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGetExportTable);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3635, __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, 3635, __pyx_L2730_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":3633
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGetExportTable
 *             __cuGetExportTable = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetExportTable')
 */
            }
            __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":3636
 *             global __cuGetExportTable
 *             __cuGetExportTable = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGetExportTable')
 *         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":3638
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuProfilerInitialize
 *             __cuProfilerInitialize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuProfilerInitialize')
 */
          {
            __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":3640
 *         try:
 *             global __cuProfilerInitialize
 *             __cuProfilerInitialize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuProfilerInitialize')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3640, __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, 3640, __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_cuProfilerInitialize};
                __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_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_cuProfilerInitialize};
                __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_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, 3640, __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_cuProfilerInitialize);
                __Pyx_GIVEREF(__pyx_n_u_cuProfilerInitialize);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuProfilerInitialize);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3640, __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, 3640, __pyx_L2736_error)
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_v_4cuda_5_cuda_5ccuda___cuProfilerInitialize = ((void *)((unsigned PY_LONG_LONG)__pyx_t_21));

              /* "cuda/_cuda/ccuda.pyx":3638
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuProfilerInitialize
 *             __cuProfilerInitialize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuProfilerInitialize')
 */
            }
            __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":3641
 *             global __cuProfilerInitialize
 *             __cuProfilerInitialize = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuProfilerInitialize')
 *         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":3643
 *         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":3645
 *         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, 3645, __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, 3645, __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_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, 3645, __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_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, 3645, __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, 3645, __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_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, 3645, __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, 3645, __pyx_L2742_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":3643
 *         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_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":3646
 *             global __cuProfilerStart
 *             __cuProfilerStart = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuProfilerStart')
 *         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":3648
 *         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":3650
 *         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, 3650, __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, 3650, __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_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, 3650, __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_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, 3650, __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, 3650, __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_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, 3650, __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, 3650, __pyx_L2748_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":3648
 *         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_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":3651
 *             global __cuProfilerStop
 *             __cuProfilerStop = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuProfilerStop')
 *         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":3653
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuVDPAUGetDevice
 *             __cuVDPAUGetDevice = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuVDPAUGetDevice')
 */
          {
            __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":3655
 *         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, 3655, __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, 3655, __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_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, 3655, __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_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, 3655, __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, 3655, __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_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, 3655, __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, 3655, __pyx_L2754_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":3653
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuVDPAUGetDevice
 *             __cuVDPAUGetDevice = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuVDPAUGetDevice')
 */
            }
            __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":3656
 *             global __cuVDPAUGetDevice
 *             __cuVDPAUGetDevice = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuVDPAUGetDevice')
 *         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":3658
 *         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_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":3660
 *         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, 3660, __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, 3660, __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_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, 3660, __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_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, 3660, __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, 3660, __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_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, 3660, __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, 3660, __pyx_L2760_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":3658
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuVDPAUCtxCreate_v2
 *             __cuVDPAUCtxCreate_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuVDPAUCtxCreate_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_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":3661
 *             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_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":3663
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsVDPAURegisterVideoSurface
 *             __cuGraphicsVDPAURegisterVideoSurface = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsVDPAURegisterVideoSurface')
 */
          {
            __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":3665
 *         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, 3665, __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, 3665, __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_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, 3665, __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_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, 3665, __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, 3665, __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_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, 3665, __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, 3665, __pyx_L2766_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":3663
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsVDPAURegisterVideoSurface
 *             __cuGraphicsVDPAURegisterVideoSurface = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsVDPAURegisterVideoSurface')
 */
            }
            __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":3666
 *             global __cuGraphicsVDPAURegisterVideoSurface
 *             __cuGraphicsVDPAURegisterVideoSurface = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsVDPAURegisterVideoSurface')
 *         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":3668
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsVDPAURegisterOutputSurface
 *             __cuGraphicsVDPAURegisterOutputSurface = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsVDPAURegisterOutputSurface')
 */
          {
            __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":3670
 *         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, 3670, __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, 3670, __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_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, 3670, __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_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, 3670, __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, 3670, __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_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, 3670, __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, 3670, __pyx_L2772_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":3668
 *         except:
 *             pass
 *         try:             # <<<<<<<<<<<<<<
 *             global __cuGraphicsVDPAURegisterOutputSurface
 *             __cuGraphicsVDPAURegisterOutputSurface = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsVDPAURegisterOutputSurface')
 */
            }
            __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":3671
 *             global __cuGraphicsVDPAURegisterOutputSurface
 *             __cuGraphicsVDPAURegisterOutputSurface = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsVDPAURegisterOutputSurface')
 *         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":3673
 *         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":3675
 *         try:
 *             global __cuGraphicsEGLRegisterImage
 *             __cuGraphicsEGLRegisterImage = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsEGLRegisterImage')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3675, __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, 3675, __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_cuGraphicsEGLRegisterImage};
                __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_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_cuGraphicsEGLRegisterImage};
                __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_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, 3675, __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_cuGraphicsEGLRegisterImage);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphicsEGLRegisterImage);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphicsEGLRegisterImage);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3675, __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, 3675, __pyx_L2778_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":3673
 *         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_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":3676
 *             global __cuGraphicsEGLRegisterImage
 *             __cuGraphicsEGLRegisterImage = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsEGLRegisterImage')
 *         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":3678
 *         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":3680
 *         try:
 *             global __cuEGLStreamConsumerConnect
 *             __cuEGLStreamConsumerConnect = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerConnect')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3680, __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, 3680, __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_cuEGLStreamConsumerConnect};
                __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_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_cuEGLStreamConsumerConnect};
                __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_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, 3680, __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_cuEGLStreamConsumerConnect);
                __Pyx_GIVEREF(__pyx_n_u_cuEGLStreamConsumerConnect);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuEGLStreamConsumerConnect);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3680, __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, 3680, __pyx_L2784_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":3678
 *         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_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":3681
 *             global __cuEGLStreamConsumerConnect
 *             __cuEGLStreamConsumerConnect = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerConnect')
 *         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":3683
 *         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":3685
 *         try:
 *             global __cuEGLStreamConsumerConnectWithFlags
 *             __cuEGLStreamConsumerConnectWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerConnectWithFlags')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3685, __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, 3685, __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_cuEGLStreamConsumerConnectWithFl};
                __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_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_cuEGLStreamConsumerConnectWithFl};
                __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_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, 3685, __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_cuEGLStreamConsumerConnectWithFl);
                __Pyx_GIVEREF(__pyx_n_u_cuEGLStreamConsumerConnectWithFl);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuEGLStreamConsumerConnectWithFl);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3685, __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, 3685, __pyx_L2790_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":3683
 *         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_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":3686
 *             global __cuEGLStreamConsumerConnectWithFlags
 *             __cuEGLStreamConsumerConnectWithFlags = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerConnectWithFlags')
 *         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":3688
 *         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":3690
 *         try:
 *             global __cuEGLStreamConsumerDisconnect
 *             __cuEGLStreamConsumerDisconnect = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerDisconnect')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3690, __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, 3690, __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_cuEGLStreamConsumerDisconnect};
                __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_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_cuEGLStreamConsumerDisconnect};
                __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_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, 3690, __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_cuEGLStreamConsumerDisconnect);
                __Pyx_GIVEREF(__pyx_n_u_cuEGLStreamConsumerDisconnect);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuEGLStreamConsumerDisconnect);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3690, __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, 3690, __pyx_L2796_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":3688
 *         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_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":3691
 *             global __cuEGLStreamConsumerDisconnect
 *             __cuEGLStreamConsumerDisconnect = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerDisconnect')
 *         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":3693
 *         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":3695
 *         try:
 *             global __cuEGLStreamConsumerAcquireFrame
 *             __cuEGLStreamConsumerAcquireFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerAcquireFrame')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3695, __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, 3695, __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_cuEGLStreamConsumerAcquireFrame};
                __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_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_cuEGLStreamConsumerAcquireFrame};
                __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_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, 3695, __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_cuEGLStreamConsumerAcquireFrame);
                __Pyx_GIVEREF(__pyx_n_u_cuEGLStreamConsumerAcquireFrame);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuEGLStreamConsumerAcquireFrame);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3695, __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, 3695, __pyx_L2802_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":3693
 *         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_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":3696
 *             global __cuEGLStreamConsumerAcquireFrame
 *             __cuEGLStreamConsumerAcquireFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerAcquireFrame')
 *         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":3698
 *         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":3700
 *         try:
 *             global __cuEGLStreamConsumerReleaseFrame
 *             __cuEGLStreamConsumerReleaseFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerReleaseFrame')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3700, __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, 3700, __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_cuEGLStreamConsumerReleaseFrame};
                __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_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_cuEGLStreamConsumerReleaseFrame};
                __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_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, 3700, __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_cuEGLStreamConsumerReleaseFrame);
                __Pyx_GIVEREF(__pyx_n_u_cuEGLStreamConsumerReleaseFrame);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuEGLStreamConsumerReleaseFrame);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3700, __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, 3700, __pyx_L2808_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":3698
 *         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_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":3701
 *             global __cuEGLStreamConsumerReleaseFrame
 *             __cuEGLStreamConsumerReleaseFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamConsumerReleaseFrame')
 *         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":3703
 *         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":3705
 *         try:
 *             global __cuEGLStreamProducerConnect
 *             __cuEGLStreamProducerConnect = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamProducerConnect')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3705, __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, 3705, __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_cuEGLStreamProducerConnect};
                __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_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_cuEGLStreamProducerConnect};
                __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_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, 3705, __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_cuEGLStreamProducerConnect);
                __Pyx_GIVEREF(__pyx_n_u_cuEGLStreamProducerConnect);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuEGLStreamProducerConnect);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3705, __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, 3705, __pyx_L2814_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":3703
 *         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_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":3706
 *             global __cuEGLStreamProducerConnect
 *             __cuEGLStreamProducerConnect = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamProducerConnect')
 *         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":3708
 *         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":3710
 *         try:
 *             global __cuEGLStreamProducerDisconnect
 *             __cuEGLStreamProducerDisconnect = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamProducerDisconnect')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3710, __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, 3710, __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_cuEGLStreamProducerDisconnect};
                __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_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_cuEGLStreamProducerDisconnect};
                __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_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, 3710, __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_cuEGLStreamProducerDisconnect);
                __Pyx_GIVEREF(__pyx_n_u_cuEGLStreamProducerDisconnect);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuEGLStreamProducerDisconnect);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3710, __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, 3710, __pyx_L2820_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":3708
 *         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_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":3711
 *             global __cuEGLStreamProducerDisconnect
 *             __cuEGLStreamProducerDisconnect = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamProducerDisconnect')
 *         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":3713
 *         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":3715
 *         try:
 *             global __cuEGLStreamProducerPresentFrame
 *             __cuEGLStreamProducerPresentFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamProducerPresentFrame')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3715, __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, 3715, __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_cuEGLStreamProducerPresentFrame};
                __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_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_cuEGLStreamProducerPresentFrame};
                __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_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, 3715, __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_cuEGLStreamProducerPresentFrame);
                __Pyx_GIVEREF(__pyx_n_u_cuEGLStreamProducerPresentFrame);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuEGLStreamProducerPresentFrame);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3715, __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, 3715, __pyx_L2826_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":3713
 *         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_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":3716
 *             global __cuEGLStreamProducerPresentFrame
 *             __cuEGLStreamProducerPresentFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamProducerPresentFrame')
 *         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":3718
 *         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":3720
 *         try:
 *             global __cuEGLStreamProducerReturnFrame
 *             __cuEGLStreamProducerReturnFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamProducerReturnFrame')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3720, __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, 3720, __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_cuEGLStreamProducerReturnFrame};
                __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_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_cuEGLStreamProducerReturnFrame};
                __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_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, 3720, __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_cuEGLStreamProducerReturnFrame);
                __Pyx_GIVEREF(__pyx_n_u_cuEGLStreamProducerReturnFrame);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuEGLStreamProducerReturnFrame);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3720, __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, 3720, __pyx_L2832_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":3718
 *         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_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":3721
 *             global __cuEGLStreamProducerReturnFrame
 *             __cuEGLStreamProducerReturnFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEGLStreamProducerReturnFrame')
 *         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":3723
 *         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":3725
 *         try:
 *             global __cuGraphicsResourceGetMappedEglFrame
 *             __cuGraphicsResourceGetMappedEglFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsResourceGetMappedEglFrame')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3725, __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, 3725, __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_cuGraphicsResourceGetMappedEglFr};
                __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_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_cuGraphicsResourceGetMappedEglFr};
                __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_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, 3725, __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_cuGraphicsResourceGetMappedEglFr);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphicsResourceGetMappedEglFr);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphicsResourceGetMappedEglFr);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3725, __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, 3725, __pyx_L2838_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":3723
 *         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_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":3726
 *             global __cuGraphicsResourceGetMappedEglFrame
 *             __cuGraphicsResourceGetMappedEglFrame = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsResourceGetMappedEglFrame')
 *         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":3728
 *         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":3730
 *         try:
 *             global __cuEventCreateFromEGLSync
 *             __cuEventCreateFromEGLSync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventCreateFromEGLSync')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3730, __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, 3730, __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_cuEventCreateFromEGLSync};
                __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_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_cuEventCreateFromEGLSync};
                __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_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, 3730, __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_cuEventCreateFromEGLSync);
                __Pyx_GIVEREF(__pyx_n_u_cuEventCreateFromEGLSync);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuEventCreateFromEGLSync);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3730, __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, 3730, __pyx_L2844_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":3728
 *         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_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":3731
 *             global __cuEventCreateFromEGLSync
 *             __cuEventCreateFromEGLSync = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuEventCreateFromEGLSync')
 *         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":3733
 *         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":3735
 *         try:
 *             global __cuGraphicsGLRegisterBuffer
 *             __cuGraphicsGLRegisterBuffer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsGLRegisterBuffer')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_win32api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3735, __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, 3735, __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_cuGraphicsGLRegisterBuffer};
                __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_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_cuGraphicsGLRegisterBuffer};
                __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_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, 3735, __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_cuGraphicsGLRegisterBuffer);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphicsGLRegisterBuffer);
                PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_n_u_cuGraphicsGLRegisterBuffer);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3735, __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, 3735, __pyx_L2850_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":3733
 *         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_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":3736
 *             global __cuGraphicsGLRegisterBuffer
 *             __cuGraphicsGLRegisterBuffer = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsGLRegisterBuffer')
 *         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":3738
 *         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":3740
 *         try:
 *             global __cuGraphicsGLRegisterImage
 *             __cuGraphicsGLRegisterImage = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsGLRegisterImage')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_win32api); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3740, __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, 3740, __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_cuGraphicsGLRegisterImage};
                __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_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_cuGraphicsGLRegisterImage};
                __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_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, 3740, __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_cuGraphicsGLRegisterImage);
                __Pyx_GIVEREF(__pyx_n_u_cuGraphicsGLRegisterImage);
                PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_n_u_cuGraphicsGLRegisterImage);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3740, __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, 3740, __pyx_L2856_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":3738
 *         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_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":3741
 *             global __cuGraphicsGLRegisterImage
 *             __cuGraphicsGLRegisterImage = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGraphicsGLRegisterImage')
 *         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":3743
 *         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":3745
 *         try:
 *             global __cuGLGetDevices_v2
 *             __cuGLGetDevices_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGLGetDevices_v2')             # <<<<<<<<<<<<<<
 *         except:
 *             pass
 */
              __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_win32api); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3745, __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, 3745, __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_cuGLGetDevices_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, 3745, __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_cuGLGetDevices_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, 3745, __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, 3745, __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_cuGLGetDevices_v2);
                __Pyx_GIVEREF(__pyx_n_u_cuGLGetDevices_v2);
                PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_n_u_cuGLGetDevices_v2);
                __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3745, __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, 3745, __pyx_L2862_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":3743
 *         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_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":3746
 *             global __cuGLGetDevices_v2
 *             __cuGLGetDevices_v2 = <void*><unsigned long long>win32api.GetProcAddress(handle, 'cuGLGetDevices_v2')
 *         except:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
            /*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":1390
 * 
 *     # 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":407
 * 
 * cdef int cuPythonInit() nogil except -1:
 *     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":406
 * cdef void *__cuGLGetDevices_v2 = NULL
 * 
 * cdef int cuPythonInit() nogil except -1:             # <<<<<<<<<<<<<<
 *     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":3749
 *             pass
 * 
 * cdef CUresult _cuGetErrorString(CUresult error, const char** pStr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 3749, 1, __PYX_ERR(0, 3749, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3750
 * 
 * cdef CUresult _cuGetErrorString(CUresult error, const char** pStr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGetErrorString             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGetErrorString == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3751
 * cdef CUresult _cuGetErrorString(CUresult error, const char** pStr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 3751, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3752
 *     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":3753
 *     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":3754
 *     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, 3754, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3754, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3753
 *     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":3752
 *     global __cuGetErrorString
 *     cuPythonInit()
 *     if __cuGetErrorString == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGetErrorString" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3755
 *         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":3756
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3750
 * 
 * cdef CUresult _cuGetErrorString(CUresult error, const char** pStr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":3749
 *             pass
 * 
 * cdef CUresult _cuGetErrorString(CUresult error, const char** pStr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":3758
 *     return err
 * 
 * cdef CUresult _cuGetErrorName(CUresult error, const char** pStr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 3758, 1, __PYX_ERR(0, 3758, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3759
 * 
 * cdef CUresult _cuGetErrorName(CUresult error, const char** pStr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGetErrorName             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGetErrorName == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3760
 * cdef CUresult _cuGetErrorName(CUresult error, const char** pStr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 3760, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3761
 *     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":3762
 *     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":3763
 *     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, 3763, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3763, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3762
 *     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":3761
 *     global __cuGetErrorName
 *     cuPythonInit()
 *     if __cuGetErrorName == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGetErrorName" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3764
 *         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":3765
 *             raise RuntimeError('Function "cuGetErrorName" not found')
 *     err = (<CUresult (*)(CUresult, const char**) nogil> __cuGetErrorName)(error, pStr)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuInit(unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3759
 * 
 * cdef CUresult _cuGetErrorName(CUresult error, const char** pStr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":3758
 *     return err
 * 
 * cdef CUresult _cuGetErrorName(CUresult error, const char** pStr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":3767
 *     return err
 * 
 * cdef CUresult _cuInit(unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 3767, 1, __PYX_ERR(0, 3767, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3768
 * 
 * cdef CUresult _cuInit(unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuInit             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuInit == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3769
 * cdef CUresult _cuInit(unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 3769, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3770
 *     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":3771
 *     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":3772
 *     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, 3772, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3772, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3771
 *     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":3770
 *     global __cuInit
 *     cuPythonInit()
 *     if __cuInit == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuInit" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3773
 *         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":3774
 *             raise RuntimeError('Function "cuInit" not found')
 *     err = (<CUresult (*)(unsigned int) nogil> __cuInit)(Flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDriverGetVersion(int* driverVersion) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3768
 * 
 * cdef CUresult _cuInit(unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":3767
 *     return err
 * 
 * cdef CUresult _cuInit(unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":3776
 *     return err
 * 
 * cdef CUresult _cuDriverGetVersion(int* driverVersion) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 3776, 1, __PYX_ERR(0, 3776, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3777
 * 
 * cdef CUresult _cuDriverGetVersion(int* driverVersion) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDriverGetVersion             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDriverGetVersion == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3778
 * cdef CUresult _cuDriverGetVersion(int* driverVersion) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 3778, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3779
 *     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":3780
 *     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":3781
 *     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, 3781, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3781, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3780
 *     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":3779
 *     global __cuDriverGetVersion
 *     cuPythonInit()
 *     if __cuDriverGetVersion == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDriverGetVersion" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3782
 *         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":3783
 *             raise RuntimeError('Function "cuDriverGetVersion" not found')
 *     err = (<CUresult (*)(int*) nogil> __cuDriverGetVersion)(driverVersion)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceGet(CUdevice* device, int ordinal) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3777
 * 
 * cdef CUresult _cuDriverGetVersion(int* driverVersion) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":3776
 *     return err
 * 
 * cdef CUresult _cuDriverGetVersion(int* driverVersion) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":3785
 *     return err
 * 
 * cdef CUresult _cuDeviceGet(CUdevice* device, int ordinal) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 3785, 1, __PYX_ERR(0, 3785, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3786
 * 
 * cdef CUresult _cuDeviceGet(CUdevice* device, int ordinal) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDeviceGet             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGet == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3787
 * cdef CUresult _cuDeviceGet(CUdevice* device, int ordinal) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 3787, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3788
 *     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":3789
 *     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":3790
 *     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, 3790, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3790, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3789
 *     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":3788
 *     global __cuDeviceGet
 *     cuPythonInit()
 *     if __cuDeviceGet == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGet" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3791
 *         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":3792
 *             raise RuntimeError('Function "cuDeviceGet" not found')
 *     err = (<CUresult (*)(CUdevice*, int) nogil> __cuDeviceGet)(device, ordinal)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceGetCount(int* count) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3786
 * 
 * cdef CUresult _cuDeviceGet(CUdevice* device, int ordinal) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":3785
 *     return err
 * 
 * cdef CUresult _cuDeviceGet(CUdevice* device, int ordinal) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":3794
 *     return err
 * 
 * cdef CUresult _cuDeviceGetCount(int* count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 3794, 1, __PYX_ERR(0, 3794, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3795
 * 
 * cdef CUresult _cuDeviceGetCount(int* count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDeviceGetCount             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetCount == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3796
 * cdef CUresult _cuDeviceGetCount(int* count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 3796, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3797
 *     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":3798
 *     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":3799
 *     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, 3799, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3799, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3798
 *     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":3797
 *     global __cuDeviceGetCount
 *     cuPythonInit()
 *     if __cuDeviceGetCount == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetCount" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3800
 *         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":3801
 *             raise RuntimeError('Function "cuDeviceGetCount" not found')
 *     err = (<CUresult (*)(int*) nogil> __cuDeviceGetCount)(count)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceGetName(char* name, int length, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3795
 * 
 * cdef CUresult _cuDeviceGetCount(int* count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":3794
 *     return err
 * 
 * cdef CUresult _cuDeviceGetCount(int* count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":3803
 *     return err
 * 
 * cdef CUresult _cuDeviceGetName(char* name, int length, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 3803, 1, __PYX_ERR(0, 3803, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3804
 * 
 * cdef CUresult _cuDeviceGetName(char* name, int length, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDeviceGetName             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetName == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3805
 * cdef CUresult _cuDeviceGetName(char* name, int length, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 3805, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3806
 *     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":3807
 *     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":3808
 *     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, 3808, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3808, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3807
 *     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":3806
 *     global __cuDeviceGetName
 *     cuPythonInit()
 *     if __cuDeviceGetName == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetName" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3809
 *         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":3810
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3804
 * 
 * cdef CUresult _cuDeviceGetName(char* name, int length, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":3803
 *     return err
 * 
 * cdef CUresult _cuDeviceGetName(char* name, int length, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":3812
 *     return err
 * 
 * cdef CUresult _cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 3812, 1, __PYX_ERR(0, 3812, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3813
 * 
 * cdef CUresult _cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDeviceGetUuid             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetUuid == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3814
 * cdef CUresult _cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 3814, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3815
 *     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":3816
 *     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":3817
 *     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, 3817, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3817, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3816
 *     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":3815
 *     global __cuDeviceGetUuid
 *     cuPythonInit()
 *     if __cuDeviceGetUuid == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetUuid" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3818
 *         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":3819
 *             raise RuntimeError('Function "cuDeviceGetUuid" not found')
 *     err = (<CUresult (*)(CUuuid*, CUdevice) nogil> __cuDeviceGetUuid)(uuid, dev)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3813
 * 
 * cdef CUresult _cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":3812
 *     return err
 * 
 * cdef CUresult _cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":3821
 *     return err
 * 
 * cdef CUresult _cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 3821, 1, __PYX_ERR(0, 3821, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3822
 * 
 * cdef CUresult _cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDeviceGetUuid_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetUuid_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3823
 * cdef CUresult _cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 3823, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3824
 *     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":3825
 *     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":3826
 *     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, 3826, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3826, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3825
 *     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":3824
 *     global __cuDeviceGetUuid_v2
 *     cuPythonInit()
 *     if __cuDeviceGetUuid_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetUuid_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3827
 *         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":3828
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3822
 * 
 * cdef CUresult _cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":3821
 *     return err
 * 
 * cdef CUresult _cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":3830
 *     return err
 * 
 * cdef CUresult _cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 3830, 1, __PYX_ERR(0, 3830, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3831
 * 
 * cdef CUresult _cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDeviceGetLuid             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetLuid == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3832
 * cdef CUresult _cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 3832, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3833
 *     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":3834
 *     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":3835
 *     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, 3835, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3835, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3834
 *     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":3833
 *     global __cuDeviceGetLuid
 *     cuPythonInit()
 *     if __cuDeviceGetLuid == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetLuid" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3836
 *         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":3837
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3831
 * 
 * cdef CUresult _cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":3830
 *     return err
 * 
 * cdef CUresult _cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":3839
 *     return err
 * 
 * cdef CUresult _cuDeviceTotalMem_v2(size_t* numbytes, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 3839, 1, __PYX_ERR(0, 3839, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3840
 * 
 * cdef CUresult _cuDeviceTotalMem_v2(size_t* numbytes, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDeviceTotalMem_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceTotalMem_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3841
 * cdef CUresult _cuDeviceTotalMem_v2(size_t* numbytes, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 3841, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3842
 *     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":3843
 *     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":3844
 *     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, 3844, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3844, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3843
 *     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":3842
 *     global __cuDeviceTotalMem_v2
 *     cuPythonInit()
 *     if __cuDeviceTotalMem_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceTotalMem_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3845
 *         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":3846
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3840
 * 
 * cdef CUresult _cuDeviceTotalMem_v2(size_t* numbytes, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":3839
 *     return err
 * 
 * cdef CUresult _cuDeviceTotalMem_v2(size_t* numbytes, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":3848
 *     return err
 * 
 * cdef CUresult _cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format pformat, unsigned numChannels, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 3848, 1, __PYX_ERR(0, 3848, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3849
 * 
 * cdef CUresult _cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format pformat, unsigned numChannels, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDeviceGetTexture1DLinearMaxWidth             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetTexture1DLinearMaxWidth == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3850
 * cdef CUresult _cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format pformat, unsigned numChannels, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 3850, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3851
 *     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":3852
 *     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":3853
 *     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, 3853, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3853, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3852
 *     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":3851
 *     global __cuDeviceGetTexture1DLinearMaxWidth
 *     cuPythonInit()
 *     if __cuDeviceGetTexture1DLinearMaxWidth == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetTexture1DLinearMaxWidth" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3854
 *         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":3855
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3849
 * 
 * cdef CUresult _cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format pformat, unsigned numChannels, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":3848
 *     return err
 * 
 * cdef CUresult _cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format pformat, unsigned numChannels, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":3857
 *     return err
 * 
 * cdef CUresult _cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 3857, 1, __PYX_ERR(0, 3857, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3858
 * 
 * cdef CUresult _cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDeviceGetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3859
 * cdef CUresult _cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 3859, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3860
 *     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":3861
 *     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":3862
 *     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, 3862, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3862, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3861
 *     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":3860
 *     global __cuDeviceGetAttribute
 *     cuPythonInit()
 *     if __cuDeviceGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3863
 *         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":3864
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3858
 * 
 * cdef CUresult _cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":3857
 *     return err
 * 
 * cdef CUresult _cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":3866
 *     return err
 * 
 * cdef CUresult _cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 3866, 1, __PYX_ERR(0, 3866, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3867
 * 
 * cdef CUresult _cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDeviceGetNvSciSyncAttributes             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetNvSciSyncAttributes == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3868
 * cdef CUresult _cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 3868, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3869
 *     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":3870
 *     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":3871
 *     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, 3871, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3871, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3870
 *     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":3869
 *     global __cuDeviceGetNvSciSyncAttributes
 *     cuPythonInit()
 *     if __cuDeviceGetNvSciSyncAttributes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetNvSciSyncAttributes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3872
 *         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":3873
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3867
 * 
 * cdef CUresult _cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":3866
 *     return err
 * 
 * cdef CUresult _cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":3875
 *     return err
 * 
 * cdef CUresult _cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 3875, 1, __PYX_ERR(0, 3875, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3876
 * 
 * cdef CUresult _cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDeviceSetMemPool             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceSetMemPool == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3877
 * cdef CUresult _cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 3877, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3878
 *     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":3879
 *     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":3880
 *     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, 3880, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3880, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3879
 *     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":3878
 *     global __cuDeviceSetMemPool
 *     cuPythonInit()
 *     if __cuDeviceSetMemPool == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceSetMemPool" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3881
 *         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":3882
 *             raise RuntimeError('Function "cuDeviceSetMemPool" not found')
 *     err = (<CUresult (*)(CUdevice, CUmemoryPool) nogil> __cuDeviceSetMemPool)(dev, pool)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3876
 * 
 * cdef CUresult _cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":3875
 *     return err
 * 
 * cdef CUresult _cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":3884
 *     return err
 * 
 * cdef CUresult _cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 3884, 1, __PYX_ERR(0, 3884, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3885
 * 
 * cdef CUresult _cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDeviceGetMemPool             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetMemPool == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3886
 * cdef CUresult _cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 3886, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3887
 *     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":3888
 *     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":3889
 *     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, 3889, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3889, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3888
 *     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":3887
 *     global __cuDeviceGetMemPool
 *     cuPythonInit()
 *     if __cuDeviceGetMemPool == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetMemPool" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3890
 *         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":3891
 *             raise RuntimeError('Function "cuDeviceGetMemPool" not found')
 *     err = (<CUresult (*)(CUmemoryPool*, CUdevice) nogil> __cuDeviceGetMemPool)(pool, dev)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3885
 * 
 * cdef CUresult _cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":3884
 *     return err
 * 
 * cdef CUresult _cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":3893
 *     return err
 * 
 * cdef CUresult _cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 3893, 1, __PYX_ERR(0, 3893, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3894
 * 
 * cdef CUresult _cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDeviceGetDefaultMemPool             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetDefaultMemPool == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3895
 * cdef CUresult _cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 3895, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3896
 *     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":3897
 *     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":3898
 *     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, 3898, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3898, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3897
 *     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":3896
 *     global __cuDeviceGetDefaultMemPool
 *     cuPythonInit()
 *     if __cuDeviceGetDefaultMemPool == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetDefaultMemPool" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3899
 *         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":3900
 *             raise RuntimeError('Function "cuDeviceGetDefaultMemPool" not found')
 *     err = (<CUresult (*)(CUmemoryPool*, CUdevice) nogil> __cuDeviceGetDefaultMemPool)(pool_out, dev)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3894
 * 
 * cdef CUresult _cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":3893
 *     return err
 * 
 * cdef CUresult _cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":3902
 *     return err
 * 
 * cdef CUresult _cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 3902, 1, __PYX_ERR(0, 3902, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3903
 * 
 * cdef CUresult _cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuFlushGPUDirectRDMAWrites             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuFlushGPUDirectRDMAWrites == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3904
 * cdef CUresult _cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 3904, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3905
 *     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":3906
 *     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":3907
 *     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__19, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3907, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3907, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3906
 *     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":3905
 *     global __cuFlushGPUDirectRDMAWrites
 *     cuPythonInit()
 *     if __cuFlushGPUDirectRDMAWrites == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFlushGPUDirectRDMAWrites" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3908
 *         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":3909
 *             raise RuntimeError('Function "cuFlushGPUDirectRDMAWrites" not found')
 *     err = (<CUresult (*)(CUflushGPUDirectRDMAWritesTarget, CUflushGPUDirectRDMAWritesScope) nogil> __cuFlushGPUDirectRDMAWrites)(target, scope)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3903
 * 
 * cdef CUresult _cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":3902
 *     return err
 * 
 * cdef CUresult _cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":3911
 *     return err
 * 
 * cdef CUresult _cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 3911, 1, __PYX_ERR(0, 3911, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3912
 * 
 * cdef CUresult _cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDeviceGetProperties             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetProperties == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3913
 * cdef CUresult _cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 3913, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3914
 *     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":3915
 *     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":3916
 *     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__20, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3916, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3916, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3915
 *     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":3914
 *     global __cuDeviceGetProperties
 *     cuPythonInit()
 *     if __cuDeviceGetProperties == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetProperties" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3917
 *         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":3918
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3912
 * 
 * cdef CUresult _cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":3911
 *     return err
 * 
 * cdef CUresult _cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":3920
 *     return err
 * 
 * cdef CUresult _cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 3920, 1, __PYX_ERR(0, 3920, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3921
 * 
 * cdef CUresult _cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDeviceComputeCapability             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceComputeCapability == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3922
 * cdef CUresult _cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 3922, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3923
 *     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":3924
 *     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":3925
 *     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__21, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3925, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3925, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3924
 *     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":3923
 *     global __cuDeviceComputeCapability
 *     cuPythonInit()
 *     if __cuDeviceComputeCapability == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceComputeCapability" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3926
 *         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":3927
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3921
 * 
 * cdef CUresult _cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":3920
 *     return err
 * 
 * cdef CUresult _cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":3929
 *     return err
 * 
 * cdef CUresult _cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 3929, 1, __PYX_ERR(0, 3929, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3930
 * 
 * cdef CUresult _cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDevicePrimaryCtxRetain             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxRetain == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3931
 * cdef CUresult _cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 3931, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3932
 *     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":3933
 *     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":3934
 *     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__22, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3934, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3934, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3933
 *     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":3932
 *     global __cuDevicePrimaryCtxRetain
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxRetain == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRetain" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3935
 *         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":3936
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRetain" not found')
 *     err = (<CUresult (*)(CUcontext*, CUdevice) nogil> __cuDevicePrimaryCtxRetain)(pctx, dev)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDevicePrimaryCtxRelease_v2(CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3930
 * 
 * cdef CUresult _cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":3929
 *     return err
 * 
 * cdef CUresult _cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":3938
 *     return err
 * 
 * cdef CUresult _cuDevicePrimaryCtxRelease_v2(CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 3938, 1, __PYX_ERR(0, 3938, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3939
 * 
 * cdef CUresult _cuDevicePrimaryCtxRelease_v2(CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDevicePrimaryCtxRelease_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxRelease_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3940
 * cdef CUresult _cuDevicePrimaryCtxRelease_v2(CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 3940, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3941
 *     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":3942
 *     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":3943
 *     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__23, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3943, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3943, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3942
 *     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":3941
 *     global __cuDevicePrimaryCtxRelease_v2
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxRelease_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRelease_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3944
 *         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":3945
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3939
 * 
 * cdef CUresult _cuDevicePrimaryCtxRelease_v2(CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":3938
 *     return err
 * 
 * cdef CUresult _cuDevicePrimaryCtxRelease_v2(CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":3947
 *     return err
 * 
 * cdef CUresult _cuDevicePrimaryCtxSetFlags_v2(CUdevice dev, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 3947, 1, __PYX_ERR(0, 3947, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3948
 * 
 * cdef CUresult _cuDevicePrimaryCtxSetFlags_v2(CUdevice dev, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDevicePrimaryCtxSetFlags_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxSetFlags_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3949
 * cdef CUresult _cuDevicePrimaryCtxSetFlags_v2(CUdevice dev, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 3949, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3950
 *     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":3951
 *     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":3952
 *     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__24, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3952, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3952, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3951
 *     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":3950
 *     global __cuDevicePrimaryCtxSetFlags_v2
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxSetFlags_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxSetFlags_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3953
 *         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":3954
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3948
 * 
 * cdef CUresult _cuDevicePrimaryCtxSetFlags_v2(CUdevice dev, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":3947
 *     return err
 * 
 * cdef CUresult _cuDevicePrimaryCtxSetFlags_v2(CUdevice dev, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":3956
 *     return err
 * 
 * cdef CUresult _cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 3956, 1, __PYX_ERR(0, 3956, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3957
 * 
 * cdef CUresult _cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDevicePrimaryCtxGetState             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxGetState == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3958
 * cdef CUresult _cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 3958, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3959
 *     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":3960
 *     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":3961
 *     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__25, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3961, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3961, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3960
 *     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":3959
 *     global __cuDevicePrimaryCtxGetState
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxGetState == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxGetState" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3962
 *         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":3963
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3957
 * 
 * cdef CUresult _cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":3956
 *     return err
 * 
 * cdef CUresult _cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":3965
 *     return err
 * 
 * cdef CUresult _cuDevicePrimaryCtxReset_v2(CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 3965, 1, __PYX_ERR(0, 3965, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3966
 * 
 * cdef CUresult _cuDevicePrimaryCtxReset_v2(CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDevicePrimaryCtxReset_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxReset_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3967
 * cdef CUresult _cuDevicePrimaryCtxReset_v2(CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 3967, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3968
 *     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":3969
 *     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":3970
 *     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__26, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3970, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3970, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3969
 *     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":3968
 *     global __cuDevicePrimaryCtxReset_v2
 *     cuPythonInit()
 *     if __cuDevicePrimaryCtxReset_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxReset_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3971
 *         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":3972
 *             raise RuntimeError('Function "cuDevicePrimaryCtxReset_v2" not found')
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDevicePrimaryCtxReset_v2)(dev)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3966
 * 
 * cdef CUresult _cuDevicePrimaryCtxReset_v2(CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":3965
 *     return err
 * 
 * cdef CUresult _cuDevicePrimaryCtxReset_v2(CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":3974
 *     return err
 * 
 * cdef CUresult _cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 3974, 1, __PYX_ERR(0, 3974, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3975
 * 
 * cdef CUresult _cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDeviceGetExecAffinitySupport             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetExecAffinitySupport == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3976
 * cdef CUresult _cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 3976, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3977
 *     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":3978
 *     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":3979
 *     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__27, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3979, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3979, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3978
 *     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":3977
 *     global __cuDeviceGetExecAffinitySupport
 *     cuPythonInit()
 *     if __cuDeviceGetExecAffinitySupport == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetExecAffinitySupport" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3980
 *         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":3981
 *             raise RuntimeError('Function "cuDeviceGetExecAffinitySupport" not found')
 *     err = (<CUresult (*)(int*, CUexecAffinityType, CUdevice) nogil> __cuDeviceGetExecAffinitySupport)(pi, typename, dev)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxCreate_v2(CUcontext* pctx, unsigned int flags, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3975
 * 
 * cdef CUresult _cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":3974
 *     return err
 * 
 * cdef CUresult _cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":3983
 *     return err
 * 
 * cdef CUresult _cuCtxCreate_v2(CUcontext* pctx, unsigned int flags, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 3983, 1, __PYX_ERR(0, 3983, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3984
 * 
 * cdef CUresult _cuCtxCreate_v2(CUcontext* pctx, unsigned int flags, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuCtxCreate_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxCreate_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3985
 * cdef CUresult _cuCtxCreate_v2(CUcontext* pctx, unsigned int flags, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 3985, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3986
 *     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":3987
 *     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":3988
 *     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, 3988, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3988, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3987
 *     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":3986
 *     global __cuCtxCreate_v2
 *     cuPythonInit()
 *     if __cuCtxCreate_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxCreate_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3989
 *         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":3990
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3984
 * 
 * cdef CUresult _cuCtxCreate_v2(CUcontext* pctx, unsigned int flags, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":3983
 *     return err
 * 
 * cdef CUresult _cuCtxCreate_v2(CUcontext* pctx, unsigned int flags, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":3992
 *     return err
 * 
 * cdef CUresult _cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 3992, 1, __PYX_ERR(0, 3992, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":3993
 * 
 * cdef CUresult _cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuCtxCreate_v3             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxCreate_v3 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":3994
 * cdef CUresult _cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 3994, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":3995
 *     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":3996
 *     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":3997
 *     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, 3997, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 3997, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":3996
 *     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":3995
 *     global __cuCtxCreate_v3
 *     cuPythonInit()
 *     if __cuCtxCreate_v3 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxCreate_v3" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":3998
 *         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":3999
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":3993
 * 
 * cdef CUresult _cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":3992
 *     return err
 * 
 * cdef CUresult _cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4001
 *     return err
 * 
 * cdef CUresult _cuCtxDestroy_v2(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4001, 1, __PYX_ERR(0, 4001, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4002
 * 
 * cdef CUresult _cuCtxDestroy_v2(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuCtxDestroy_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxDestroy_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4003
 * cdef CUresult _cuCtxDestroy_v2(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4003, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4004
 *     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":4005
 *     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":4006
 *     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, 4006, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4006, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4005
 *     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":4004
 *     global __cuCtxDestroy_v2
 *     cuPythonInit()
 *     if __cuCtxDestroy_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDestroy_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4007
 *         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":4008
 *             raise RuntimeError('Function "cuCtxDestroy_v2" not found')
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDestroy_v2)(ctx)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxPushCurrent_v2(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4002
 * 
 * cdef CUresult _cuCtxDestroy_v2(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4001
 *     return err
 * 
 * cdef CUresult _cuCtxDestroy_v2(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4010
 *     return err
 * 
 * cdef CUresult _cuCtxPushCurrent_v2(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4010, 1, __PYX_ERR(0, 4010, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4011
 * 
 * cdef CUresult _cuCtxPushCurrent_v2(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuCtxPushCurrent_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxPushCurrent_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4012
 * cdef CUresult _cuCtxPushCurrent_v2(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4012, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4013
 *     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":4014
 *     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":4015
 *     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, 4015, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4015, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4014
 *     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":4013
 *     global __cuCtxPushCurrent_v2
 *     cuPythonInit()
 *     if __cuCtxPushCurrent_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxPushCurrent_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4016
 *         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":4017
 *             raise RuntimeError('Function "cuCtxPushCurrent_v2" not found')
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxPushCurrent_v2)(ctx)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxPopCurrent_v2(CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4011
 * 
 * cdef CUresult _cuCtxPushCurrent_v2(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4010
 *     return err
 * 
 * cdef CUresult _cuCtxPushCurrent_v2(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4019
 *     return err
 * 
 * cdef CUresult _cuCtxPopCurrent_v2(CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4019, 1, __PYX_ERR(0, 4019, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4020
 * 
 * cdef CUresult _cuCtxPopCurrent_v2(CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuCtxPopCurrent_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxPopCurrent_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4021
 * cdef CUresult _cuCtxPopCurrent_v2(CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4021, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4022
 *     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":4023
 *     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":4024
 *     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, 4024, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4024, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4023
 *     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":4022
 *     global __cuCtxPopCurrent_v2
 *     cuPythonInit()
 *     if __cuCtxPopCurrent_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxPopCurrent_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4025
 *         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":4026
 *             raise RuntimeError('Function "cuCtxPopCurrent_v2" not found')
 *     err = (<CUresult (*)(CUcontext*) nogil> __cuCtxPopCurrent_v2)(pctx)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxSetCurrent(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4020
 * 
 * cdef CUresult _cuCtxPopCurrent_v2(CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4019
 *     return err
 * 
 * cdef CUresult _cuCtxPopCurrent_v2(CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4028
 *     return err
 * 
 * cdef CUresult _cuCtxSetCurrent(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4028, 1, __PYX_ERR(0, 4028, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4029
 * 
 * cdef CUresult _cuCtxSetCurrent(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuCtxSetCurrent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxSetCurrent == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4030
 * cdef CUresult _cuCtxSetCurrent(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4030, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4031
 *     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":4032
 *     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":4033
 *     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, 4033, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4033, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4032
 *     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":4031
 *     global __cuCtxSetCurrent
 *     cuPythonInit()
 *     if __cuCtxSetCurrent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetCurrent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4034
 *         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":4035
 *             raise RuntimeError('Function "cuCtxSetCurrent" not found')
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxSetCurrent)(ctx)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxGetCurrent(CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4029
 * 
 * cdef CUresult _cuCtxSetCurrent(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4028
 *     return err
 * 
 * cdef CUresult _cuCtxSetCurrent(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4037
 *     return err
 * 
 * cdef CUresult _cuCtxGetCurrent(CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4037, 1, __PYX_ERR(0, 4037, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4038
 * 
 * cdef CUresult _cuCtxGetCurrent(CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuCtxGetCurrent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxGetCurrent == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4039
 * cdef CUresult _cuCtxGetCurrent(CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4039, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4040
 *     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":4041
 *     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":4042
 *     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, 4042, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4042, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4041
 *     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":4040
 *     global __cuCtxGetCurrent
 *     cuPythonInit()
 *     if __cuCtxGetCurrent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetCurrent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4043
 *         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":4044
 *             raise RuntimeError('Function "cuCtxGetCurrent" not found')
 *     err = (<CUresult (*)(CUcontext*) nogil> __cuCtxGetCurrent)(pctx)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxGetDevice(CUdevice* device) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4038
 * 
 * cdef CUresult _cuCtxGetCurrent(CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4037
 *     return err
 * 
 * cdef CUresult _cuCtxGetCurrent(CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4046
 *     return err
 * 
 * cdef CUresult _cuCtxGetDevice(CUdevice* device) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4046, 1, __PYX_ERR(0, 4046, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4047
 * 
 * cdef CUresult _cuCtxGetDevice(CUdevice* device) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuCtxGetDevice             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxGetDevice == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4048
 * cdef CUresult _cuCtxGetDevice(CUdevice* device) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4048, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4049
 *     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":4050
 *     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":4051
 *     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, 4051, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4051, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4050
 *     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":4049
 *     global __cuCtxGetDevice
 *     cuPythonInit()
 *     if __cuCtxGetDevice == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetDevice" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4052
 *         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":4053
 *             raise RuntimeError('Function "cuCtxGetDevice" not found')
 *     err = (<CUresult (*)(CUdevice*) nogil> __cuCtxGetDevice)(device)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxGetFlags(unsigned int* flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4047
 * 
 * cdef CUresult _cuCtxGetDevice(CUdevice* device) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4046
 *     return err
 * 
 * cdef CUresult _cuCtxGetDevice(CUdevice* device) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4055
 *     return err
 * 
 * cdef CUresult _cuCtxGetFlags(unsigned int* flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4055, 1, __PYX_ERR(0, 4055, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4056
 * 
 * cdef CUresult _cuCtxGetFlags(unsigned int* flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuCtxGetFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxGetFlags == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4057
 * cdef CUresult _cuCtxGetFlags(unsigned int* flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4057, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4058
 *     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":4059
 *     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":4060
 *     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, 4060, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4060, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4059
 *     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":4058
 *     global __cuCtxGetFlags
 *     cuPythonInit()
 *     if __cuCtxGetFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4061
 *         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":4062
 *             raise RuntimeError('Function "cuCtxGetFlags" not found')
 *     err = (<CUresult (*)(unsigned int*) nogil> __cuCtxGetFlags)(flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxSynchronize() nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4056
 * 
 * cdef CUresult _cuCtxGetFlags(unsigned int* flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4055
 *     return err
 * 
 * cdef CUresult _cuCtxGetFlags(unsigned int* flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4064
 *     return err
 * 
 * cdef CUresult _cuCtxSynchronize() nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4064, 1, __PYX_ERR(0, 4064, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4065
 * 
 * cdef CUresult _cuCtxSynchronize() nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuCtxSynchronize             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxSynchronize == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4066
 * cdef CUresult _cuCtxSynchronize() nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4066, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4067
 *     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":4068
 *     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":4069
 *     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__37, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4069, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4069, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4068
 *     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":4067
 *     global __cuCtxSynchronize
 *     cuPythonInit()
 *     if __cuCtxSynchronize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSynchronize" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4070
 *         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":4071
 *             raise RuntimeError('Function "cuCtxSynchronize" not found')
 *     err = (<CUresult (*)() nogil> __cuCtxSynchronize)()
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxSetLimit(CUlimit limit, size_t value) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4065
 * 
 * cdef CUresult _cuCtxSynchronize() nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4064
 *     return err
 * 
 * cdef CUresult _cuCtxSynchronize() nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4073
 *     return err
 * 
 * cdef CUresult _cuCtxSetLimit(CUlimit limit, size_t value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4073, 1, __PYX_ERR(0, 4073, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4074
 * 
 * cdef CUresult _cuCtxSetLimit(CUlimit limit, size_t value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuCtxSetLimit             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxSetLimit == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4075
 * cdef CUresult _cuCtxSetLimit(CUlimit limit, size_t value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4075, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4076
 *     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":4077
 *     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":4078
 *     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__38, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4078, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4078, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4077
 *     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":4076
 *     global __cuCtxSetLimit
 *     cuPythonInit()
 *     if __cuCtxSetLimit == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetLimit" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4079
 *         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":4080
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4074
 * 
 * cdef CUresult _cuCtxSetLimit(CUlimit limit, size_t value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4073
 *     return err
 * 
 * cdef CUresult _cuCtxSetLimit(CUlimit limit, size_t value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4082
 *     return err
 * 
 * cdef CUresult _cuCtxGetLimit(size_t* pvalue, CUlimit limit) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4082, 1, __PYX_ERR(0, 4082, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4083
 * 
 * cdef CUresult _cuCtxGetLimit(size_t* pvalue, CUlimit limit) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuCtxGetLimit             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxGetLimit == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4084
 * cdef CUresult _cuCtxGetLimit(size_t* pvalue, CUlimit limit) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4084, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4085
 *     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":4086
 *     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":4087
 *     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__39, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4087, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4087, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4086
 *     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":4085
 *     global __cuCtxGetLimit
 *     cuPythonInit()
 *     if __cuCtxGetLimit == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetLimit" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4088
 *         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":4089
 *             raise RuntimeError('Function "cuCtxGetLimit" not found')
 *     err = (<CUresult (*)(size_t*, CUlimit) nogil> __cuCtxGetLimit)(pvalue, limit)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxGetCacheConfig(CUfunc_cache* pconfig) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4083
 * 
 * cdef CUresult _cuCtxGetLimit(size_t* pvalue, CUlimit limit) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4082
 *     return err
 * 
 * cdef CUresult _cuCtxGetLimit(size_t* pvalue, CUlimit limit) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4091
 *     return err
 * 
 * cdef CUresult _cuCtxGetCacheConfig(CUfunc_cache* pconfig) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4091, 1, __PYX_ERR(0, 4091, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4092
 * 
 * cdef CUresult _cuCtxGetCacheConfig(CUfunc_cache* pconfig) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuCtxGetCacheConfig             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxGetCacheConfig == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4093
 * cdef CUresult _cuCtxGetCacheConfig(CUfunc_cache* pconfig) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4093, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4094
 *     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":4095
 *     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":4096
 *     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__40, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4096, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4096, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4095
 *     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":4094
 *     global __cuCtxGetCacheConfig
 *     cuPythonInit()
 *     if __cuCtxGetCacheConfig == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetCacheConfig" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4097
 *         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":4098
 *             raise RuntimeError('Function "cuCtxGetCacheConfig" not found')
 *     err = (<CUresult (*)(CUfunc_cache*) nogil> __cuCtxGetCacheConfig)(pconfig)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxSetCacheConfig(CUfunc_cache config) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4092
 * 
 * cdef CUresult _cuCtxGetCacheConfig(CUfunc_cache* pconfig) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4091
 *     return err
 * 
 * cdef CUresult _cuCtxGetCacheConfig(CUfunc_cache* pconfig) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4100
 *     return err
 * 
 * cdef CUresult _cuCtxSetCacheConfig(CUfunc_cache config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4100, 1, __PYX_ERR(0, 4100, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4101
 * 
 * cdef CUresult _cuCtxSetCacheConfig(CUfunc_cache config) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuCtxSetCacheConfig             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxSetCacheConfig == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4102
 * cdef CUresult _cuCtxSetCacheConfig(CUfunc_cache config) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4102, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4103
 *     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":4104
 *     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":4105
 *     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__41, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4105, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4105, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4104
 *     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":4103
 *     global __cuCtxSetCacheConfig
 *     cuPythonInit()
 *     if __cuCtxSetCacheConfig == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetCacheConfig" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4106
 *         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":4107
 *             raise RuntimeError('Function "cuCtxSetCacheConfig" not found')
 *     err = (<CUresult (*)(CUfunc_cache) nogil> __cuCtxSetCacheConfig)(config)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4101
 * 
 * cdef CUresult _cuCtxSetCacheConfig(CUfunc_cache config) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4100
 *     return err
 * 
 * cdef CUresult _cuCtxSetCacheConfig(CUfunc_cache config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4109
 *     return err
 * 
 * cdef CUresult _cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4109, 1, __PYX_ERR(0, 4109, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4110
 * 
 * cdef CUresult _cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuCtxGetSharedMemConfig             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxGetSharedMemConfig == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4111
 * cdef CUresult _cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4111, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4112
 *     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":4113
 *     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":4114
 *     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__42, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4114, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4114, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4113
 *     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":4112
 *     global __cuCtxGetSharedMemConfig
 *     cuPythonInit()
 *     if __cuCtxGetSharedMemConfig == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetSharedMemConfig" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4115
 *         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":4116
 *             raise RuntimeError('Function "cuCtxGetSharedMemConfig" not found')
 *     err = (<CUresult (*)(CUsharedconfig*) nogil> __cuCtxGetSharedMemConfig)(pConfig)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxSetSharedMemConfig(CUsharedconfig config) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4110
 * 
 * cdef CUresult _cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4109
 *     return err
 * 
 * cdef CUresult _cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4118
 *     return err
 * 
 * cdef CUresult _cuCtxSetSharedMemConfig(CUsharedconfig config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4118, 1, __PYX_ERR(0, 4118, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4119
 * 
 * cdef CUresult _cuCtxSetSharedMemConfig(CUsharedconfig config) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuCtxSetSharedMemConfig             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxSetSharedMemConfig == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4120
 * cdef CUresult _cuCtxSetSharedMemConfig(CUsharedconfig config) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4120, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4121
 *     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":4122
 *     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":4123
 *     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__43, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4123, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4123, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4122
 *     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":4121
 *     global __cuCtxSetSharedMemConfig
 *     cuPythonInit()
 *     if __cuCtxSetSharedMemConfig == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetSharedMemConfig" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4124
 *         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":4125
 *             raise RuntimeError('Function "cuCtxSetSharedMemConfig" not found')
 *     err = (<CUresult (*)(CUsharedconfig) nogil> __cuCtxSetSharedMemConfig)(config)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4119
 * 
 * cdef CUresult _cuCtxSetSharedMemConfig(CUsharedconfig config) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4118
 *     return err
 * 
 * cdef CUresult _cuCtxSetSharedMemConfig(CUsharedconfig config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4127
 *     return err
 * 
 * cdef CUresult _cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4127, 1, __PYX_ERR(0, 4127, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4128
 * 
 * cdef CUresult _cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuCtxGetApiVersion             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxGetApiVersion == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4129
 * cdef CUresult _cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4129, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4130
 *     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":4131
 *     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":4132
 *     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__44, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4132, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4132, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4131
 *     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":4130
 *     global __cuCtxGetApiVersion
 *     cuPythonInit()
 *     if __cuCtxGetApiVersion == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetApiVersion" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4133
 *         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":4134
 *             raise RuntimeError('Function "cuCtxGetApiVersion" not found')
 *     err = (<CUresult (*)(CUcontext, unsigned int*) nogil> __cuCtxGetApiVersion)(ctx, version)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4128
 * 
 * cdef CUresult _cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4127
 *     return err
 * 
 * cdef CUresult _cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4136
 *     return err
 * 
 * cdef CUresult _cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4136, 1, __PYX_ERR(0, 4136, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4137
 * 
 * cdef CUresult _cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuCtxGetStreamPriorityRange             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxGetStreamPriorityRange == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4138
 * cdef CUresult _cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4138, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4139
 *     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":4140
 *     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":4141
 *     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__45, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4141, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4141, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4140
 *     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":4139
 *     global __cuCtxGetStreamPriorityRange
 *     cuPythonInit()
 *     if __cuCtxGetStreamPriorityRange == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetStreamPriorityRange" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4142
 *         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":4143
 *             raise RuntimeError('Function "cuCtxGetStreamPriorityRange" not found')
 *     err = (<CUresult (*)(int*, int*) nogil> __cuCtxGetStreamPriorityRange)(leastPriority, greatestPriority)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxResetPersistingL2Cache() nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4137
 * 
 * cdef CUresult _cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4136
 *     return err
 * 
 * cdef CUresult _cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4145
 *     return err
 * 
 * cdef CUresult _cuCtxResetPersistingL2Cache() nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4145, 1, __PYX_ERR(0, 4145, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4146
 * 
 * cdef CUresult _cuCtxResetPersistingL2Cache() nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuCtxResetPersistingL2Cache             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxResetPersistingL2Cache == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4147
 * cdef CUresult _cuCtxResetPersistingL2Cache() nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4147, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4148
 *     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":4149
 *     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":4150
 *     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__46, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4150, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4150, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4149
 *     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":4148
 *     global __cuCtxResetPersistingL2Cache
 *     cuPythonInit()
 *     if __cuCtxResetPersistingL2Cache == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxResetPersistingL2Cache" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4151
 *         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":4152
 *             raise RuntimeError('Function "cuCtxResetPersistingL2Cache" not found')
 *     err = (<CUresult (*)() nogil> __cuCtxResetPersistingL2Cache)()
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4146
 * 
 * cdef CUresult _cuCtxResetPersistingL2Cache() nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4145
 *     return err
 * 
 * cdef CUresult _cuCtxResetPersistingL2Cache() nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4154
 *     return err
 * 
 * cdef CUresult _cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4154, 1, __PYX_ERR(0, 4154, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4155
 * 
 * cdef CUresult _cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuCtxGetExecAffinity             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxGetExecAffinity == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4156
 * cdef CUresult _cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4156, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4157
 *     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":4158
 *     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":4159
 *     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__47, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4159, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4159, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4158
 *     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":4157
 *     global __cuCtxGetExecAffinity
 *     cuPythonInit()
 *     if __cuCtxGetExecAffinity == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetExecAffinity" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4160
 *         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":4161
 *             raise RuntimeError('Function "cuCtxGetExecAffinity" not found')
 *     err = (<CUresult (*)(CUexecAffinityParam*, CUexecAffinityType) nogil> __cuCtxGetExecAffinity)(pExecAffinity, typename)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxAttach(CUcontext* pctx, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4155
 * 
 * cdef CUresult _cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4154
 *     return err
 * 
 * cdef CUresult _cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4163
 *     return err
 * 
 * cdef CUresult _cuCtxAttach(CUcontext* pctx, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4163, 1, __PYX_ERR(0, 4163, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4164
 * 
 * cdef CUresult _cuCtxAttach(CUcontext* pctx, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuCtxAttach             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxAttach == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4165
 * cdef CUresult _cuCtxAttach(CUcontext* pctx, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4165, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4166
 *     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":4167
 *     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":4168
 *     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__48, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4168, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4168, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4167
 *     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":4166
 *     global __cuCtxAttach
 *     cuPythonInit()
 *     if __cuCtxAttach == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxAttach" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4169
 *         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":4170
 *             raise RuntimeError('Function "cuCtxAttach" not found')
 *     err = (<CUresult (*)(CUcontext*, unsigned int) nogil> __cuCtxAttach)(pctx, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxDetach(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4164
 * 
 * cdef CUresult _cuCtxAttach(CUcontext* pctx, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4163
 *     return err
 * 
 * cdef CUresult _cuCtxAttach(CUcontext* pctx, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4172
 *     return err
 * 
 * cdef CUresult _cuCtxDetach(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4172, 1, __PYX_ERR(0, 4172, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4173
 * 
 * cdef CUresult _cuCtxDetach(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuCtxDetach             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxDetach == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4174
 * cdef CUresult _cuCtxDetach(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4174, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4175
 *     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":4176
 *     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":4177
 *     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__49, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4177, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4177, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4176
 *     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":4175
 *     global __cuCtxDetach
 *     cuPythonInit()
 *     if __cuCtxDetach == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDetach" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4178
 *         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":4179
 *             raise RuntimeError('Function "cuCtxDetach" not found')
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDetach)(ctx)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuModuleLoad(CUmodule* module, const char* fname) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4173
 * 
 * cdef CUresult _cuCtxDetach(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4172
 *     return err
 * 
 * cdef CUresult _cuCtxDetach(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4181
 *     return err
 * 
 * cdef CUresult _cuModuleLoad(CUmodule* module, const char* fname) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4181, 1, __PYX_ERR(0, 4181, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4182
 * 
 * cdef CUresult _cuModuleLoad(CUmodule* module, const char* fname) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuModuleLoad             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleLoad == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4183
 * cdef CUresult _cuModuleLoad(CUmodule* module, const char* fname) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4183, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4184
 *     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":4185
 *     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":4186
 *     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__50, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4186, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4186, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4185
 *     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":4184
 *     global __cuModuleLoad
 *     cuPythonInit()
 *     if __cuModuleLoad == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoad" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4187
 *         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":4188
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4182
 * 
 * cdef CUresult _cuModuleLoad(CUmodule* module, const char* fname) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4181
 *     return err
 * 
 * cdef CUresult _cuModuleLoad(CUmodule* module, const char* fname) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4190
 *     return err
 * 
 * cdef CUresult _cuModuleLoadData(CUmodule* module, const void* image) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4190, 1, __PYX_ERR(0, 4190, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4191
 * 
 * cdef CUresult _cuModuleLoadData(CUmodule* module, const void* image) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuModuleLoadData             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleLoadData == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4192
 * cdef CUresult _cuModuleLoadData(CUmodule* module, const void* image) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4192, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4193
 *     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":4194
 *     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":4195
 *     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__51, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4195, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4195, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4194
 *     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":4193
 *     global __cuModuleLoadData
 *     cuPythonInit()
 *     if __cuModuleLoadData == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadData" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4196
 *         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":4197
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4191
 * 
 * cdef CUresult _cuModuleLoadData(CUmodule* module, const void* image) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4190
 *     return err
 * 
 * cdef CUresult _cuModuleLoadData(CUmodule* module, const void* image) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4199
 *     return err
 * 
 * cdef CUresult _cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4199, 1, __PYX_ERR(0, 4199, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4200
 * 
 * cdef CUresult _cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuModuleLoadDataEx             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleLoadDataEx == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4201
 * cdef CUresult _cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4201, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4202
 *     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":4203
 *     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":4204
 *     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__52, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4204, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4204, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4203
 *     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":4202
 *     global __cuModuleLoadDataEx
 *     cuPythonInit()
 *     if __cuModuleLoadDataEx == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadDataEx" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4205
 *         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":4206
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4200
 * 
 * cdef CUresult _cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4199
 *     return err
 * 
 * cdef CUresult _cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4208
 *     return err
 * 
 * cdef CUresult _cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4208, 1, __PYX_ERR(0, 4208, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4209
 * 
 * cdef CUresult _cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuModuleLoadFatBinary             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleLoadFatBinary == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4210
 * cdef CUresult _cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4210, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4211
 *     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":4212
 *     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":4213
 *     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__53, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4213, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4213, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4212
 *     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":4211
 *     global __cuModuleLoadFatBinary
 *     cuPythonInit()
 *     if __cuModuleLoadFatBinary == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadFatBinary" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4214
 *         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":4215
 *             raise RuntimeError('Function "cuModuleLoadFatBinary" not found')
 *     err = (<CUresult (*)(CUmodule*, const void*) nogil> __cuModuleLoadFatBinary)(module, fatCubin)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuModuleUnload(CUmodule hmod) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4209
 * 
 * cdef CUresult _cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4208
 *     return err
 * 
 * cdef CUresult _cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4217
 *     return err
 * 
 * cdef CUresult _cuModuleUnload(CUmodule hmod) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4217, 1, __PYX_ERR(0, 4217, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4218
 * 
 * cdef CUresult _cuModuleUnload(CUmodule hmod) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuModuleUnload             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleUnload == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4219
 * cdef CUresult _cuModuleUnload(CUmodule hmod) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4219, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4220
 *     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":4221
 *     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":4222
 *     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__54, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4222, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4222, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4221
 *     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":4220
 *     global __cuModuleUnload
 *     cuPythonInit()
 *     if __cuModuleUnload == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleUnload" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4223
 *         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":4224
 *             raise RuntimeError('Function "cuModuleUnload" not found')
 *     err = (<CUresult (*)(CUmodule) nogil> __cuModuleUnload)(hmod)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4218
 * 
 * cdef CUresult _cuModuleUnload(CUmodule hmod) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4217
 *     return err
 * 
 * cdef CUresult _cuModuleUnload(CUmodule hmod) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4226
 *     return err
 * 
 * cdef CUresult _cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4226, 1, __PYX_ERR(0, 4226, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4227
 * 
 * cdef CUresult _cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuModuleGetLoadingMode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleGetLoadingMode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4228
 * cdef CUresult _cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4228, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4229
 *     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":4230
 *     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":4231
 *     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__55, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4231, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4231, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4230
 *     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":4229
 *     global __cuModuleGetLoadingMode
 *     cuPythonInit()
 *     if __cuModuleGetLoadingMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetLoadingMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4232
 *         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":4233
 *             raise RuntimeError('Function "cuModuleGetLoadingMode" not found')
 *     err = (<CUresult (*)(CUmoduleLoadingMode*) nogil> __cuModuleGetLoadingMode)(mode)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4227
 * 
 * cdef CUresult _cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4226
 *     return err
 * 
 * cdef CUresult _cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4235
 *     return err
 * 
 * cdef CUresult _cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4235, 1, __PYX_ERR(0, 4235, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4236
 * 
 * cdef CUresult _cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuModuleGetFunction             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleGetFunction == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4237
 * cdef CUresult _cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4237, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4238
 *     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":4239
 *     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":4240
 *     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__56, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4240, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4240, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4239
 *     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":4238
 *     global __cuModuleGetFunction
 *     cuPythonInit()
 *     if __cuModuleGetFunction == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetFunction" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4241
 *         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":4242
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4236
 * 
 * cdef CUresult _cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4235
 *     return err
 * 
 * cdef CUresult _cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4244
 *     return err
 * 
 * cdef CUresult _cuModuleGetGlobal_v2(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4244, 1, __PYX_ERR(0, 4244, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4245
 * 
 * cdef CUresult _cuModuleGetGlobal_v2(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuModuleGetGlobal_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleGetGlobal_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4246
 * cdef CUresult _cuModuleGetGlobal_v2(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4246, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4247
 *     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":4248
 *     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":4249
 *     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__57, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4249, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4249, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4248
 *     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":4247
 *     global __cuModuleGetGlobal_v2
 *     cuPythonInit()
 *     if __cuModuleGetGlobal_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetGlobal_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4250
 *         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":4251
 *             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 _cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4245
 * 
 * cdef CUresult _cuModuleGetGlobal_v2(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4244
 *     return err
 * 
 * cdef CUresult _cuModuleGetGlobal_v2(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4253
 *     return err
 * 
 * cdef CUresult _cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4253, 1, __PYX_ERR(0, 4253, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4254
 * 
 * cdef CUresult _cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuModuleGetTexRef             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleGetTexRef == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4255
 * cdef CUresult _cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4255, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4256
 *     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":4257
 *     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":4258
 *     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__58, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4258, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4258, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4257
 *     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":4256
 *     global __cuModuleGetTexRef
 *     cuPythonInit()
 *     if __cuModuleGetTexRef == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetTexRef" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4259
 *         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":4260
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4254
 * 
 * cdef CUresult _cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4253
 *     return err
 * 
 * cdef CUresult _cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4262
 *     return err
 * 
 * cdef CUresult _cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4262, 1, __PYX_ERR(0, 4262, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4263
 * 
 * cdef CUresult _cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuModuleGetSurfRef             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuModuleGetSurfRef == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4264
 * cdef CUresult _cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4264, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4265
 *     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":4266
 *     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":4267
 *     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__59, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4267, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4267, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4266
 *     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":4265
 *     global __cuModuleGetSurfRef
 *     cuPythonInit()
 *     if __cuModuleGetSurfRef == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetSurfRef" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4268
 *         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":4269
 *             raise RuntimeError('Function "cuModuleGetSurfRef" not found')
 *     err = (<CUresult (*)(CUsurfref*, CUmodule, const char*) nogil> __cuModuleGetSurfRef)(pSurfRef, hmod, name)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuLinkCreate_v2(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4263
 * 
 * cdef CUresult _cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4262
 *     return err
 * 
 * cdef CUresult _cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4271
 *     return err
 * 
 * cdef CUresult _cuLinkCreate_v2(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4271, 1, __PYX_ERR(0, 4271, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4272
 * 
 * cdef CUresult _cuLinkCreate_v2(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuLinkCreate_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLinkCreate_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4273
 * cdef CUresult _cuLinkCreate_v2(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4273, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4274
 *     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":4275
 *     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":4276
 *     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, 4276, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4276, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4275
 *     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":4274
 *     global __cuLinkCreate_v2
 *     cuPythonInit()
 *     if __cuLinkCreate_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLinkCreate_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4277
 *         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":4278
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4272
 * 
 * cdef CUresult _cuLinkCreate_v2(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4271
 *     return err
 * 
 * cdef CUresult _cuLinkCreate_v2(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4280
 *     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) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4280, 1, __PYX_ERR(0, 4280, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4281
 * 
 * cdef CUresult _cuLinkAddData_v2(CUlinkState state, CUjitInputType typename, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuLinkAddData_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLinkAddData_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4282
 * cdef CUresult _cuLinkAddData_v2(CUlinkState state, CUjitInputType typename, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4282, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4283
 *     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":4284
 *     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":4285
 *     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, 4285, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4285, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4284
 *     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":4283
 *     global __cuLinkAddData_v2
 *     cuPythonInit()
 *     if __cuLinkAddData_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLinkAddData_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4286
 *         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":4287
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4281
 * 
 * cdef CUresult _cuLinkAddData_v2(CUlinkState state, CUjitInputType typename, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4280
 *     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) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4289
 *     return err
 * 
 * cdef CUresult _cuLinkAddFile_v2(CUlinkState state, CUjitInputType typename, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4289, 1, __PYX_ERR(0, 4289, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4290
 * 
 * cdef CUresult _cuLinkAddFile_v2(CUlinkState state, CUjitInputType typename, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuLinkAddFile_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLinkAddFile_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4291
 * cdef CUresult _cuLinkAddFile_v2(CUlinkState state, CUjitInputType typename, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4291, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4292
 *     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":4293
 *     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":4294
 *     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, 4294, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4294, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4293
 *     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":4292
 *     global __cuLinkAddFile_v2
 *     cuPythonInit()
 *     if __cuLinkAddFile_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLinkAddFile_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4295
 *         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":4296
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4290
 * 
 * cdef CUresult _cuLinkAddFile_v2(CUlinkState state, CUjitInputType typename, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4289
 *     return err
 * 
 * cdef CUresult _cuLinkAddFile_v2(CUlinkState state, CUjitInputType typename, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4298
 *     return err
 * 
 * cdef CUresult _cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4298, 1, __PYX_ERR(0, 4298, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4299
 * 
 * cdef CUresult _cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuLinkComplete             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLinkComplete == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4300
 * cdef CUresult _cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4300, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4301
 *     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":4302
 *     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":4303
 *     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, 4303, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4303, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4302
 *     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":4301
 *     global __cuLinkComplete
 *     cuPythonInit()
 *     if __cuLinkComplete == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLinkComplete" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4304
 *         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":4305
 *             raise RuntimeError('Function "cuLinkComplete" not found')
 *     err = (<CUresult (*)(CUlinkState, void**, size_t*) nogil> __cuLinkComplete)(state, cubinOut, sizeOut)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuLinkDestroy(CUlinkState state) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4299
 * 
 * cdef CUresult _cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4298
 *     return err
 * 
 * cdef CUresult _cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4307
 *     return err
 * 
 * cdef CUresult _cuLinkDestroy(CUlinkState state) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4307, 1, __PYX_ERR(0, 4307, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4308
 * 
 * cdef CUresult _cuLinkDestroy(CUlinkState state) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuLinkDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLinkDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4309
 * cdef CUresult _cuLinkDestroy(CUlinkState state) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4309, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4310
 *     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":4311
 *     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":4312
 *     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, 4312, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4312, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4311
 *     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":4310
 *     global __cuLinkDestroy
 *     cuPythonInit()
 *     if __cuLinkDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLinkDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4313
 *         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":4314
 *             raise RuntimeError('Function "cuLinkDestroy" not found')
 *     err = (<CUresult (*)(CUlinkState) nogil> __cuLinkDestroy)(state)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemGetInfo_v2(size_t* free, size_t* total) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4308
 * 
 * cdef CUresult _cuLinkDestroy(CUlinkState state) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4307
 *     return err
 * 
 * cdef CUresult _cuLinkDestroy(CUlinkState state) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4316
 *     return err
 * 
 * cdef CUresult _cuMemGetInfo_v2(size_t* free, size_t* total) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4316, 1, __PYX_ERR(0, 4316, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4317
 * 
 * cdef CUresult _cuMemGetInfo_v2(size_t* free, size_t* total) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemGetInfo_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemGetInfo_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4318
 * cdef CUresult _cuMemGetInfo_v2(size_t* free, size_t* total) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4318, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4319
 *     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":4320
 *     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":4321
 *     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__65, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4321, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4321, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4320
 *     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":4319
 *     global __cuMemGetInfo_v2
 *     cuPythonInit()
 *     if __cuMemGetInfo_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetInfo_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4322
 *         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":4323
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4317
 * 
 * cdef CUresult _cuMemGetInfo_v2(size_t* free, size_t* total) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4316
 *     return err
 * 
 * cdef CUresult _cuMemGetInfo_v2(size_t* free, size_t* total) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4325
 *     return err
 * 
 * cdef CUresult _cuMemAlloc_v2(CUdeviceptr* dptr, size_t bytesize) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4325, 1, __PYX_ERR(0, 4325, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4326
 * 
 * cdef CUresult _cuMemAlloc_v2(CUdeviceptr* dptr, size_t bytesize) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemAlloc_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemAlloc_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4327
 * cdef CUresult _cuMemAlloc_v2(CUdeviceptr* dptr, size_t bytesize) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4327, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4328
 *     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":4329
 *     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":4330
 *     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__66, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4330, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4330, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4329
 *     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":4328
 *     global __cuMemAlloc_v2
 *     cuPythonInit()
 *     if __cuMemAlloc_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAlloc_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4331
 *         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":4332
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4326
 * 
 * cdef CUresult _cuMemAlloc_v2(CUdeviceptr* dptr, size_t bytesize) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4325
 *     return err
 * 
 * cdef CUresult _cuMemAlloc_v2(CUdeviceptr* dptr, size_t bytesize) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4334
 *     return err
 * 
 * cdef CUresult _cuMemAllocPitch_v2(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4334, 1, __PYX_ERR(0, 4334, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4335
 * 
 * cdef CUresult _cuMemAllocPitch_v2(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemAllocPitch_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemAllocPitch_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4336
 * cdef CUresult _cuMemAllocPitch_v2(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4336, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4337
 *     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":4338
 *     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":4339
 *     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__67, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4339, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4339, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4338
 *     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":4337
 *     global __cuMemAllocPitch_v2
 *     cuPythonInit()
 *     if __cuMemAllocPitch_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocPitch_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4340
 *         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":4341
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4335
 * 
 * cdef CUresult _cuMemAllocPitch_v2(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4334
 *     return err
 * 
 * cdef CUresult _cuMemAllocPitch_v2(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4343
 *     return err
 * 
 * cdef CUresult _cuMemFree_v2(CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4343, 1, __PYX_ERR(0, 4343, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4344
 * 
 * cdef CUresult _cuMemFree_v2(CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemFree_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemFree_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4345
 * cdef CUresult _cuMemFree_v2(CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4345, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4346
 *     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":4347
 *     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":4348
 *     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__68, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4348, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4348, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4347
 *     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":4346
 *     global __cuMemFree_v2
 *     cuPythonInit()
 *     if __cuMemFree_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemFree_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4349
 *         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":4350
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4344
 * 
 * cdef CUresult _cuMemFree_v2(CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4343
 *     return err
 * 
 * cdef CUresult _cuMemFree_v2(CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4352
 *     return err
 * 
 * cdef CUresult _cuMemGetAddressRange_v2(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4352, 1, __PYX_ERR(0, 4352, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4353
 * 
 * cdef CUresult _cuMemGetAddressRange_v2(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemGetAddressRange_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemGetAddressRange_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4354
 * cdef CUresult _cuMemGetAddressRange_v2(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4354, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4355
 *     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":4356
 *     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":4357
 *     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__69, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4357, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4357, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4356
 *     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":4355
 *     global __cuMemGetAddressRange_v2
 *     cuPythonInit()
 *     if __cuMemGetAddressRange_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAddressRange_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4358
 *         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":4359
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4353
 * 
 * cdef CUresult _cuMemGetAddressRange_v2(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4352
 *     return err
 * 
 * cdef CUresult _cuMemGetAddressRange_v2(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4361
 *     return err
 * 
 * cdef CUresult _cuMemAllocHost_v2(void** pp, size_t bytesize) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4361, 1, __PYX_ERR(0, 4361, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4362
 * 
 * cdef CUresult _cuMemAllocHost_v2(void** pp, size_t bytesize) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemAllocHost_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemAllocHost_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4363
 * cdef CUresult _cuMemAllocHost_v2(void** pp, size_t bytesize) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4363, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4364
 *     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":4365
 *     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":4366
 *     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__70, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4366, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4366, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4365
 *     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":4364
 *     global __cuMemAllocHost_v2
 *     cuPythonInit()
 *     if __cuMemAllocHost_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocHost_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4367
 *         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":4368
 *             raise RuntimeError('Function "cuMemAllocHost_v2" not found')
 *     err = (<CUresult (*)(void**, size_t) nogil> __cuMemAllocHost_v2)(pp, bytesize)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemFreeHost(void* p) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4362
 * 
 * cdef CUresult _cuMemAllocHost_v2(void** pp, size_t bytesize) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4361
 *     return err
 * 
 * cdef CUresult _cuMemAllocHost_v2(void** pp, size_t bytesize) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4370
 *     return err
 * 
 * cdef CUresult _cuMemFreeHost(void* p) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4370, 1, __PYX_ERR(0, 4370, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4371
 * 
 * cdef CUresult _cuMemFreeHost(void* p) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemFreeHost             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemFreeHost == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4372
 * cdef CUresult _cuMemFreeHost(void* p) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4372, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4373
 *     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":4374
 *     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":4375
 *     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__71, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4375, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4375, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4374
 *     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":4373
 *     global __cuMemFreeHost
 *     cuPythonInit()
 *     if __cuMemFreeHost == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemFreeHost" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4376
 *         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":4377
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4371
 * 
 * cdef CUresult _cuMemFreeHost(void* p) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4370
 *     return err
 * 
 * cdef CUresult _cuMemFreeHost(void* p) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4379
 *     return err
 * 
 * cdef CUresult _cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4379, 1, __PYX_ERR(0, 4379, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4380
 * 
 * cdef CUresult _cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemHostAlloc             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemHostAlloc == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4381
 * cdef CUresult _cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4381, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4382
 *     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":4383
 *     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":4384
 *     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__72, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4384, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4384, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4383
 *     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":4382
 *     global __cuMemHostAlloc
 *     cuPythonInit()
 *     if __cuMemHostAlloc == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostAlloc" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4385
 *         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":4386
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4380
 * 
 * cdef CUresult _cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4379
 *     return err
 * 
 * cdef CUresult _cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4388
 *     return err
 * 
 * cdef CUresult _cuMemHostGetDevicePointer_v2(CUdeviceptr* pdptr, void* p, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4388, 1, __PYX_ERR(0, 4388, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4389
 * 
 * cdef CUresult _cuMemHostGetDevicePointer_v2(CUdeviceptr* pdptr, void* p, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemHostGetDevicePointer_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemHostGetDevicePointer_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4390
 * cdef CUresult _cuMemHostGetDevicePointer_v2(CUdeviceptr* pdptr, void* p, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4390, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4391
 *     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":4392
 *     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":4393
 *     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__73, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4393, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4393, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4392
 *     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":4391
 *     global __cuMemHostGetDevicePointer_v2
 *     cuPythonInit()
 *     if __cuMemHostGetDevicePointer_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostGetDevicePointer_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4394
 *         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":4395
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4389
 * 
 * cdef CUresult _cuMemHostGetDevicePointer_v2(CUdeviceptr* pdptr, void* p, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4388
 *     return err
 * 
 * cdef CUresult _cuMemHostGetDevicePointer_v2(CUdeviceptr* pdptr, void* p, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4397
 *     return err
 * 
 * cdef CUresult _cuMemHostGetFlags(unsigned int* pFlags, void* p) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4397, 1, __PYX_ERR(0, 4397, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4398
 * 
 * cdef CUresult _cuMemHostGetFlags(unsigned int* pFlags, void* p) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemHostGetFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemHostGetFlags == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4399
 * cdef CUresult _cuMemHostGetFlags(unsigned int* pFlags, void* p) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4399, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4400
 *     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":4401
 *     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":4402
 *     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__74, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4402, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4402, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4401
 *     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":4400
 *     global __cuMemHostGetFlags
 *     cuPythonInit()
 *     if __cuMemHostGetFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostGetFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4403
 *         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":4404
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4398
 * 
 * cdef CUresult _cuMemHostGetFlags(unsigned int* pFlags, void* p) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4397
 *     return err
 * 
 * cdef CUresult _cuMemHostGetFlags(unsigned int* pFlags, void* p) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4406
 *     return err
 * 
 * cdef CUresult _cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4406, 1, __PYX_ERR(0, 4406, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4407
 * 
 * cdef CUresult _cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemAllocManaged             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemAllocManaged == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4408
 * cdef CUresult _cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4408, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4409
 *     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":4410
 *     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":4411
 *     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__75, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4411, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4411, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4410
 *     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":4409
 *     global __cuMemAllocManaged
 *     cuPythonInit()
 *     if __cuMemAllocManaged == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocManaged" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4412
 *         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":4413
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4407
 * 
 * cdef CUresult _cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4406
 *     return err
 * 
 * cdef CUresult _cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4415
 *     return err
 * 
 * cdef CUresult _cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4415, 1, __PYX_ERR(0, 4415, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4416
 * 
 * cdef CUresult _cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDeviceGetByPCIBusId             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetByPCIBusId == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4417
 * cdef CUresult _cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4417, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4418
 *     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":4419
 *     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":4420
 *     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__76, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4420, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4420, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4419
 *     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":4418
 *     global __cuDeviceGetByPCIBusId
 *     cuPythonInit()
 *     if __cuDeviceGetByPCIBusId == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetByPCIBusId" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4421
 *         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":4422
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4416
 * 
 * cdef CUresult _cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4415
 *     return err
 * 
 * cdef CUresult _cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4424
 *     return err
 * 
 * cdef CUresult _cuDeviceGetPCIBusId(char* pciBusId, int length, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4424, 1, __PYX_ERR(0, 4424, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4425
 * 
 * cdef CUresult _cuDeviceGetPCIBusId(char* pciBusId, int length, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDeviceGetPCIBusId             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetPCIBusId == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4426
 * cdef CUresult _cuDeviceGetPCIBusId(char* pciBusId, int length, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4426, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4427
 *     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":4428
 *     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":4429
 *     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__77, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4429, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4429, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4428
 *     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":4427
 *     global __cuDeviceGetPCIBusId
 *     cuPythonInit()
 *     if __cuDeviceGetPCIBusId == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetPCIBusId" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4430
 *         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":4431
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4425
 * 
 * cdef CUresult _cuDeviceGetPCIBusId(char* pciBusId, int length, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4424
 *     return err
 * 
 * cdef CUresult _cuDeviceGetPCIBusId(char* pciBusId, int length, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4433
 *     return err
 * 
 * cdef CUresult _cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4433, 1, __PYX_ERR(0, 4433, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4434
 * 
 * cdef CUresult _cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuIpcGetEventHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuIpcGetEventHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4435
 * cdef CUresult _cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4435, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4436
 *     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":4437
 *     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":4438
 *     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__78, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4438, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4438, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4437
 *     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":4436
 *     global __cuIpcGetEventHandle
 *     cuPythonInit()
 *     if __cuIpcGetEventHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuIpcGetEventHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4439
 *         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":4440
 *             raise RuntimeError('Function "cuIpcGetEventHandle" not found')
 *     err = (<CUresult (*)(CUipcEventHandle*, CUevent) nogil> __cuIpcGetEventHandle)(pHandle, event)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4434
 * 
 * cdef CUresult _cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4433
 *     return err
 * 
 * cdef CUresult _cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4442
 *     return err
 * 
 * cdef CUresult _cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4442, 1, __PYX_ERR(0, 4442, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4443
 * 
 * cdef CUresult _cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuIpcOpenEventHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuIpcOpenEventHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4444
 * cdef CUresult _cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4444, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4445
 *     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":4446
 *     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":4447
 *     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__79, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4447, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4447, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4446
 *     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":4445
 *     global __cuIpcOpenEventHandle
 *     cuPythonInit()
 *     if __cuIpcOpenEventHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuIpcOpenEventHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4448
 *         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":4449
 *             raise RuntimeError('Function "cuIpcOpenEventHandle" not found')
 *     err = (<CUresult (*)(CUevent*, CUipcEventHandle) nogil> __cuIpcOpenEventHandle)(phEvent, handle)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4443
 * 
 * cdef CUresult _cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4442
 *     return err
 * 
 * cdef CUresult _cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4451
 *     return err
 * 
 * cdef CUresult _cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4451, 1, __PYX_ERR(0, 4451, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4452
 * 
 * cdef CUresult _cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuIpcGetMemHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuIpcGetMemHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4453
 * cdef CUresult _cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4453, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4454
 *     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":4455
 *     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":4456
 *     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__80, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4456, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4456, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4455
 *     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":4454
 *     global __cuIpcGetMemHandle
 *     cuPythonInit()
 *     if __cuIpcGetMemHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuIpcGetMemHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4457
 *         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":4458
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4452
 * 
 * cdef CUresult _cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4451
 *     return err
 * 
 * cdef CUresult _cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4460
 *     return err
 * 
 * cdef CUresult _cuIpcOpenMemHandle_v2(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4460, 1, __PYX_ERR(0, 4460, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4461
 * 
 * cdef CUresult _cuIpcOpenMemHandle_v2(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuIpcOpenMemHandle_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuIpcOpenMemHandle_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4462
 * cdef CUresult _cuIpcOpenMemHandle_v2(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4462, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4463
 *     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":4464
 *     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":4465
 *     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__81, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4465, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4465, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4464
 *     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":4463
 *     global __cuIpcOpenMemHandle_v2
 *     cuPythonInit()
 *     if __cuIpcOpenMemHandle_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuIpcOpenMemHandle_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4466
 *         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":4467
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4461
 * 
 * cdef CUresult _cuIpcOpenMemHandle_v2(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4460
 *     return err
 * 
 * cdef CUresult _cuIpcOpenMemHandle_v2(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4469
 *     return err
 * 
 * cdef CUresult _cuIpcCloseMemHandle(CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4469, 1, __PYX_ERR(0, 4469, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4470
 * 
 * cdef CUresult _cuIpcCloseMemHandle(CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuIpcCloseMemHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuIpcCloseMemHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4471
 * cdef CUresult _cuIpcCloseMemHandle(CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4471, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4472
 *     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":4473
 *     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":4474
 *     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__82, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4474, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4474, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4473
 *     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":4472
 *     global __cuIpcCloseMemHandle
 *     cuPythonInit()
 *     if __cuIpcCloseMemHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuIpcCloseMemHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4475
 *         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":4476
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4470
 * 
 * cdef CUresult _cuIpcCloseMemHandle(CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4469
 *     return err
 * 
 * cdef CUresult _cuIpcCloseMemHandle(CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4478
 *     return err
 * 
 * cdef CUresult _cuMemHostRegister_v2(void* p, size_t bytesize, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4478, 1, __PYX_ERR(0, 4478, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4479
 * 
 * cdef CUresult _cuMemHostRegister_v2(void* p, size_t bytesize, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemHostRegister_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemHostRegister_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4480
 * cdef CUresult _cuMemHostRegister_v2(void* p, size_t bytesize, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4480, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4481
 *     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":4482
 *     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":4483
 *     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__83, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4483, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4483, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4482
 *     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":4481
 *     global __cuMemHostRegister_v2
 *     cuPythonInit()
 *     if __cuMemHostRegister_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostRegister_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4484
 *         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":4485
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4479
 * 
 * cdef CUresult _cuMemHostRegister_v2(void* p, size_t bytesize, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4478
 *     return err
 * 
 * cdef CUresult _cuMemHostRegister_v2(void* p, size_t bytesize, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4487
 *     return err
 * 
 * cdef CUresult _cuMemHostUnregister(void* p) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4487, 1, __PYX_ERR(0, 4487, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4488
 * 
 * cdef CUresult _cuMemHostUnregister(void* p) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemHostUnregister             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemHostUnregister == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4489
 * cdef CUresult _cuMemHostUnregister(void* p) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4489, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4490
 *     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":4491
 *     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":4492
 *     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__84, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4492, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4492, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4491
 *     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":4490
 *     global __cuMemHostUnregister
 *     cuPythonInit()
 *     if __cuMemHostUnregister == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostUnregister" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4493
 *         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":4494
 *             raise RuntimeError('Function "cuMemHostUnregister" not found')
 *     err = (<CUresult (*)(void*) nogil> __cuMemHostUnregister)(p)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4488
 * 
 * cdef CUresult _cuMemHostUnregister(void* p) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4487
 *     return err
 * 
 * cdef CUresult _cuMemHostUnregister(void* p) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4496
 *     return err
 * 
 * cdef CUresult _cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4496, 1, __PYX_ERR(0, 4496, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4497
 * 
 * cdef CUresult _cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemcpy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4498
 * cdef CUresult _cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4498, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4499
 *     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":4500
 *     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":4501
 *     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__85, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4501, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4501, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4500
 *     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":4499
 *     global __cuMemcpy
 *     cuPythonInit()
 *     if __cuMemcpy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4502
 *         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":4503
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4497
 * 
 * cdef CUresult _cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4496
 *     return err
 * 
 * cdef CUresult _cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4505
 *     return err
 * 
 * cdef CUresult _cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4505, 1, __PYX_ERR(0, 4505, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4506
 * 
 * cdef CUresult _cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemcpyPeer             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyPeer == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4507
 * cdef CUresult _cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4507, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4508
 *     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":4509
 *     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":4510
 *     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__86, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4510, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4510, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4509
 *     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":4508
 *     global __cuMemcpyPeer
 *     cuPythonInit()
 *     if __cuMemcpyPeer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyPeer" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4511
 *         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":4512
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4506
 * 
 * cdef CUresult _cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4505
 *     return err
 * 
 * cdef CUresult _cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4514
 *     return err
 * 
 * cdef CUresult _cuMemcpyHtoD_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4514, 1, __PYX_ERR(0, 4514, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4515
 * 
 * cdef CUresult _cuMemcpyHtoD_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemcpyHtoD_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyHtoD_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4516
 * cdef CUresult _cuMemcpyHtoD_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4516, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4517
 *     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":4518
 *     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":4519
 *     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__87, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4519, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4519, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4518
 *     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":4517
 *     global __cuMemcpyHtoD_v2
 *     cuPythonInit()
 *     if __cuMemcpyHtoD_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyHtoD_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4520
 *         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":4521
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4515
 * 
 * cdef CUresult _cuMemcpyHtoD_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4514
 *     return err
 * 
 * cdef CUresult _cuMemcpyHtoD_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4523
 *     return err
 * 
 * cdef CUresult _cuMemcpyDtoH_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4523, 1, __PYX_ERR(0, 4523, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4524
 * 
 * cdef CUresult _cuMemcpyDtoH_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemcpyDtoH_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyDtoH_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4525
 * cdef CUresult _cuMemcpyDtoH_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4525, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4526
 *     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":4527
 *     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":4528
 *     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__88, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4528, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4528, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4527
 *     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":4526
 *     global __cuMemcpyDtoH_v2
 *     cuPythonInit()
 *     if __cuMemcpyDtoH_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoH_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4529
 *         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":4530
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4524
 * 
 * cdef CUresult _cuMemcpyDtoH_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4523
 *     return err
 * 
 * cdef CUresult _cuMemcpyDtoH_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4532
 *     return err
 * 
 * cdef CUresult _cuMemcpyDtoD_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4532, 1, __PYX_ERR(0, 4532, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4533
 * 
 * cdef CUresult _cuMemcpyDtoD_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemcpyDtoD_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyDtoD_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4534
 * cdef CUresult _cuMemcpyDtoD_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4534, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4535
 *     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":4536
 *     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":4537
 *     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__89, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4537, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4537, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4536
 *     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":4535
 *     global __cuMemcpyDtoD_v2
 *     cuPythonInit()
 *     if __cuMemcpyDtoD_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoD_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4538
 *         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":4539
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4533
 * 
 * cdef CUresult _cuMemcpyDtoD_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4532
 *     return err
 * 
 * cdef CUresult _cuMemcpyDtoD_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4541
 *     return err
 * 
 * cdef CUresult _cuMemcpyDtoA_v2(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4541, 1, __PYX_ERR(0, 4541, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4542
 * 
 * cdef CUresult _cuMemcpyDtoA_v2(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemcpyDtoA_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyDtoA_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4543
 * cdef CUresult _cuMemcpyDtoA_v2(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4543, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4544
 *     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":4545
 *     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":4546
 *     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__90, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4546, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4546, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4545
 *     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":4544
 *     global __cuMemcpyDtoA_v2
 *     cuPythonInit()
 *     if __cuMemcpyDtoA_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoA_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4547
 *         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":4548
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4542
 * 
 * cdef CUresult _cuMemcpyDtoA_v2(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4541
 *     return err
 * 
 * cdef CUresult _cuMemcpyDtoA_v2(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4550
 *     return err
 * 
 * cdef CUresult _cuMemcpyAtoD_v2(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4550, 1, __PYX_ERR(0, 4550, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4551
 * 
 * cdef CUresult _cuMemcpyAtoD_v2(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemcpyAtoD_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyAtoD_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4552
 * cdef CUresult _cuMemcpyAtoD_v2(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4552, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4553
 *     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":4554
 *     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":4555
 *     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__91, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4555, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4555, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4554
 *     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":4553
 *     global __cuMemcpyAtoD_v2
 *     cuPythonInit()
 *     if __cuMemcpyAtoD_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAtoD_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4556
 *         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":4557
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4551
 * 
 * cdef CUresult _cuMemcpyAtoD_v2(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4550
 *     return err
 * 
 * cdef CUresult _cuMemcpyAtoD_v2(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4559
 *     return err
 * 
 * cdef CUresult _cuMemcpyHtoA_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4559, 1, __PYX_ERR(0, 4559, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4560
 * 
 * cdef CUresult _cuMemcpyHtoA_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemcpyHtoA_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyHtoA_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4561
 * cdef CUresult _cuMemcpyHtoA_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4561, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4562
 *     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":4563
 *     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":4564
 *     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__92, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4564, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4564, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4563
 *     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":4562
 *     global __cuMemcpyHtoA_v2
 *     cuPythonInit()
 *     if __cuMemcpyHtoA_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyHtoA_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4565
 *         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":4566
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4560
 * 
 * cdef CUresult _cuMemcpyHtoA_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4559
 *     return err
 * 
 * cdef CUresult _cuMemcpyHtoA_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4568
 *     return err
 * 
 * cdef CUresult _cuMemcpyAtoH_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4568, 1, __PYX_ERR(0, 4568, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4569
 * 
 * cdef CUresult _cuMemcpyAtoH_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemcpyAtoH_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyAtoH_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4570
 * cdef CUresult _cuMemcpyAtoH_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4570, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4571
 *     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":4572
 *     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":4573
 *     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__93, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4573, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4573, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4572
 *     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":4571
 *     global __cuMemcpyAtoH_v2
 *     cuPythonInit()
 *     if __cuMemcpyAtoH_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAtoH_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4574
 *         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":4575
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4569
 * 
 * cdef CUresult _cuMemcpyAtoH_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4568
 *     return err
 * 
 * cdef CUresult _cuMemcpyAtoH_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4577
 *     return err
 * 
 * cdef CUresult _cuMemcpyAtoA_v2(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4577, 1, __PYX_ERR(0, 4577, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4578
 * 
 * cdef CUresult _cuMemcpyAtoA_v2(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemcpyAtoA_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyAtoA_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4579
 * cdef CUresult _cuMemcpyAtoA_v2(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4579, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4580
 *     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":4581
 *     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":4582
 *     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__94, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4582, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4582, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4581
 *     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":4580
 *     global __cuMemcpyAtoA_v2
 *     cuPythonInit()
 *     if __cuMemcpyAtoA_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAtoA_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4583
 *         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":4584
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4578
 * 
 * cdef CUresult _cuMemcpyAtoA_v2(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4577
 *     return err
 * 
 * cdef CUresult _cuMemcpyAtoA_v2(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4586
 *     return err
 * 
 * cdef CUresult _cuMemcpy2D_v2(const CUDA_MEMCPY2D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4586, 1, __PYX_ERR(0, 4586, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4587
 * 
 * cdef CUresult _cuMemcpy2D_v2(const CUDA_MEMCPY2D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemcpy2D_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpy2D_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4588
 * cdef CUresult _cuMemcpy2D_v2(const CUDA_MEMCPY2D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4588, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4589
 *     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":4590
 *     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":4591
 *     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__95, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4591, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4591, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4590
 *     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":4589
 *     global __cuMemcpy2D_v2
 *     cuPythonInit()
 *     if __cuMemcpy2D_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy2D_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4592
 *         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":4593
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4587
 * 
 * cdef CUresult _cuMemcpy2D_v2(const CUDA_MEMCPY2D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4586
 *     return err
 * 
 * cdef CUresult _cuMemcpy2D_v2(const CUDA_MEMCPY2D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4595
 *     return err
 * 
 * cdef CUresult _cuMemcpy2DUnaligned_v2(const CUDA_MEMCPY2D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4595, 1, __PYX_ERR(0, 4595, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4596
 * 
 * cdef CUresult _cuMemcpy2DUnaligned_v2(const CUDA_MEMCPY2D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemcpy2DUnaligned_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpy2DUnaligned_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4597
 * cdef CUresult _cuMemcpy2DUnaligned_v2(const CUDA_MEMCPY2D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4597, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4598
 *     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":4599
 *     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":4600
 *     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__96, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4600, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4600, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4599
 *     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":4598
 *     global __cuMemcpy2DUnaligned_v2
 *     cuPythonInit()
 *     if __cuMemcpy2DUnaligned_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy2DUnaligned_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4601
 *         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":4602
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4596
 * 
 * cdef CUresult _cuMemcpy2DUnaligned_v2(const CUDA_MEMCPY2D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4595
 *     return err
 * 
 * cdef CUresult _cuMemcpy2DUnaligned_v2(const CUDA_MEMCPY2D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4604
 *     return err
 * 
 * cdef CUresult _cuMemcpy3D_v2(const CUDA_MEMCPY3D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4604, 1, __PYX_ERR(0, 4604, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4605
 * 
 * cdef CUresult _cuMemcpy3D_v2(const CUDA_MEMCPY3D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemcpy3D_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpy3D_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4606
 * cdef CUresult _cuMemcpy3D_v2(const CUDA_MEMCPY3D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4606, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4607
 *     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":4608
 *     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":4609
 *     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__97, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4609, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4609, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4608
 *     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":4607
 *     global __cuMemcpy3D_v2
 *     cuPythonInit()
 *     if __cuMemcpy3D_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3D_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4610
 *         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":4611
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4605
 * 
 * cdef CUresult _cuMemcpy3D_v2(const CUDA_MEMCPY3D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4604
 *     return err
 * 
 * cdef CUresult _cuMemcpy3D_v2(const CUDA_MEMCPY3D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4613
 *     return err
 * 
 * cdef CUresult _cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4613, 1, __PYX_ERR(0, 4613, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4614
 * 
 * cdef CUresult _cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemcpy3DPeer             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpy3DPeer == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4615
 * cdef CUresult _cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4615, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4616
 *     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":4617
 *     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":4618
 *     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__98, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4618, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4618, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4617
 *     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":4616
 *     global __cuMemcpy3DPeer
 *     cuPythonInit()
 *     if __cuMemcpy3DPeer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3DPeer" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4619
 *         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":4620
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4614
 * 
 * cdef CUresult _cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4613
 *     return err
 * 
 * cdef CUresult _cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4622
 *     return err
 * 
 * cdef CUresult _cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4622, 1, __PYX_ERR(0, 4622, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4623
 * 
 * cdef CUresult _cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemcpyAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyAsync == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4624
 * cdef CUresult _cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4624, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4625
 *     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":4626
 *     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":4627
 *     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__99, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4627, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4627, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4626
 *     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":4625
 *     global __cuMemcpyAsync
 *     cuPythonInit()
 *     if __cuMemcpyAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4628
 *         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":4629
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4623
 * 
 * cdef CUresult _cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4622
 *     return err
 * 
 * cdef CUresult _cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4631
 *     return err
 * 
 * cdef CUresult _cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4631, 1, __PYX_ERR(0, 4631, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4632
 * 
 * cdef CUresult _cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemcpyPeerAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyPeerAsync == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4633
 * cdef CUresult _cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4633, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4634
 *     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":4635
 *     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":4636
 *     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__100, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4636, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4636, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4635
 *     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":4634
 *     global __cuMemcpyPeerAsync
 *     cuPythonInit()
 *     if __cuMemcpyPeerAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyPeerAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4637
 *         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":4638
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4632
 * 
 * cdef CUresult _cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4631
 *     return err
 * 
 * cdef CUresult _cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4640
 *     return err
 * 
 * cdef CUresult _cuMemcpyHtoDAsync_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4640, 1, __PYX_ERR(0, 4640, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4641
 * 
 * cdef CUresult _cuMemcpyHtoDAsync_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemcpyHtoDAsync_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyHtoDAsync_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4642
 * cdef CUresult _cuMemcpyHtoDAsync_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4642, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4643
 *     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":4644
 *     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":4645
 *     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__101, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4645, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4645, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4644
 *     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":4643
 *     global __cuMemcpyHtoDAsync_v2
 *     cuPythonInit()
 *     if __cuMemcpyHtoDAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyHtoDAsync_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4646
 *         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":4647
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4641
 * 
 * cdef CUresult _cuMemcpyHtoDAsync_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4640
 *     return err
 * 
 * cdef CUresult _cuMemcpyHtoDAsync_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4649
 *     return err
 * 
 * cdef CUresult _cuMemcpyDtoHAsync_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4649, 1, __PYX_ERR(0, 4649, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4650
 * 
 * cdef CUresult _cuMemcpyDtoHAsync_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemcpyDtoHAsync_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyDtoHAsync_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4651
 * cdef CUresult _cuMemcpyDtoHAsync_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4651, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4652
 *     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":4653
 *     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":4654
 *     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__102, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4654, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4654, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4653
 *     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":4652
 *     global __cuMemcpyDtoHAsync_v2
 *     cuPythonInit()
 *     if __cuMemcpyDtoHAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoHAsync_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4655
 *         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":4656
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4650
 * 
 * cdef CUresult _cuMemcpyDtoHAsync_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4649
 *     return err
 * 
 * cdef CUresult _cuMemcpyDtoHAsync_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4658
 *     return err
 * 
 * cdef CUresult _cuMemcpyDtoDAsync_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4658, 1, __PYX_ERR(0, 4658, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4659
 * 
 * cdef CUresult _cuMemcpyDtoDAsync_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemcpyDtoDAsync_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyDtoDAsync_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4660
 * cdef CUresult _cuMemcpyDtoDAsync_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4660, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4661
 *     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":4662
 *     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":4663
 *     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__103, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4663, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4663, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4662
 *     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":4661
 *     global __cuMemcpyDtoDAsync_v2
 *     cuPythonInit()
 *     if __cuMemcpyDtoDAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyDtoDAsync_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4664
 *         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":4665
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4659
 * 
 * cdef CUresult _cuMemcpyDtoDAsync_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4658
 *     return err
 * 
 * cdef CUresult _cuMemcpyDtoDAsync_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4667
 *     return err
 * 
 * cdef CUresult _cuMemcpyHtoAAsync_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4667, 1, __PYX_ERR(0, 4667, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4668
 * 
 * cdef CUresult _cuMemcpyHtoAAsync_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemcpyHtoAAsync_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyHtoAAsync_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4669
 * cdef CUresult _cuMemcpyHtoAAsync_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4669, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4670
 *     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":4671
 *     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":4672
 *     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__104, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4672, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4672, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4671
 *     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":4670
 *     global __cuMemcpyHtoAAsync_v2
 *     cuPythonInit()
 *     if __cuMemcpyHtoAAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyHtoAAsync_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4673
 *         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":4674
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4668
 * 
 * cdef CUresult _cuMemcpyHtoAAsync_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4667
 *     return err
 * 
 * cdef CUresult _cuMemcpyHtoAAsync_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4676
 *     return err
 * 
 * cdef CUresult _cuMemcpyAtoHAsync_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4676, 1, __PYX_ERR(0, 4676, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4677
 * 
 * cdef CUresult _cuMemcpyAtoHAsync_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemcpyAtoHAsync_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpyAtoHAsync_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4678
 * cdef CUresult _cuMemcpyAtoHAsync_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4678, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4679
 *     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":4680
 *     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":4681
 *     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__105, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4681, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4681, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4680
 *     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":4679
 *     global __cuMemcpyAtoHAsync_v2
 *     cuPythonInit()
 *     if __cuMemcpyAtoHAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpyAtoHAsync_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4682
 *         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":4683
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4677
 * 
 * cdef CUresult _cuMemcpyAtoHAsync_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4676
 *     return err
 * 
 * cdef CUresult _cuMemcpyAtoHAsync_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4685
 *     return err
 * 
 * cdef CUresult _cuMemcpy2DAsync_v2(const CUDA_MEMCPY2D* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4685, 1, __PYX_ERR(0, 4685, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4686
 * 
 * cdef CUresult _cuMemcpy2DAsync_v2(const CUDA_MEMCPY2D* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemcpy2DAsync_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpy2DAsync_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4687
 * cdef CUresult _cuMemcpy2DAsync_v2(const CUDA_MEMCPY2D* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4687, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4688
 *     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":4689
 *     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":4690
 *     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__106, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4690, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4690, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4689
 *     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":4688
 *     global __cuMemcpy2DAsync_v2
 *     cuPythonInit()
 *     if __cuMemcpy2DAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy2DAsync_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4691
 *         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":4692
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4686
 * 
 * cdef CUresult _cuMemcpy2DAsync_v2(const CUDA_MEMCPY2D* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4685
 *     return err
 * 
 * cdef CUresult _cuMemcpy2DAsync_v2(const CUDA_MEMCPY2D* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4694
 *     return err
 * 
 * cdef CUresult _cuMemcpy3DAsync_v2(const CUDA_MEMCPY3D* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4694, 1, __PYX_ERR(0, 4694, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4695
 * 
 * cdef CUresult _cuMemcpy3DAsync_v2(const CUDA_MEMCPY3D* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemcpy3DAsync_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpy3DAsync_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4696
 * cdef CUresult _cuMemcpy3DAsync_v2(const CUDA_MEMCPY3D* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4696, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4697
 *     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":4698
 *     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":4699
 *     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__107, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4699, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4699, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4698
 *     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":4697
 *     global __cuMemcpy3DAsync_v2
 *     cuPythonInit()
 *     if __cuMemcpy3DAsync_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3DAsync_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4700
 *         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":4701
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4695
 * 
 * cdef CUresult _cuMemcpy3DAsync_v2(const CUDA_MEMCPY3D* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4694
 *     return err
 * 
 * cdef CUresult _cuMemcpy3DAsync_v2(const CUDA_MEMCPY3D* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4703
 *     return err
 * 
 * cdef CUresult _cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4703, 1, __PYX_ERR(0, 4703, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4704
 * 
 * cdef CUresult _cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemcpy3DPeerAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemcpy3DPeerAsync == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4705
 * cdef CUresult _cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4705, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4706
 *     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":4707
 *     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":4708
 *     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__108, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4708, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4708, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4707
 *     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":4706
 *     global __cuMemcpy3DPeerAsync
 *     cuPythonInit()
 *     if __cuMemcpy3DPeerAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3DPeerAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4709
 *         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":4710
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4704
 * 
 * cdef CUresult _cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4703
 *     return err
 * 
 * cdef CUresult _cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4712
 *     return err
 * 
 * cdef CUresult _cuMemsetD8_v2(CUdeviceptr dstDevice, unsigned char uc, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4712, 1, __PYX_ERR(0, 4712, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4713
 * 
 * cdef CUresult _cuMemsetD8_v2(CUdeviceptr dstDevice, unsigned char uc, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemsetD8_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD8_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4714
 * cdef CUresult _cuMemsetD8_v2(CUdeviceptr dstDevice, unsigned char uc, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4714, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4715
 *     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":4716
 *     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":4717
 *     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__109, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4717, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4717, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4716
 *     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":4715
 *     global __cuMemsetD8_v2
 *     cuPythonInit()
 *     if __cuMemsetD8_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD8_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4718
 *         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":4719
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4713
 * 
 * cdef CUresult _cuMemsetD8_v2(CUdeviceptr dstDevice, unsigned char uc, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4712
 *     return err
 * 
 * cdef CUresult _cuMemsetD8_v2(CUdeviceptr dstDevice, unsigned char uc, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4721
 *     return err
 * 
 * cdef CUresult _cuMemsetD16_v2(CUdeviceptr dstDevice, unsigned short us, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4721, 1, __PYX_ERR(0, 4721, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4722
 * 
 * cdef CUresult _cuMemsetD16_v2(CUdeviceptr dstDevice, unsigned short us, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemsetD16_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD16_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4723
 * cdef CUresult _cuMemsetD16_v2(CUdeviceptr dstDevice, unsigned short us, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4723, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4724
 *     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":4725
 *     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":4726
 *     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__110, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4726, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4726, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4725
 *     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":4724
 *     global __cuMemsetD16_v2
 *     cuPythonInit()
 *     if __cuMemsetD16_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD16_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4727
 *         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":4728
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4722
 * 
 * cdef CUresult _cuMemsetD16_v2(CUdeviceptr dstDevice, unsigned short us, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4721
 *     return err
 * 
 * cdef CUresult _cuMemsetD16_v2(CUdeviceptr dstDevice, unsigned short us, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4730
 *     return err
 * 
 * cdef CUresult _cuMemsetD32_v2(CUdeviceptr dstDevice, unsigned int ui, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4730, 1, __PYX_ERR(0, 4730, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4731
 * 
 * cdef CUresult _cuMemsetD32_v2(CUdeviceptr dstDevice, unsigned int ui, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemsetD32_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD32_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4732
 * cdef CUresult _cuMemsetD32_v2(CUdeviceptr dstDevice, unsigned int ui, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4732, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4733
 *     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":4734
 *     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":4735
 *     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__111, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4735, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4735, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4734
 *     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":4733
 *     global __cuMemsetD32_v2
 *     cuPythonInit()
 *     if __cuMemsetD32_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD32_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4736
 *         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":4737
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4731
 * 
 * cdef CUresult _cuMemsetD32_v2(CUdeviceptr dstDevice, unsigned int ui, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4730
 *     return err
 * 
 * cdef CUresult _cuMemsetD32_v2(CUdeviceptr dstDevice, unsigned int ui, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4739
 *     return err
 * 
 * cdef CUresult _cuMemsetD2D8_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4739, 1, __PYX_ERR(0, 4739, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4740
 * 
 * cdef CUresult _cuMemsetD2D8_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemsetD2D8_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD2D8_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4741
 * cdef CUresult _cuMemsetD2D8_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4741, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4742
 *     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":4743
 *     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":4744
 *     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__112, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4744, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4744, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4743
 *     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":4742
 *     global __cuMemsetD2D8_v2
 *     cuPythonInit()
 *     if __cuMemsetD2D8_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D8_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4745
 *         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":4746
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4740
 * 
 * cdef CUresult _cuMemsetD2D8_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4739
 *     return err
 * 
 * cdef CUresult _cuMemsetD2D8_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4748
 *     return err
 * 
 * cdef CUresult _cuMemsetD2D16_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4748, 1, __PYX_ERR(0, 4748, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4749
 * 
 * cdef CUresult _cuMemsetD2D16_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemsetD2D16_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD2D16_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4750
 * cdef CUresult _cuMemsetD2D16_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4750, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4751
 *     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":4752
 *     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":4753
 *     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__113, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4753, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4753, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4752
 *     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":4751
 *     global __cuMemsetD2D16_v2
 *     cuPythonInit()
 *     if __cuMemsetD2D16_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D16_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4754
 *         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":4755
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4749
 * 
 * cdef CUresult _cuMemsetD2D16_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4748
 *     return err
 * 
 * cdef CUresult _cuMemsetD2D16_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4757
 *     return err
 * 
 * cdef CUresult _cuMemsetD2D32_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4757, 1, __PYX_ERR(0, 4757, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4758
 * 
 * cdef CUresult _cuMemsetD2D32_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemsetD2D32_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD2D32_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4759
 * cdef CUresult _cuMemsetD2D32_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4759, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4760
 *     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":4761
 *     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":4762
 *     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__114, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4762, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4762, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4761
 *     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":4760
 *     global __cuMemsetD2D32_v2
 *     cuPythonInit()
 *     if __cuMemsetD2D32_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D32_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4763
 *         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":4764
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4758
 * 
 * cdef CUresult _cuMemsetD2D32_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4757
 *     return err
 * 
 * cdef CUresult _cuMemsetD2D32_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4766
 *     return err
 * 
 * cdef CUresult _cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4766, 1, __PYX_ERR(0, 4766, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4767
 * 
 * cdef CUresult _cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemsetD8Async             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD8Async == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4768
 * cdef CUresult _cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4768, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4769
 *     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":4770
 *     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":4771
 *     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__115, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4771, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4771, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4770
 *     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":4769
 *     global __cuMemsetD8Async
 *     cuPythonInit()
 *     if __cuMemsetD8Async == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD8Async" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4772
 *         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":4773
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4767
 * 
 * cdef CUresult _cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4766
 *     return err
 * 
 * cdef CUresult _cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4775
 *     return err
 * 
 * cdef CUresult _cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4775, 1, __PYX_ERR(0, 4775, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4776
 * 
 * cdef CUresult _cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemsetD16Async             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD16Async == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4777
 * cdef CUresult _cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4777, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4778
 *     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":4779
 *     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":4780
 *     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__116, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4780, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4780, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4779
 *     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":4778
 *     global __cuMemsetD16Async
 *     cuPythonInit()
 *     if __cuMemsetD16Async == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD16Async" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4781
 *         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":4782
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4776
 * 
 * cdef CUresult _cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4775
 *     return err
 * 
 * cdef CUresult _cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4784
 *     return err
 * 
 * cdef CUresult _cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4784, 1, __PYX_ERR(0, 4784, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4785
 * 
 * cdef CUresult _cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemsetD32Async             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD32Async == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4786
 * cdef CUresult _cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4786, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4787
 *     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":4788
 *     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":4789
 *     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__117, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4789, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4789, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4788
 *     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":4787
 *     global __cuMemsetD32Async
 *     cuPythonInit()
 *     if __cuMemsetD32Async == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD32Async" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4790
 *         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":4791
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4785
 * 
 * cdef CUresult _cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4784
 *     return err
 * 
 * cdef CUresult _cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4793
 *     return err
 * 
 * cdef CUresult _cuMemsetD2D8Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4793, 1, __PYX_ERR(0, 4793, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4794
 * 
 * cdef CUresult _cuMemsetD2D8Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemsetD2D8Async             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD2D8Async == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4795
 * cdef CUresult _cuMemsetD2D8Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4795, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4796
 *     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":4797
 *     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":4798
 *     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__118, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4798, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4798, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4797
 *     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":4796
 *     global __cuMemsetD2D8Async
 *     cuPythonInit()
 *     if __cuMemsetD2D8Async == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D8Async" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4799
 *         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":4800
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4794
 * 
 * cdef CUresult _cuMemsetD2D8Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4793
 *     return err
 * 
 * cdef CUresult _cuMemsetD2D8Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4802
 *     return err
 * 
 * cdef CUresult _cuMemsetD2D16Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4802, 1, __PYX_ERR(0, 4802, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4803
 * 
 * cdef CUresult _cuMemsetD2D16Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemsetD2D16Async             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD2D16Async == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4804
 * cdef CUresult _cuMemsetD2D16Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4804, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4805
 *     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":4806
 *     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":4807
 *     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__119, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4807, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4807, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4806
 *     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":4805
 *     global __cuMemsetD2D16Async
 *     cuPythonInit()
 *     if __cuMemsetD2D16Async == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D16Async" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4808
 *         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":4809
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4803
 * 
 * cdef CUresult _cuMemsetD2D16Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4802
 *     return err
 * 
 * cdef CUresult _cuMemsetD2D16Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4811
 *     return err
 * 
 * cdef CUresult _cuMemsetD2D32Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4811, 1, __PYX_ERR(0, 4811, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4812
 * 
 * cdef CUresult _cuMemsetD2D32Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemsetD2D32Async             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemsetD2D32Async == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4813
 * cdef CUresult _cuMemsetD2D32Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4813, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4814
 *     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":4815
 *     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":4816
 *     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__120, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4816, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4816, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4815
 *     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":4814
 *     global __cuMemsetD2D32Async
 *     cuPythonInit()
 *     if __cuMemsetD2D32Async == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemsetD2D32Async" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4817
 *         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":4818
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4812
 * 
 * cdef CUresult _cuMemsetD2D32Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4811
 *     return err
 * 
 * cdef CUresult _cuMemsetD2D32Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4820
 *     return err
 * 
 * cdef CUresult _cuArrayCreate_v2(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4820, 1, __PYX_ERR(0, 4820, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4821
 * 
 * cdef CUresult _cuArrayCreate_v2(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuArrayCreate_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuArrayCreate_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4822
 * cdef CUresult _cuArrayCreate_v2(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4822, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4823
 *     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":4824
 *     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":4825
 *     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__121, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4825, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4825, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4824
 *     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":4823
 *     global __cuArrayCreate_v2
 *     cuPythonInit()
 *     if __cuArrayCreate_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArrayCreate_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4826
 *         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":4827
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4821
 * 
 * cdef CUresult _cuArrayCreate_v2(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4820
 *     return err
 * 
 * cdef CUresult _cuArrayCreate_v2(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4829
 *     return err
 * 
 * cdef CUresult _cuArrayGetDescriptor_v2(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4829, 1, __PYX_ERR(0, 4829, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4830
 * 
 * cdef CUresult _cuArrayGetDescriptor_v2(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuArrayGetDescriptor_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuArrayGetDescriptor_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4831
 * cdef CUresult _cuArrayGetDescriptor_v2(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4831, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4832
 *     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":4833
 *     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":4834
 *     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__122, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4834, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4834, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4833
 *     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":4832
 *     global __cuArrayGetDescriptor_v2
 *     cuPythonInit()
 *     if __cuArrayGetDescriptor_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetDescriptor_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4835
 *         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":4836
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4830
 * 
 * cdef CUresult _cuArrayGetDescriptor_v2(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4829
 *     return err
 * 
 * cdef CUresult _cuArrayGetDescriptor_v2(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4838
 *     return err
 * 
 * cdef CUresult _cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4838, 1, __PYX_ERR(0, 4838, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4839
 * 
 * cdef CUresult _cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuArrayGetSparseProperties             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuArrayGetSparseProperties == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4840
 * cdef CUresult _cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4840, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4841
 *     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":4842
 *     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":4843
 *     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__123, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4843, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4843, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4842
 *     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":4841
 *     global __cuArrayGetSparseProperties
 *     cuPythonInit()
 *     if __cuArrayGetSparseProperties == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetSparseProperties" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4844
 *         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":4845
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4839
 * 
 * cdef CUresult _cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4838
 *     return err
 * 
 * cdef CUresult _cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4847
 *     return err
 * 
 * cdef CUresult _cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4847, 1, __PYX_ERR(0, 4847, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4848
 * 
 * cdef CUresult _cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMipmappedArrayGetSparseProperties             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMipmappedArrayGetSparseProperties == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4849
 * cdef CUresult _cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4849, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4850
 *     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":4851
 *     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":4852
 *     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__124, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4852, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4852, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4851
 *     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":4850
 *     global __cuMipmappedArrayGetSparseProperties
 *     cuPythonInit()
 *     if __cuMipmappedArrayGetSparseProperties == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayGetSparseProperties" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4853
 *         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":4854
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4848
 * 
 * cdef CUresult _cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4847
 *     return err
 * 
 * cdef CUresult _cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4856
 *     return err
 * 
 * cdef CUresult _cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4856, 1, __PYX_ERR(0, 4856, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4857
 * 
 * cdef CUresult _cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuArrayGetMemoryRequirements             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuArrayGetMemoryRequirements == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4858
 * cdef CUresult _cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4858, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4859
 *     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":4860
 *     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":4861
 *     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__125, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4861, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4861, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4860
 *     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":4859
 *     global __cuArrayGetMemoryRequirements
 *     cuPythonInit()
 *     if __cuArrayGetMemoryRequirements == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetMemoryRequirements" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4862
 *         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":4863
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4857
 * 
 * cdef CUresult _cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4856
 *     return err
 * 
 * cdef CUresult _cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4865
 *     return err
 * 
 * cdef CUresult _cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4865, 1, __PYX_ERR(0, 4865, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4866
 * 
 * cdef CUresult _cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMipmappedArrayGetMemoryRequirements             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMipmappedArrayGetMemoryRequirements == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4867
 * cdef CUresult _cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4867, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4868
 *     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":4869
 *     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":4870
 *     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__126, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4870, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4870, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4869
 *     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":4868
 *     global __cuMipmappedArrayGetMemoryRequirements
 *     cuPythonInit()
 *     if __cuMipmappedArrayGetMemoryRequirements == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayGetMemoryRequirements" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4871
 *         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":4872
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4866
 * 
 * cdef CUresult _cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4865
 *     return err
 * 
 * cdef CUresult _cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4874
 *     return err
 * 
 * cdef CUresult _cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4874, 1, __PYX_ERR(0, 4874, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4875
 * 
 * cdef CUresult _cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuArrayGetPlane             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuArrayGetPlane == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4876
 * cdef CUresult _cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4876, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4877
 *     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":4878
 *     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":4879
 *     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__127, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4879, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4879, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4878
 *     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":4877
 *     global __cuArrayGetPlane
 *     cuPythonInit()
 *     if __cuArrayGetPlane == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArrayGetPlane" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4880
 *         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":4881
 *             raise RuntimeError('Function "cuArrayGetPlane" not found')
 *     err = (<CUresult (*)(CUarray*, CUarray, unsigned int) nogil> __cuArrayGetPlane)(pPlaneArray, hArray, planeIdx)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuArrayDestroy(CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4875
 * 
 * cdef CUresult _cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4874
 *     return err
 * 
 * cdef CUresult _cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4883
 *     return err
 * 
 * cdef CUresult _cuArrayDestroy(CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4883, 1, __PYX_ERR(0, 4883, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4884
 * 
 * cdef CUresult _cuArrayDestroy(CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuArrayDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuArrayDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4885
 * cdef CUresult _cuArrayDestroy(CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4885, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4886
 *     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":4887
 *     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":4888
 *     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__128, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4888, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4888, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4887
 *     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":4886
 *     global __cuArrayDestroy
 *     cuPythonInit()
 *     if __cuArrayDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArrayDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4889
 *         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":4890
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4884
 * 
 * cdef CUresult _cuArrayDestroy(CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4883
 *     return err
 * 
 * cdef CUresult _cuArrayDestroy(CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4892
 *     return err
 * 
 * cdef CUresult _cuArray3DCreate_v2(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4892, 1, __PYX_ERR(0, 4892, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4893
 * 
 * cdef CUresult _cuArray3DCreate_v2(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuArray3DCreate_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuArray3DCreate_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4894
 * cdef CUresult _cuArray3DCreate_v2(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4894, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4895
 *     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":4896
 *     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":4897
 *     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__129, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4897, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4897, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4896
 *     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":4895
 *     global __cuArray3DCreate_v2
 *     cuPythonInit()
 *     if __cuArray3DCreate_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArray3DCreate_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4898
 *         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":4899
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4893
 * 
 * cdef CUresult _cuArray3DCreate_v2(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4892
 *     return err
 * 
 * cdef CUresult _cuArray3DCreate_v2(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4901
 *     return err
 * 
 * cdef CUresult _cuArray3DGetDescriptor_v2(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4901, 1, __PYX_ERR(0, 4901, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4902
 * 
 * cdef CUresult _cuArray3DGetDescriptor_v2(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuArray3DGetDescriptor_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuArray3DGetDescriptor_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4903
 * cdef CUresult _cuArray3DGetDescriptor_v2(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4903, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4904
 *     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":4905
 *     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":4906
 *     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__130, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4906, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4906, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4905
 *     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":4904
 *     global __cuArray3DGetDescriptor_v2
 *     cuPythonInit()
 *     if __cuArray3DGetDescriptor_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuArray3DGetDescriptor_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4907
 *         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":4908
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4902
 * 
 * cdef CUresult _cuArray3DGetDescriptor_v2(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4901
 *     return err
 * 
 * cdef CUresult _cuArray3DGetDescriptor_v2(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4910
 *     return err
 * 
 * cdef CUresult _cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4910, 1, __PYX_ERR(0, 4910, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4911
 * 
 * cdef CUresult _cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMipmappedArrayCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMipmappedArrayCreate == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4912
 * cdef CUresult _cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4912, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4913
 *     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":4914
 *     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":4915
 *     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__131, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4915, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4915, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4914
 *     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":4913
 *     global __cuMipmappedArrayCreate
 *     cuPythonInit()
 *     if __cuMipmappedArrayCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4916
 *         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":4917
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4911
 * 
 * cdef CUresult _cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4910
 *     return err
 * 
 * cdef CUresult _cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4919
 *     return err
 * 
 * cdef CUresult _cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4919, 1, __PYX_ERR(0, 4919, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4920
 * 
 * cdef CUresult _cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMipmappedArrayGetLevel             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMipmappedArrayGetLevel == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4921
 * cdef CUresult _cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4921, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4922
 *     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":4923
 *     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":4924
 *     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__132, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4924, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4924, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4923
 *     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":4922
 *     global __cuMipmappedArrayGetLevel
 *     cuPythonInit()
 *     if __cuMipmappedArrayGetLevel == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayGetLevel" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4925
 *         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":4926
 *             raise RuntimeError('Function "cuMipmappedArrayGetLevel" not found')
 *     err = (<CUresult (*)(CUarray*, CUmipmappedArray, unsigned int) nogil> __cuMipmappedArrayGetLevel)(pLevelArray, hMipmappedArray, level)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4920
 * 
 * cdef CUresult _cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4919
 *     return err
 * 
 * cdef CUresult _cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4928
 *     return err
 * 
 * cdef CUresult _cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4928, 1, __PYX_ERR(0, 4928, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4929
 * 
 * cdef CUresult _cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMipmappedArrayDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMipmappedArrayDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4930
 * cdef CUresult _cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4930, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4931
 *     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":4932
 *     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":4933
 *     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__133, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4933, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4933, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4932
 *     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":4931
 *     global __cuMipmappedArrayDestroy
 *     cuPythonInit()
 *     if __cuMipmappedArrayDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4934
 *         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":4935
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4929
 * 
 * cdef CUresult _cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4928
 *     return err
 * 
 * cdef CUresult _cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4937
 *     return err
 * 
 * cdef CUresult _cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4937, 1, __PYX_ERR(0, 4937, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4938
 * 
 * cdef CUresult _cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemGetHandleForAddressRange             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemGetHandleForAddressRange == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4939
 * cdef CUresult _cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4939, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4940
 *     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":4941
 *     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":4942
 *     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__134, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4942, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4942, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4941
 *     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":4940
 *     global __cuMemGetHandleForAddressRange
 *     cuPythonInit()
 *     if __cuMemGetHandleForAddressRange == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetHandleForAddressRange" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4943
 *         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":4944
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4938
 * 
 * cdef CUresult _cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4937
 *     return err
 * 
 * cdef CUresult _cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4946
 *     return err
 * 
 * cdef CUresult _cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4946, 1, __PYX_ERR(0, 4946, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4947
 * 
 * cdef CUresult _cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemAddressReserve             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemAddressReserve == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4948
 * cdef CUresult _cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4948, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4949
 *     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":4950
 *     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":4951
 *     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__135, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4951, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4951, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4950
 *     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":4949
 *     global __cuMemAddressReserve
 *     cuPythonInit()
 *     if __cuMemAddressReserve == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAddressReserve" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4952
 *         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":4953
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4947
 * 
 * cdef CUresult _cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4946
 *     return err
 * 
 * cdef CUresult _cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4955
 *     return err
 * 
 * cdef CUresult _cuMemAddressFree(CUdeviceptr ptr, size_t size) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4955, 1, __PYX_ERR(0, 4955, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4956
 * 
 * cdef CUresult _cuMemAddressFree(CUdeviceptr ptr, size_t size) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemAddressFree             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemAddressFree == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4957
 * cdef CUresult _cuMemAddressFree(CUdeviceptr ptr, size_t size) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4957, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4958
 *     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":4959
 *     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":4960
 *     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__136, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4960, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4960, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4959
 *     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":4958
 *     global __cuMemAddressFree
 *     cuPythonInit()
 *     if __cuMemAddressFree == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAddressFree" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4961
 *         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":4962
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4956
 * 
 * cdef CUresult _cuMemAddressFree(CUdeviceptr ptr, size_t size) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4955
 *     return err
 * 
 * cdef CUresult _cuMemAddressFree(CUdeviceptr ptr, size_t size) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4964
 *     return err
 * 
 * cdef CUresult _cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4964, 1, __PYX_ERR(0, 4964, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4965
 * 
 * cdef CUresult _cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemCreate == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4966
 * cdef CUresult _cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4966, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4967
 *     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":4968
 *     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":4969
 *     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__137, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4969, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4969, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4968
 *     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":4967
 *     global __cuMemCreate
 *     cuPythonInit()
 *     if __cuMemCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4970
 *         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":4971
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4965
 * 
 * cdef CUresult _cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4964
 *     return err
 * 
 * cdef CUresult _cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4973
 *     return err
 * 
 * cdef CUresult _cuMemRelease(CUmemGenericAllocationHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4973, 1, __PYX_ERR(0, 4973, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4974
 * 
 * cdef CUresult _cuMemRelease(CUmemGenericAllocationHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemRelease             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemRelease == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4975
 * cdef CUresult _cuMemRelease(CUmemGenericAllocationHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4975, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4976
 *     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":4977
 *     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":4978
 *     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__138, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4978, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4978, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4977
 *     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":4976
 *     global __cuMemRelease
 *     cuPythonInit()
 *     if __cuMemRelease == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemRelease" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4979
 *         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":4980
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4974
 * 
 * cdef CUresult _cuMemRelease(CUmemGenericAllocationHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4973
 *     return err
 * 
 * cdef CUresult _cuMemRelease(CUmemGenericAllocationHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4982
 *     return err
 * 
 * cdef CUresult _cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4982, 1, __PYX_ERR(0, 4982, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4983
 * 
 * cdef CUresult _cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemMap             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemMap == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4984
 * cdef CUresult _cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4984, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4985
 *     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":4986
 *     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":4987
 *     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__139, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4987, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4987, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4986
 *     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":4985
 *     global __cuMemMap
 *     cuPythonInit()
 *     if __cuMemMap == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemMap" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4988
 *         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":4989
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4983
 * 
 * cdef CUresult _cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4982
 *     return err
 * 
 * cdef CUresult _cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":4991
 *     return err
 * 
 * cdef CUresult _cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 4991, 1, __PYX_ERR(0, 4991, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":4992
 * 
 * cdef CUresult _cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemMapArrayAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemMapArrayAsync == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":4993
 * cdef CUresult _cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 4993, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":4994
 *     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":4995
 *     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":4996
 *     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__140, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4996, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 4996, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":4995
 *     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":4994
 *     global __cuMemMapArrayAsync
 *     cuPythonInit()
 *     if __cuMemMapArrayAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemMapArrayAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":4997
 *         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":4998
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":4992
 * 
 * cdef CUresult _cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":4991
 *     return err
 * 
 * cdef CUresult _cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5000
 *     return err
 * 
 * cdef CUresult _cuMemUnmap(CUdeviceptr ptr, size_t size) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5000, 1, __PYX_ERR(0, 5000, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5001
 * 
 * cdef CUresult _cuMemUnmap(CUdeviceptr ptr, size_t size) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemUnmap             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemUnmap == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5002
 * cdef CUresult _cuMemUnmap(CUdeviceptr ptr, size_t size) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5002, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5003
 *     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":5004
 *     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":5005
 *     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__141, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5005, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5005, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5004
 *     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":5003
 *     global __cuMemUnmap
 *     cuPythonInit()
 *     if __cuMemUnmap == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemUnmap" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5006
 *         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":5007
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5001
 * 
 * cdef CUresult _cuMemUnmap(CUdeviceptr ptr, size_t size) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5000
 *     return err
 * 
 * cdef CUresult _cuMemUnmap(CUdeviceptr ptr, size_t size) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5009
 *     return err
 * 
 * cdef CUresult _cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5009, 1, __PYX_ERR(0, 5009, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5010
 * 
 * cdef CUresult _cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemSetAccess             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemSetAccess == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5011
 * cdef CUresult _cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5011, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5012
 *     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":5013
 *     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":5014
 *     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__142, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5014, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5014, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5013
 *     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":5012
 *     global __cuMemSetAccess
 *     cuPythonInit()
 *     if __cuMemSetAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemSetAccess" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5015
 *         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":5016
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5010
 * 
 * cdef CUresult _cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5009
 *     return err
 * 
 * cdef CUresult _cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5018
 *     return err
 * 
 * cdef CUresult _cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5018, 1, __PYX_ERR(0, 5018, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5019
 * 
 * cdef CUresult _cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemGetAccess             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemGetAccess == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5020
 * cdef CUresult _cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5020, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5021
 *     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":5022
 *     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":5023
 *     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__143, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5023, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5023, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5022
 *     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":5021
 *     global __cuMemGetAccess
 *     cuPythonInit()
 *     if __cuMemGetAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAccess" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5024
 *         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":5025
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5019
 * 
 * cdef CUresult _cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5018
 *     return err
 * 
 * cdef CUresult _cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5027
 *     return err
 * 
 * cdef CUresult _cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5027, 1, __PYX_ERR(0, 5027, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5028
 * 
 * cdef CUresult _cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemExportToShareableHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemExportToShareableHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5029
 * cdef CUresult _cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5029, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5030
 *     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":5031
 *     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":5032
 *     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__144, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5032, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5032, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5031
 *     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":5030
 *     global __cuMemExportToShareableHandle
 *     cuPythonInit()
 *     if __cuMemExportToShareableHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemExportToShareableHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5033
 *         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":5034
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5028
 * 
 * cdef CUresult _cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5027
 *     return err
 * 
 * cdef CUresult _cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5036
 *     return err
 * 
 * cdef CUresult _cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5036, 1, __PYX_ERR(0, 5036, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5037
 * 
 * cdef CUresult _cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemImportFromShareableHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemImportFromShareableHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5038
 * cdef CUresult _cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5038, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5039
 *     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":5040
 *     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":5041
 *     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__145, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5041, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5041, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5040
 *     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":5039
 *     global __cuMemImportFromShareableHandle
 *     cuPythonInit()
 *     if __cuMemImportFromShareableHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemImportFromShareableHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5042
 *         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":5043
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5037
 * 
 * cdef CUresult _cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5036
 *     return err
 * 
 * cdef CUresult _cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5045
 *     return err
 * 
 * cdef CUresult _cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5045, 1, __PYX_ERR(0, 5045, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5046
 * 
 * cdef CUresult _cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemGetAllocationGranularity             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemGetAllocationGranularity == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5047
 * cdef CUresult _cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5047, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5048
 *     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":5049
 *     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":5050
 *     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__146, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5050, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5050, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5049
 *     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":5048
 *     global __cuMemGetAllocationGranularity
 *     cuPythonInit()
 *     if __cuMemGetAllocationGranularity == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAllocationGranularity" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5051
 *         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":5052
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5046
 * 
 * cdef CUresult _cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5045
 *     return err
 * 
 * cdef CUresult _cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5054
 *     return err
 * 
 * cdef CUresult _cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5054, 1, __PYX_ERR(0, 5054, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5055
 * 
 * cdef CUresult _cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemGetAllocationPropertiesFromHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemGetAllocationPropertiesFromHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5056
 * cdef CUresult _cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5056, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5057
 *     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":5058
 *     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":5059
 *     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__147, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5059, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5059, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5058
 *     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":5057
 *     global __cuMemGetAllocationPropertiesFromHandle
 *     cuPythonInit()
 *     if __cuMemGetAllocationPropertiesFromHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAllocationPropertiesFromHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5060
 *         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":5061
 *             raise RuntimeError('Function "cuMemGetAllocationPropertiesFromHandle" not found')
 *     err = (<CUresult (*)(CUmemAllocationProp*, CUmemGenericAllocationHandle) nogil> __cuMemGetAllocationPropertiesFromHandle)(prop, handle)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5055
 * 
 * cdef CUresult _cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5054
 *     return err
 * 
 * cdef CUresult _cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5063
 *     return err
 * 
 * cdef CUresult _cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5063, 1, __PYX_ERR(0, 5063, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5064
 * 
 * cdef CUresult _cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemRetainAllocationHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemRetainAllocationHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5065
 * cdef CUresult _cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5065, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5066
 *     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":5067
 *     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":5068
 *     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__148, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5068, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5068, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5067
 *     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":5066
 *     global __cuMemRetainAllocationHandle
 *     cuPythonInit()
 *     if __cuMemRetainAllocationHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemRetainAllocationHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5069
 *         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":5070
 *             raise RuntimeError('Function "cuMemRetainAllocationHandle" not found')
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, void*) nogil> __cuMemRetainAllocationHandle)(handle, addr)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5064
 * 
 * cdef CUresult _cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5063
 *     return err
 * 
 * cdef CUresult _cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5072
 *     return err
 * 
 * cdef CUresult _cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5072, 1, __PYX_ERR(0, 5072, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5073
 * 
 * cdef CUresult _cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemFreeAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemFreeAsync == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5074
 * cdef CUresult _cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5074, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5075
 *     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":5076
 *     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":5077
 *     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__149, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5077, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5077, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5076
 *     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":5075
 *     global __cuMemFreeAsync
 *     cuPythonInit()
 *     if __cuMemFreeAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemFreeAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5078
 *         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":5079
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5073
 * 
 * cdef CUresult _cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5072
 *     return err
 * 
 * cdef CUresult _cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5081
 *     return err
 * 
 * cdef CUresult _cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5081, 1, __PYX_ERR(0, 5081, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5082
 * 
 * cdef CUresult _cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemAllocAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemAllocAsync == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5083
 * cdef CUresult _cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5083, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5084
 *     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":5085
 *     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":5086
 *     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__150, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5086, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5086, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5085
 *     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":5084
 *     global __cuMemAllocAsync
 *     cuPythonInit()
 *     if __cuMemAllocAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5087
 *         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":5088
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5082
 * 
 * cdef CUresult _cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5081
 *     return err
 * 
 * cdef CUresult _cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5090
 *     return err
 * 
 * cdef CUresult _cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5090, 1, __PYX_ERR(0, 5090, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5091
 * 
 * cdef CUresult _cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemPoolTrimTo             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolTrimTo == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5092
 * cdef CUresult _cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5092, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5093
 *     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":5094
 *     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":5095
 *     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__151, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5095, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5095, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5094
 *     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":5093
 *     global __cuMemPoolTrimTo
 *     cuPythonInit()
 *     if __cuMemPoolTrimTo == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolTrimTo" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5096
 *         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":5097
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5091
 * 
 * cdef CUresult _cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5090
 *     return err
 * 
 * cdef CUresult _cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5099
 *     return err
 * 
 * cdef CUresult _cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5099, 1, __PYX_ERR(0, 5099, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5100
 * 
 * cdef CUresult _cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemPoolSetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolSetAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5101
 * cdef CUresult _cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5101, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5102
 *     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":5103
 *     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":5104
 *     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__152, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5104, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5104, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5103
 *     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":5102
 *     global __cuMemPoolSetAttribute
 *     cuPythonInit()
 *     if __cuMemPoolSetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolSetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5105
 *         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":5106
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5100
 * 
 * cdef CUresult _cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5099
 *     return err
 * 
 * cdef CUresult _cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5108
 *     return err
 * 
 * cdef CUresult _cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5108, 1, __PYX_ERR(0, 5108, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5109
 * 
 * cdef CUresult _cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemPoolGetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolGetAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5110
 * cdef CUresult _cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5110, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5111
 *     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":5112
 *     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":5113
 *     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__153, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5113, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5113, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5112
 *     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":5111
 *     global __cuMemPoolGetAttribute
 *     cuPythonInit()
 *     if __cuMemPoolGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolGetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5114
 *         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":5115
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5109
 * 
 * cdef CUresult _cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5108
 *     return err
 * 
 * cdef CUresult _cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5117
 *     return err
 * 
 * cdef CUresult _cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5117, 1, __PYX_ERR(0, 5117, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5118
 * 
 * cdef CUresult _cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemPoolSetAccess             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolSetAccess == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5119
 * cdef CUresult _cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5119, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5120
 *     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":5121
 *     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":5122
 *     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__154, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5122, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5122, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5121
 *     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":5120
 *     global __cuMemPoolSetAccess
 *     cuPythonInit()
 *     if __cuMemPoolSetAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolSetAccess" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5123
 *         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":5124
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5118
 * 
 * cdef CUresult _cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5117
 *     return err
 * 
 * cdef CUresult _cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5126
 *     return err
 * 
 * cdef CUresult _cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5126, 1, __PYX_ERR(0, 5126, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5127
 * 
 * cdef CUresult _cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemPoolGetAccess             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolGetAccess == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5128
 * cdef CUresult _cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5128, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5129
 *     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":5130
 *     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":5131
 *     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__155, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5131, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5131, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5130
 *     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":5129
 *     global __cuMemPoolGetAccess
 *     cuPythonInit()
 *     if __cuMemPoolGetAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolGetAccess" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5132
 *         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":5133
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5127
 * 
 * cdef CUresult _cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5126
 *     return err
 * 
 * cdef CUresult _cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5135
 *     return err
 * 
 * cdef CUresult _cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5135, 1, __PYX_ERR(0, 5135, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5136
 * 
 * cdef CUresult _cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemPoolCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolCreate == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5137
 * cdef CUresult _cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5137, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5138
 *     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":5139
 *     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":5140
 *     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__156, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5140, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5140, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5139
 *     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":5138
 *     global __cuMemPoolCreate
 *     cuPythonInit()
 *     if __cuMemPoolCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5141
 *         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":5142
 *             raise RuntimeError('Function "cuMemPoolCreate" not found')
 *     err = (<CUresult (*)(CUmemoryPool*, const CUmemPoolProps*) nogil> __cuMemPoolCreate)(pool, poolProps)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemPoolDestroy(CUmemoryPool pool) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5136
 * 
 * cdef CUresult _cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5135
 *     return err
 * 
 * cdef CUresult _cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5144
 *     return err
 * 
 * cdef CUresult _cuMemPoolDestroy(CUmemoryPool pool) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5144, 1, __PYX_ERR(0, 5144, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5145
 * 
 * cdef CUresult _cuMemPoolDestroy(CUmemoryPool pool) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemPoolDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5146
 * cdef CUresult _cuMemPoolDestroy(CUmemoryPool pool) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5146, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5147
 *     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":5148
 *     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":5149
 *     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__157, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5149, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5149, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5148
 *     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":5147
 *     global __cuMemPoolDestroy
 *     cuPythonInit()
 *     if __cuMemPoolDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5150
 *         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":5151
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5145
 * 
 * cdef CUresult _cuMemPoolDestroy(CUmemoryPool pool) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5144
 *     return err
 * 
 * cdef CUresult _cuMemPoolDestroy(CUmemoryPool pool) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5153
 *     return err
 * 
 * cdef CUresult _cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5153, 1, __PYX_ERR(0, 5153, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5154
 * 
 * cdef CUresult _cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemAllocFromPoolAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemAllocFromPoolAsync == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5155
 * cdef CUresult _cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5155, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5156
 *     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":5157
 *     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":5158
 *     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__158, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5158, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5158, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5157
 *     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":5156
 *     global __cuMemAllocFromPoolAsync
 *     cuPythonInit()
 *     if __cuMemAllocFromPoolAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAllocFromPoolAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5159
 *         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":5160
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5154
 * 
 * cdef CUresult _cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5153
 *     return err
 * 
 * cdef CUresult _cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5162
 *     return err
 * 
 * cdef CUresult _cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5162, 1, __PYX_ERR(0, 5162, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5163
 * 
 * cdef CUresult _cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemPoolExportToShareableHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolExportToShareableHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5164
 * cdef CUresult _cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5164, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5165
 *     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":5166
 *     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":5167
 *     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__159, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5167, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5167, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5166
 *     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":5165
 *     global __cuMemPoolExportToShareableHandle
 *     cuPythonInit()
 *     if __cuMemPoolExportToShareableHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolExportToShareableHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5168
 *         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":5169
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5163
 * 
 * cdef CUresult _cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5162
 *     return err
 * 
 * cdef CUresult _cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5171
 *     return err
 * 
 * cdef CUresult _cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5171, 1, __PYX_ERR(0, 5171, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5172
 * 
 * cdef CUresult _cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemPoolImportFromShareableHandle             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolImportFromShareableHandle == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5173
 * cdef CUresult _cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5173, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5174
 *     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":5175
 *     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":5176
 *     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__160, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5176, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5176, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5175
 *     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":5174
 *     global __cuMemPoolImportFromShareableHandle
 *     cuPythonInit()
 *     if __cuMemPoolImportFromShareableHandle == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolImportFromShareableHandle" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5177
 *         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":5178
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5172
 * 
 * cdef CUresult _cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5171
 *     return err
 * 
 * cdef CUresult _cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5180
 *     return err
 * 
 * cdef CUresult _cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5180, 1, __PYX_ERR(0, 5180, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5181
 * 
 * cdef CUresult _cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemPoolExportPointer             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolExportPointer == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5182
 * cdef CUresult _cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5182, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5183
 *     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":5184
 *     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":5185
 *     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__161, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5185, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5185, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5184
 *     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":5183
 *     global __cuMemPoolExportPointer
 *     cuPythonInit()
 *     if __cuMemPoolExportPointer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolExportPointer" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5186
 *         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":5187
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5181
 * 
 * cdef CUresult _cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5180
 *     return err
 * 
 * cdef CUresult _cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5189
 *     return err
 * 
 * cdef CUresult _cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5189, 1, __PYX_ERR(0, 5189, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5190
 * 
 * cdef CUresult _cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemPoolImportPointer             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPoolImportPointer == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5191
 * cdef CUresult _cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5191, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5192
 *     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":5193
 *     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":5194
 *     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__162, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5194, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5194, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5193
 *     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":5192
 *     global __cuMemPoolImportPointer
 *     cuPythonInit()
 *     if __cuMemPoolImportPointer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolImportPointer" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5195
 *         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":5196
 *             raise RuntimeError('Function "cuMemPoolImportPointer" not found')
 *     err = (<CUresult (*)(CUdeviceptr*, CUmemoryPool, CUmemPoolPtrExportData*) nogil> __cuMemPoolImportPointer)(ptr_out, pool, shareData)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5190
 * 
 * cdef CUresult _cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5189
 *     return err
 * 
 * cdef CUresult _cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5198
 *     return err
 * 
 * cdef CUresult _cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5198, 1, __PYX_ERR(0, 5198, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5199
 * 
 * cdef CUresult _cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuPointerGetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuPointerGetAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5200
 * cdef CUresult _cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5200, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5201
 *     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":5202
 *     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":5203
 *     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__163, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5203, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5203, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5202
 *     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":5201
 *     global __cuPointerGetAttribute
 *     cuPythonInit()
 *     if __cuPointerGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuPointerGetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5204
 *         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":5205
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5199
 * 
 * cdef CUresult _cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5198
 *     return err
 * 
 * cdef CUresult _cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5207
 *     return err
 * 
 * cdef CUresult _cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5207, 1, __PYX_ERR(0, 5207, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5208
 * 
 * cdef CUresult _cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemPrefetchAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemPrefetchAsync == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5209
 * cdef CUresult _cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5209, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5210
 *     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":5211
 *     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":5212
 *     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__164, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5212, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5212, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5211
 *     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":5210
 *     global __cuMemPrefetchAsync
 *     cuPythonInit()
 *     if __cuMemPrefetchAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemPrefetchAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5213
 *         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":5214
 *             raise RuntimeError('Function "cuMemPrefetchAsync" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, CUdevice, CUstream) nogil> __cuMemPrefetchAsync)(devPtr, count, dstDevice, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5208
 * 
 * cdef CUresult _cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5207
 *     return err
 * 
 * cdef CUresult _cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5216
 *     return err
 * 
 * cdef CUresult _cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5216, 1, __PYX_ERR(0, 5216, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5217
 * 
 * cdef CUresult _cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemAdvise             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemAdvise == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5218
 * cdef CUresult _cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5218, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5219
 *     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":5220
 *     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":5221
 *     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__165, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5221, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5221, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5220
 *     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":5219
 *     global __cuMemAdvise
 *     cuPythonInit()
 *     if __cuMemAdvise == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemAdvise" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5222
 *         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":5223
 *             raise RuntimeError('Function "cuMemAdvise" not found')
 *     err = (<CUresult (*)(CUdeviceptr, size_t, CUmem_advise, CUdevice) nogil> __cuMemAdvise)(devPtr, count, advice, device)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5217
 * 
 * cdef CUresult _cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5216
 *     return err
 * 
 * cdef CUresult _cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5225
 *     return err
 * 
 * cdef CUresult _cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5225, 1, __PYX_ERR(0, 5225, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5226
 * 
 * cdef CUresult _cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemRangeGetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemRangeGetAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5227
 * cdef CUresult _cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5227, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5228
 *     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":5229
 *     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":5230
 *     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__166, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5230, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5230, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5229
 *     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":5228
 *     global __cuMemRangeGetAttribute
 *     cuPythonInit()
 *     if __cuMemRangeGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemRangeGetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5231
 *         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":5232
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5226
 * 
 * cdef CUresult _cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5225
 *     return err
 * 
 * cdef CUresult _cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5234
 *     return err
 * 
 * cdef CUresult _cuMemRangeGetAttributes(void** data, size_t* dataSizes, CUmem_range_attribute* attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5234, 1, __PYX_ERR(0, 5234, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5235
 * 
 * cdef CUresult _cuMemRangeGetAttributes(void** data, size_t* dataSizes, CUmem_range_attribute* attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuMemRangeGetAttributes             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuMemRangeGetAttributes == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5236
 * cdef CUresult _cuMemRangeGetAttributes(void** data, size_t* dataSizes, CUmem_range_attribute* attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5236, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5237
 *     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":5238
 *     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":5239
 *     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__167, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5239, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5239, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5238
 *     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":5237
 *     global __cuMemRangeGetAttributes
 *     cuPythonInit()
 *     if __cuMemRangeGetAttributes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuMemRangeGetAttributes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5240
 *         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":5241
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5235
 * 
 * cdef CUresult _cuMemRangeGetAttributes(void** data, size_t* dataSizes, CUmem_range_attribute* attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5234
 *     return err
 * 
 * cdef CUresult _cuMemRangeGetAttributes(void** data, size_t* dataSizes, CUmem_range_attribute* attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5243
 *     return err
 * 
 * cdef CUresult _cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5243, 1, __PYX_ERR(0, 5243, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5244
 * 
 * cdef CUresult _cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuPointerSetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuPointerSetAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5245
 * cdef CUresult _cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5245, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5246
 *     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":5247
 *     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":5248
 *     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__168, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5248, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5248, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5247
 *     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":5246
 *     global __cuPointerSetAttribute
 *     cuPythonInit()
 *     if __cuPointerSetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuPointerSetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5249
 *         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":5250
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5244
 * 
 * cdef CUresult _cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5243
 *     return err
 * 
 * cdef CUresult _cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5252
 *     return err
 * 
 * cdef CUresult _cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5252, 1, __PYX_ERR(0, 5252, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5253
 * 
 * cdef CUresult _cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuPointerGetAttributes             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuPointerGetAttributes == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5254
 * cdef CUresult _cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5254, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5255
 *     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":5256
 *     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":5257
 *     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__169, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5257, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5257, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5256
 *     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":5255
 *     global __cuPointerGetAttributes
 *     cuPythonInit()
 *     if __cuPointerGetAttributes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuPointerGetAttributes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5258
 *         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":5259
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5253
 * 
 * cdef CUresult _cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5252
 *     return err
 * 
 * cdef CUresult _cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5261
 *     return err
 * 
 * cdef CUresult _cuStreamCreate(CUstream* phStream, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5261, 1, __PYX_ERR(0, 5261, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5262
 * 
 * cdef CUresult _cuStreamCreate(CUstream* phStream, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamCreate == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5263
 * cdef CUresult _cuStreamCreate(CUstream* phStream, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5263, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5264
 *     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":5265
 *     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":5266
 *     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__170, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5266, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5266, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5265
 *     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":5264
 *     global __cuStreamCreate
 *     cuPythonInit()
 *     if __cuStreamCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5267
 *         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":5268
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5262
 * 
 * cdef CUresult _cuStreamCreate(CUstream* phStream, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5261
 *     return err
 * 
 * cdef CUresult _cuStreamCreate(CUstream* phStream, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5270
 *     return err
 * 
 * cdef CUresult _cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5270, 1, __PYX_ERR(0, 5270, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5271
 * 
 * cdef CUresult _cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamCreateWithPriority             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamCreateWithPriority == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5272
 * cdef CUresult _cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5272, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5273
 *     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":5274
 *     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":5275
 *     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__171, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5275, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5275, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5274
 *     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":5273
 *     global __cuStreamCreateWithPriority
 *     cuPythonInit()
 *     if __cuStreamCreateWithPriority == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCreateWithPriority" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5276
 *         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":5277
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5271
 * 
 * cdef CUresult _cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5270
 *     return err
 * 
 * cdef CUresult _cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5279
 *     return err
 * 
 * cdef CUresult _cuStreamGetPriority(CUstream hStream, int* priority) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5279, 1, __PYX_ERR(0, 5279, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5280
 * 
 * cdef CUresult _cuStreamGetPriority(CUstream hStream, int* priority) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamGetPriority             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamGetPriority == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5281
 * cdef CUresult _cuStreamGetPriority(CUstream hStream, int* priority) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5281, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5282
 *     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":5283
 *     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":5284
 *     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__172, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5284, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5284, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5283
 *     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":5282
 *     global __cuStreamGetPriority
 *     cuPythonInit()
 *     if __cuStreamGetPriority == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetPriority" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5285
 *         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":5286
 *             raise RuntimeError('Function "cuStreamGetPriority" not found')
 *     err = (<CUresult (*)(CUstream, int*) nogil> __cuStreamGetPriority)(hStream, priority)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamGetFlags(CUstream hStream, unsigned int* flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5280
 * 
 * cdef CUresult _cuStreamGetPriority(CUstream hStream, int* priority) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5279
 *     return err
 * 
 * cdef CUresult _cuStreamGetPriority(CUstream hStream, int* priority) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5288
 *     return err
 * 
 * cdef CUresult _cuStreamGetFlags(CUstream hStream, unsigned int* flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5288, 1, __PYX_ERR(0, 5288, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5289
 * 
 * cdef CUresult _cuStreamGetFlags(CUstream hStream, unsigned int* flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamGetFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamGetFlags == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5290
 * cdef CUresult _cuStreamGetFlags(CUstream hStream, unsigned int* flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5290, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5291
 *     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":5292
 *     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":5293
 *     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__173, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5293, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5293, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5292
 *     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":5291
 *     global __cuStreamGetFlags
 *     cuPythonInit()
 *     if __cuStreamGetFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5294
 *         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":5295
 *             raise RuntimeError('Function "cuStreamGetFlags" not found')
 *     err = (<CUresult (*)(CUstream, unsigned int*) nogil> __cuStreamGetFlags)(hStream, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamGetCtx(CUstream hStream, CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5289
 * 
 * cdef CUresult _cuStreamGetFlags(CUstream hStream, unsigned int* flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5288
 *     return err
 * 
 * cdef CUresult _cuStreamGetFlags(CUstream hStream, unsigned int* flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5297
 *     return err
 * 
 * cdef CUresult _cuStreamGetCtx(CUstream hStream, CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5297, 1, __PYX_ERR(0, 5297, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5298
 * 
 * cdef CUresult _cuStreamGetCtx(CUstream hStream, CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamGetCtx             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamGetCtx == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5299
 * cdef CUresult _cuStreamGetCtx(CUstream hStream, CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5299, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5300
 *     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":5301
 *     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":5302
 *     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__174, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5302, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5302, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5301
 *     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":5300
 *     global __cuStreamGetCtx
 *     cuPythonInit()
 *     if __cuStreamGetCtx == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetCtx" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5303
 *         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":5304
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5298
 * 
 * cdef CUresult _cuStreamGetCtx(CUstream hStream, CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5297
 *     return err
 * 
 * cdef CUresult _cuStreamGetCtx(CUstream hStream, CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5306
 *     return err
 * 
 * cdef CUresult _cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5306, 1, __PYX_ERR(0, 5306, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5307
 * 
 * cdef CUresult _cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamWaitEvent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamWaitEvent == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5308
 * cdef CUresult _cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5308, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5309
 *     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":5310
 *     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":5311
 *     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__175, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5311, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5311, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5310
 *     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":5309
 *     global __cuStreamWaitEvent
 *     cuPythonInit()
 *     if __cuStreamWaitEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitEvent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5312
 *         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":5313
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5307
 * 
 * cdef CUresult _cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5306
 *     return err
 * 
 * cdef CUresult _cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5315
 *     return err
 * 
 * cdef CUresult _cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5315, 1, __PYX_ERR(0, 5315, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5316
 * 
 * cdef CUresult _cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamAddCallback             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamAddCallback == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5317
 * cdef CUresult _cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5317, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5318
 *     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":5319
 *     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":5320
 *     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__176, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5320, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5320, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5319
 *     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":5318
 *     global __cuStreamAddCallback
 *     cuPythonInit()
 *     if __cuStreamAddCallback == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamAddCallback" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5321
 *         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":5322
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5316
 * 
 * cdef CUresult _cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5315
 *     return err
 * 
 * cdef CUresult _cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5324
 *     return err
 * 
 * cdef CUresult _cuStreamBeginCapture_v2(CUstream hStream, CUstreamCaptureMode mode) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5324, 1, __PYX_ERR(0, 5324, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5325
 * 
 * cdef CUresult _cuStreamBeginCapture_v2(CUstream hStream, CUstreamCaptureMode mode) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamBeginCapture_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamBeginCapture_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5326
 * cdef CUresult _cuStreamBeginCapture_v2(CUstream hStream, CUstreamCaptureMode mode) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5326, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5327
 *     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":5328
 *     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":5329
 *     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__177, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5329, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5329, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5328
 *     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":5327
 *     global __cuStreamBeginCapture_v2
 *     cuPythonInit()
 *     if __cuStreamBeginCapture_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamBeginCapture_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5330
 *         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":5331
 *             raise RuntimeError('Function "cuStreamBeginCapture_v2" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureMode) nogil> __cuStreamBeginCapture_v2)(hStream, mode)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5325
 * 
 * cdef CUresult _cuStreamBeginCapture_v2(CUstream hStream, CUstreamCaptureMode mode) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5324
 *     return err
 * 
 * cdef CUresult _cuStreamBeginCapture_v2(CUstream hStream, CUstreamCaptureMode mode) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5333
 *     return err
 * 
 * cdef CUresult _cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5333, 1, __PYX_ERR(0, 5333, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5334
 * 
 * cdef CUresult _cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuThreadExchangeStreamCaptureMode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuThreadExchangeStreamCaptureMode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5335
 * cdef CUresult _cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5335, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5336
 *     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":5337
 *     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":5338
 *     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__178, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5338, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5338, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5337
 *     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":5336
 *     global __cuThreadExchangeStreamCaptureMode
 *     cuPythonInit()
 *     if __cuThreadExchangeStreamCaptureMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuThreadExchangeStreamCaptureMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5339
 *         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":5340
 *             raise RuntimeError('Function "cuThreadExchangeStreamCaptureMode" not found')
 *     err = (<CUresult (*)(CUstreamCaptureMode*) nogil> __cuThreadExchangeStreamCaptureMode)(mode)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5334
 * 
 * cdef CUresult _cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5333
 *     return err
 * 
 * cdef CUresult _cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5342
 *     return err
 * 
 * cdef CUresult _cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5342, 1, __PYX_ERR(0, 5342, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5343
 * 
 * cdef CUresult _cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamEndCapture             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamEndCapture == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5344
 * cdef CUresult _cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5344, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5345
 *     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":5346
 *     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":5347
 *     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__179, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5347, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5347, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5346
 *     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":5345
 *     global __cuStreamEndCapture
 *     cuPythonInit()
 *     if __cuStreamEndCapture == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamEndCapture" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5348
 *         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":5349
 *             raise RuntimeError('Function "cuStreamEndCapture" not found')
 *     err = (<CUresult (*)(CUstream, CUgraph*) nogil> __cuStreamEndCapture)(hStream, phGraph)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5343
 * 
 * cdef CUresult _cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5342
 *     return err
 * 
 * cdef CUresult _cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5351
 *     return err
 * 
 * cdef CUresult _cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5351, 1, __PYX_ERR(0, 5351, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5352
 * 
 * cdef CUresult _cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamIsCapturing             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamIsCapturing == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5353
 * cdef CUresult _cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5353, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5354
 *     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":5355
 *     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":5356
 *     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__180, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5356, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5356, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5355
 *     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":5354
 *     global __cuStreamIsCapturing
 *     cuPythonInit()
 *     if __cuStreamIsCapturing == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamIsCapturing" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5357
 *         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":5358
 *             raise RuntimeError('Function "cuStreamIsCapturing" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureStatus*) nogil> __cuStreamIsCapturing)(hStream, captureStatus)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamGetCaptureInfo(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5352
 * 
 * cdef CUresult _cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5351
 *     return err
 * 
 * cdef CUresult _cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5360
 *     return err
 * 
 * cdef CUresult _cuStreamGetCaptureInfo(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamGetCaptureInfo
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCaptureInfo(CUstream __pyx_v_hStream, CUstreamCaptureStatus *__pyx_v_captureStatus_out, cuuint64_t *__pyx_v_id_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", 1);
  __Pyx_TraceCall("_cuStreamGetCaptureInfo", __pyx_f[0], 5360, 1, __PYX_ERR(0, 5360, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5361
 * 
 * cdef CUresult _cuStreamGetCaptureInfo(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamGetCaptureInfo             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamGetCaptureInfo == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5362
 * cdef CUresult _cuStreamGetCaptureInfo(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamGetCaptureInfo
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamGetCaptureInfo == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5362, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5363
 *     global __cuStreamGetCaptureInfo
 *     cuPythonInit()
 *     if __cuStreamGetCaptureInfo == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetCaptureInfo" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCaptureInfo == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5364
 *     cuPythonInit()
 *     if __cuStreamGetCaptureInfo == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamGetCaptureInfo" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureStatus*, cuuint64_t*) nogil> __cuStreamGetCaptureInfo)(hStream, captureStatus_out, id_out)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5365
 *     if __cuStreamGetCaptureInfo == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetCaptureInfo" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureStatus*, cuuint64_t*) nogil> __cuStreamGetCaptureInfo)(hStream, captureStatus_out, id_out)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__181, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5365, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5365, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5364
 *     cuPythonInit()
 *     if __cuStreamGetCaptureInfo == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamGetCaptureInfo" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureStatus*, cuuint64_t*) nogil> __cuStreamGetCaptureInfo)(hStream, captureStatus_out, id_out)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5363
 *     global __cuStreamGetCaptureInfo
 *     cuPythonInit()
 *     if __cuStreamGetCaptureInfo == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetCaptureInfo" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5366
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetCaptureInfo" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureStatus*, cuuint64_t*) nogil> __cuStreamGetCaptureInfo)(hStream, captureStatus_out, id_out)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream, CUstreamCaptureStatus *, cuuint64_t *))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCaptureInfo)(__pyx_v_hStream, __pyx_v_captureStatus_out, __pyx_v_id_out);

    /* "cuda/_cuda/ccuda.pyx":5367
 *             raise RuntimeError('Function "cuStreamGetCaptureInfo" not found')
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureStatus*, cuuint64_t*) nogil> __cuStreamGetCaptureInfo)(hStream, captureStatus_out, id_out)
 *     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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5361
 * 
 * cdef CUresult _cuStreamGetCaptureInfo(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamGetCaptureInfo             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamGetCaptureInfo == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5360
 *     return err
 * 
 * cdef CUresult _cuStreamGetCaptureInfo(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamGetCaptureInfo
 *     cuPythonInit()
 */

  /* function 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", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5369
 *     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) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5369, 1, __PYX_ERR(0, 5369, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5370
 * 
 * cdef CUresult _cuStreamGetCaptureInfo_v2(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamGetCaptureInfo_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamGetCaptureInfo_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5371
 * cdef CUresult _cuStreamGetCaptureInfo_v2(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5371, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5372
 *     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":5373
 *     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":5374
 *     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__182, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5374, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5374, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5373
 *     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":5372
 *     global __cuStreamGetCaptureInfo_v2
 *     cuPythonInit()
 *     if __cuStreamGetCaptureInfo_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetCaptureInfo_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5375
 *         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":5376
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5370
 * 
 * cdef CUresult _cuStreamGetCaptureInfo_v2(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5369
 *     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) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5378
 *     return err
 * 
 * cdef CUresult _cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5378, 1, __PYX_ERR(0, 5378, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5379
 * 
 * cdef CUresult _cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamUpdateCaptureDependencies             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamUpdateCaptureDependencies == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5380
 * cdef CUresult _cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5380, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5381
 *     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":5382
 *     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":5383
 *     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__183, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5383, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5383, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5382
 *     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":5381
 *     global __cuStreamUpdateCaptureDependencies
 *     cuPythonInit()
 *     if __cuStreamUpdateCaptureDependencies == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamUpdateCaptureDependencies" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5384
 *         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":5385
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5379
 * 
 * cdef CUresult _cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5378
 *     return err
 * 
 * cdef CUresult _cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5387
 *     return err
 * 
 * cdef CUresult _cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5387, 1, __PYX_ERR(0, 5387, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5388
 * 
 * cdef CUresult _cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamAttachMemAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamAttachMemAsync == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5389
 * cdef CUresult _cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5389, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5390
 *     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":5391
 *     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":5392
 *     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__184, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5392, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5392, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5391
 *     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":5390
 *     global __cuStreamAttachMemAsync
 *     cuPythonInit()
 *     if __cuStreamAttachMemAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamAttachMemAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5393
 *         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":5394
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5388
 * 
 * cdef CUresult _cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5387
 *     return err
 * 
 * cdef CUresult _cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5396
 *     return err
 * 
 * cdef CUresult _cuStreamQuery(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5396, 1, __PYX_ERR(0, 5396, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5397
 * 
 * cdef CUresult _cuStreamQuery(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamQuery             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamQuery == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5398
 * cdef CUresult _cuStreamQuery(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5398, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5399
 *     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":5400
 *     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":5401
 *     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__185, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5401, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5401, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5400
 *     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":5399
 *     global __cuStreamQuery
 *     cuPythonInit()
 *     if __cuStreamQuery == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamQuery" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5402
 *         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":5403
 *             raise RuntimeError('Function "cuStreamQuery" not found')
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamQuery)(hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamSynchronize(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5397
 * 
 * cdef CUresult _cuStreamQuery(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5396
 *     return err
 * 
 * cdef CUresult _cuStreamQuery(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5405
 *     return err
 * 
 * cdef CUresult _cuStreamSynchronize(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5405, 1, __PYX_ERR(0, 5405, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5406
 * 
 * cdef CUresult _cuStreamSynchronize(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamSynchronize             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamSynchronize == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5407
 * cdef CUresult _cuStreamSynchronize(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5407, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5408
 *     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":5409
 *     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":5410
 *     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__186, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5410, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5410, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5409
 *     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":5408
 *     global __cuStreamSynchronize
 *     cuPythonInit()
 *     if __cuStreamSynchronize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamSynchronize" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5411
 *         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":5412
 *             raise RuntimeError('Function "cuStreamSynchronize" not found')
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamSynchronize)(hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamDestroy_v2(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5406
 * 
 * cdef CUresult _cuStreamSynchronize(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5405
 *     return err
 * 
 * cdef CUresult _cuStreamSynchronize(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5414
 *     return err
 * 
 * cdef CUresult _cuStreamDestroy_v2(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5414, 1, __PYX_ERR(0, 5414, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5415
 * 
 * cdef CUresult _cuStreamDestroy_v2(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamDestroy_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamDestroy_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5416
 * cdef CUresult _cuStreamDestroy_v2(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5416, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5417
 *     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":5418
 *     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":5419
 *     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__187, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5419, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5419, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5418
 *     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":5417
 *     global __cuStreamDestroy_v2
 *     cuPythonInit()
 *     if __cuStreamDestroy_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamDestroy_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5420
 *         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":5421
 *             raise RuntimeError('Function "cuStreamDestroy_v2" not found')
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamDestroy_v2)(hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamCopyAttributes(CUstream dst, CUstream src) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5415
 * 
 * cdef CUresult _cuStreamDestroy_v2(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5414
 *     return err
 * 
 * cdef CUresult _cuStreamDestroy_v2(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5423
 *     return err
 * 
 * cdef CUresult _cuStreamCopyAttributes(CUstream dst, CUstream src) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5423, 1, __PYX_ERR(0, 5423, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5424
 * 
 * cdef CUresult _cuStreamCopyAttributes(CUstream dst, CUstream src) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamCopyAttributes             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamCopyAttributes == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5425
 * cdef CUresult _cuStreamCopyAttributes(CUstream dst, CUstream src) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5425, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5426
 *     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":5427
 *     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":5428
 *     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__188, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5428, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5428, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5427
 *     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":5426
 *     global __cuStreamCopyAttributes
 *     cuPythonInit()
 *     if __cuStreamCopyAttributes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCopyAttributes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5429
 *         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":5430
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5424
 * 
 * cdef CUresult _cuStreamCopyAttributes(CUstream dst, CUstream src) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5423
 *     return err
 * 
 * cdef CUresult _cuStreamCopyAttributes(CUstream dst, CUstream src) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5432
 *     return err
 * 
 * cdef CUresult _cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5432, 1, __PYX_ERR(0, 5432, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5433
 * 
 * cdef CUresult _cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamGetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamGetAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5434
 * cdef CUresult _cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5434, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5435
 *     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":5436
 *     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":5437
 *     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__189, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5437, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5437, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5436
 *     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":5435
 *     global __cuStreamGetAttribute
 *     cuPythonInit()
 *     if __cuStreamGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5438
 *         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":5439
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5433
 * 
 * cdef CUresult _cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5432
 *     return err
 * 
 * cdef CUresult _cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5441
 *     return err
 * 
 * cdef CUresult _cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5441, 1, __PYX_ERR(0, 5441, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5442
 * 
 * cdef CUresult _cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamSetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamSetAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5443
 * cdef CUresult _cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5443, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5444
 *     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":5445
 *     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":5446
 *     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__190, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5446, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5446, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5445
 *     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":5444
 *     global __cuStreamSetAttribute
 *     cuPythonInit()
 *     if __cuStreamSetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamSetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5447
 *         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":5448
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5442
 * 
 * cdef CUresult _cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5441
 *     return err
 * 
 * cdef CUresult _cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5450
 *     return err
 * 
 * cdef CUresult _cuEventCreate(CUevent* phEvent, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5450, 1, __PYX_ERR(0, 5450, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5451
 * 
 * cdef CUresult _cuEventCreate(CUevent* phEvent, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuEventCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventCreate == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5452
 * cdef CUresult _cuEventCreate(CUevent* phEvent, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5452, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5453
 *     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":5454
 *     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":5455
 *     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__191, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5455, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5455, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5454
 *     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":5453
 *     global __cuEventCreate
 *     cuPythonInit()
 *     if __cuEventCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5456
 *         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":5457
 *             raise RuntimeError('Function "cuEventCreate" not found')
 *     err = (<CUresult (*)(CUevent*, unsigned int) nogil> __cuEventCreate)(phEvent, Flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuEventRecord(CUevent hEvent, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5451
 * 
 * cdef CUresult _cuEventCreate(CUevent* phEvent, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5450
 *     return err
 * 
 * cdef CUresult _cuEventCreate(CUevent* phEvent, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5459
 *     return err
 * 
 * cdef CUresult _cuEventRecord(CUevent hEvent, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5459, 1, __PYX_ERR(0, 5459, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5460
 * 
 * cdef CUresult _cuEventRecord(CUevent hEvent, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuEventRecord             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventRecord == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5461
 * cdef CUresult _cuEventRecord(CUevent hEvent, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5461, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5462
 *     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":5463
 *     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":5464
 *     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__192, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5464, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5464, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5463
 *     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":5462
 *     global __cuEventRecord
 *     cuPythonInit()
 *     if __cuEventRecord == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventRecord" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5465
 *         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":5466
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5460
 * 
 * cdef CUresult _cuEventRecord(CUevent hEvent, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5459
 *     return err
 * 
 * cdef CUresult _cuEventRecord(CUevent hEvent, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5468
 *     return err
 * 
 * cdef CUresult _cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5468, 1, __PYX_ERR(0, 5468, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5469
 * 
 * cdef CUresult _cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuEventRecordWithFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventRecordWithFlags == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5470
 * cdef CUresult _cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5470, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5471
 *     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":5472
 *     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":5473
 *     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__193, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5473, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5473, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5472
 *     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":5471
 *     global __cuEventRecordWithFlags
 *     cuPythonInit()
 *     if __cuEventRecordWithFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventRecordWithFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5474
 *         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":5475
 *             raise RuntimeError('Function "cuEventRecordWithFlags" not found')
 *     err = (<CUresult (*)(CUevent, CUstream, unsigned int) nogil> __cuEventRecordWithFlags)(hEvent, hStream, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuEventQuery(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5469
 * 
 * cdef CUresult _cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5468
 *     return err
 * 
 * cdef CUresult _cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5477
 *     return err
 * 
 * cdef CUresult _cuEventQuery(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5477, 1, __PYX_ERR(0, 5477, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5478
 * 
 * cdef CUresult _cuEventQuery(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuEventQuery             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventQuery == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5479
 * cdef CUresult _cuEventQuery(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5479, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5480
 *     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":5481
 *     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":5482
 *     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__194, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5482, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5482, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5481
 *     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":5480
 *     global __cuEventQuery
 *     cuPythonInit()
 *     if __cuEventQuery == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventQuery" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5483
 *         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":5484
 *             raise RuntimeError('Function "cuEventQuery" not found')
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventQuery)(hEvent)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuEventSynchronize(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5478
 * 
 * cdef CUresult _cuEventQuery(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5477
 *     return err
 * 
 * cdef CUresult _cuEventQuery(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5486
 *     return err
 * 
 * cdef CUresult _cuEventSynchronize(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5486, 1, __PYX_ERR(0, 5486, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5487
 * 
 * cdef CUresult _cuEventSynchronize(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuEventSynchronize             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventSynchronize == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5488
 * cdef CUresult _cuEventSynchronize(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5488, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5489
 *     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":5490
 *     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":5491
 *     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__195, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5491, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5491, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5490
 *     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":5489
 *     global __cuEventSynchronize
 *     cuPythonInit()
 *     if __cuEventSynchronize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventSynchronize" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5492
 *         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":5493
 *             raise RuntimeError('Function "cuEventSynchronize" not found')
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventSynchronize)(hEvent)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuEventDestroy_v2(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5487
 * 
 * cdef CUresult _cuEventSynchronize(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5486
 *     return err
 * 
 * cdef CUresult _cuEventSynchronize(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5495
 *     return err
 * 
 * cdef CUresult _cuEventDestroy_v2(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5495, 1, __PYX_ERR(0, 5495, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5496
 * 
 * cdef CUresult _cuEventDestroy_v2(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuEventDestroy_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventDestroy_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5497
 * cdef CUresult _cuEventDestroy_v2(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5497, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5498
 *     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":5499
 *     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":5500
 *     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__196, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5500, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5500, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5499
 *     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":5498
 *     global __cuEventDestroy_v2
 *     cuPythonInit()
 *     if __cuEventDestroy_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventDestroy_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5501
 *         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":5502
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5496
 * 
 * cdef CUresult _cuEventDestroy_v2(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5495
 *     return err
 * 
 * cdef CUresult _cuEventDestroy_v2(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5504
 *     return err
 * 
 * cdef CUresult _cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5504, 1, __PYX_ERR(0, 5504, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5505
 * 
 * cdef CUresult _cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuEventElapsedTime             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventElapsedTime == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5506
 * cdef CUresult _cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5506, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5507
 *     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":5508
 *     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":5509
 *     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__197, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5509, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5509, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5508
 *     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":5507
 *     global __cuEventElapsedTime
 *     cuPythonInit()
 *     if __cuEventElapsedTime == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventElapsedTime" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5510
 *         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":5511
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5505
 * 
 * cdef CUresult _cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5504
 *     return err
 * 
 * cdef CUresult _cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5513
 *     return err
 * 
 * cdef CUresult _cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5513, 1, __PYX_ERR(0, 5513, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5514
 * 
 * cdef CUresult _cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuImportExternalMemory             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuImportExternalMemory == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5515
 * cdef CUresult _cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5515, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5516
 *     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":5517
 *     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":5518
 *     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__198, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5518, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5518, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5517
 *     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":5516
 *     global __cuImportExternalMemory
 *     cuPythonInit()
 *     if __cuImportExternalMemory == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuImportExternalMemory" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5519
 *         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":5520
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5514
 * 
 * cdef CUresult _cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5513
 *     return err
 * 
 * cdef CUresult _cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5522
 *     return err
 * 
 * cdef CUresult _cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5522, 1, __PYX_ERR(0, 5522, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5523
 * 
 * cdef CUresult _cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuExternalMemoryGetMappedBuffer             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuExternalMemoryGetMappedBuffer == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5524
 * cdef CUresult _cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5524, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5525
 *     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":5526
 *     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":5527
 *     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__199, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5527, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5527, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5526
 *     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":5525
 *     global __cuExternalMemoryGetMappedBuffer
 *     cuPythonInit()
 *     if __cuExternalMemoryGetMappedBuffer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuExternalMemoryGetMappedBuffer" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5528
 *         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":5529
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5523
 * 
 * cdef CUresult _cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5522
 *     return err
 * 
 * cdef CUresult _cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5531
 *     return err
 * 
 * cdef CUresult _cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5531, 1, __PYX_ERR(0, 5531, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5532
 * 
 * cdef CUresult _cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuExternalMemoryGetMappedMipmappedArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuExternalMemoryGetMappedMipmappedArray == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5533
 * cdef CUresult _cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5533, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5534
 *     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":5535
 *     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":5536
 *     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__200, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5536, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5536, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5535
 *     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":5534
 *     global __cuExternalMemoryGetMappedMipmappedArray
 *     cuPythonInit()
 *     if __cuExternalMemoryGetMappedMipmappedArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuExternalMemoryGetMappedMipmappedArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5537
 *         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":5538
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5532
 * 
 * cdef CUresult _cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5531
 *     return err
 * 
 * cdef CUresult _cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5540
 *     return err
 * 
 * cdef CUresult _cuDestroyExternalMemory(CUexternalMemory extMem) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5540, 1, __PYX_ERR(0, 5540, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5541
 * 
 * cdef CUresult _cuDestroyExternalMemory(CUexternalMemory extMem) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDestroyExternalMemory             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDestroyExternalMemory == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5542
 * cdef CUresult _cuDestroyExternalMemory(CUexternalMemory extMem) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5542, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5543
 *     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":5544
 *     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":5545
 *     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__201, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5545, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5545, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5544
 *     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":5543
 *     global __cuDestroyExternalMemory
 *     cuPythonInit()
 *     if __cuDestroyExternalMemory == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDestroyExternalMemory" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5546
 *         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":5547
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5541
 * 
 * cdef CUresult _cuDestroyExternalMemory(CUexternalMemory extMem) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5540
 *     return err
 * 
 * cdef CUresult _cuDestroyExternalMemory(CUexternalMemory extMem) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5549
 *     return err
 * 
 * cdef CUresult _cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5549, 1, __PYX_ERR(0, 5549, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5550
 * 
 * cdef CUresult _cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuImportExternalSemaphore             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuImportExternalSemaphore == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5551
 * cdef CUresult _cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5551, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5552
 *     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":5553
 *     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":5554
 *     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__202, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5554, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5554, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5553
 *     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":5552
 *     global __cuImportExternalSemaphore
 *     cuPythonInit()
 *     if __cuImportExternalSemaphore == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuImportExternalSemaphore" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5555
 *         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":5556
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5550
 * 
 * cdef CUresult _cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5549
 *     return err
 * 
 * cdef CUresult _cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5558
 *     return err
 * 
 * cdef CUresult _cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5558, 1, __PYX_ERR(0, 5558, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5559
 * 
 * cdef CUresult _cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuSignalExternalSemaphoresAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuSignalExternalSemaphoresAsync == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5560
 * cdef CUresult _cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5560, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5561
 *     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":5562
 *     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":5563
 *     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__203, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5563, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5563, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5562
 *     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":5561
 *     global __cuSignalExternalSemaphoresAsync
 *     cuPythonInit()
 *     if __cuSignalExternalSemaphoresAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSignalExternalSemaphoresAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5564
 *         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":5565
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5559
 * 
 * cdef CUresult _cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5558
 *     return err
 * 
 * cdef CUresult _cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5567
 *     return err
 * 
 * cdef CUresult _cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5567, 1, __PYX_ERR(0, 5567, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5568
 * 
 * cdef CUresult _cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuWaitExternalSemaphoresAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuWaitExternalSemaphoresAsync == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5569
 * cdef CUresult _cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5569, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5570
 *     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":5571
 *     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":5572
 *     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__204, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5572, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5572, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5571
 *     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":5570
 *     global __cuWaitExternalSemaphoresAsync
 *     cuPythonInit()
 *     if __cuWaitExternalSemaphoresAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuWaitExternalSemaphoresAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5573
 *         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":5574
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5568
 * 
 * cdef CUresult _cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5567
 *     return err
 * 
 * cdef CUresult _cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5576
 *     return err
 * 
 * cdef CUresult _cuDestroyExternalSemaphore(CUexternalSemaphore extSem) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5576, 1, __PYX_ERR(0, 5576, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5577
 * 
 * cdef CUresult _cuDestroyExternalSemaphore(CUexternalSemaphore extSem) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDestroyExternalSemaphore             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDestroyExternalSemaphore == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5578
 * cdef CUresult _cuDestroyExternalSemaphore(CUexternalSemaphore extSem) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5578, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5579
 *     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":5580
 *     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":5581
 *     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__205, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5581, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5581, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5580
 *     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":5579
 *     global __cuDestroyExternalSemaphore
 *     cuPythonInit()
 *     if __cuDestroyExternalSemaphore == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDestroyExternalSemaphore" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5582
 *         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":5583
 *             raise RuntimeError('Function "cuDestroyExternalSemaphore" not found')
 *     err = (<CUresult (*)(CUexternalSemaphore) nogil> __cuDestroyExternalSemaphore)(extSem)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamWaitValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5577
 * 
 * cdef CUresult _cuDestroyExternalSemaphore(CUexternalSemaphore extSem) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5576
 *     return err
 * 
 * cdef CUresult _cuDestroyExternalSemaphore(CUexternalSemaphore extSem) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5585
 *     return err
 * 
 * cdef CUresult _cuStreamWaitValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamWaitValue32
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitValue32(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", 1);
  __Pyx_TraceCall("_cuStreamWaitValue32", __pyx_f[0], 5585, 1, __PYX_ERR(0, 5585, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5586
 * 
 * cdef CUresult _cuStreamWaitValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamWaitValue32             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamWaitValue32 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5587
 * cdef CUresult _cuStreamWaitValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamWaitValue32
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamWaitValue32 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5587, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5588
 *     global __cuStreamWaitValue32
 *     cuPythonInit()
 *     if __cuStreamWaitValue32 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitValue32" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue32 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5589
 *     cuPythonInit()
 *     if __cuStreamWaitValue32 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamWaitValue32" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int) nogil> __cuStreamWaitValue32)(stream, addr, value, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5590
 *     if __cuStreamWaitValue32 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitValue32" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int) nogil> __cuStreamWaitValue32)(stream, addr, value, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__206, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5590, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5590, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5589
 *     cuPythonInit()
 *     if __cuStreamWaitValue32 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamWaitValue32" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int) nogil> __cuStreamWaitValue32)(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":5588
 *     global __cuStreamWaitValue32
 *     cuPythonInit()
 *     if __cuStreamWaitValue32 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitValue32" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5591
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitValue32" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int) nogil> __cuStreamWaitValue32)(stream, addr, value, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue32)(__pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":5592
 *             raise RuntimeError('Function "cuStreamWaitValue32" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int) nogil> __cuStreamWaitValue32)(stream, addr, value, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamWaitValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5586
 * 
 * cdef CUresult _cuStreamWaitValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamWaitValue32             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamWaitValue32 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5585
 *     return err
 * 
 * cdef CUresult _cuStreamWaitValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamWaitValue32
 *     cuPythonInit()
 */

  /* function 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", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5594
 *     return err
 * 
 * cdef CUresult _cuStreamWaitValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamWaitValue64
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitValue64(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", 1);
  __Pyx_TraceCall("_cuStreamWaitValue64", __pyx_f[0], 5594, 1, __PYX_ERR(0, 5594, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5595
 * 
 * cdef CUresult _cuStreamWaitValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamWaitValue64             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamWaitValue64 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5596
 * cdef CUresult _cuStreamWaitValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamWaitValue64
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamWaitValue64 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5596, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5597
 *     global __cuStreamWaitValue64
 *     cuPythonInit()
 *     if __cuStreamWaitValue64 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitValue64" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue64 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5598
 *     cuPythonInit()
 *     if __cuStreamWaitValue64 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamWaitValue64" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int) nogil> __cuStreamWaitValue64)(stream, addr, value, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5599
 *     if __cuStreamWaitValue64 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitValue64" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int) nogil> __cuStreamWaitValue64)(stream, addr, value, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__207, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5599, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5599, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5598
 *     cuPythonInit()
 *     if __cuStreamWaitValue64 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamWaitValue64" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int) nogil> __cuStreamWaitValue64)(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":5597
 *     global __cuStreamWaitValue64
 *     cuPythonInit()
 *     if __cuStreamWaitValue64 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitValue64" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5600
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitValue64" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int) nogil> __cuStreamWaitValue64)(stream, addr, value, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue64)(__pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":5601
 *             raise RuntimeError('Function "cuStreamWaitValue64" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int) nogil> __cuStreamWaitValue64)(stream, addr, value, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamWriteValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5595
 * 
 * cdef CUresult _cuStreamWaitValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamWaitValue64             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamWaitValue64 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5594
 *     return err
 * 
 * cdef CUresult _cuStreamWaitValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamWaitValue64
 *     cuPythonInit()
 */

  /* function 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", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5603
 *     return err
 * 
 * cdef CUresult _cuStreamWriteValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamWriteValue32
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamWriteValue32(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", 1);
  __Pyx_TraceCall("_cuStreamWriteValue32", __pyx_f[0], 5603, 1, __PYX_ERR(0, 5603, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5604
 * 
 * cdef CUresult _cuStreamWriteValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamWriteValue32             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamWriteValue32 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5605
 * cdef CUresult _cuStreamWriteValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamWriteValue32
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamWriteValue32 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5605, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5606
 *     global __cuStreamWriteValue32
 *     cuPythonInit()
 *     if __cuStreamWriteValue32 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWriteValue32" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue32 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5607
 *     cuPythonInit()
 *     if __cuStreamWriteValue32 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamWriteValue32" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int) nogil> __cuStreamWriteValue32)(stream, addr, value, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5608
 *     if __cuStreamWriteValue32 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWriteValue32" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int) nogil> __cuStreamWriteValue32)(stream, addr, value, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__208, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5608, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5608, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5607
 *     cuPythonInit()
 *     if __cuStreamWriteValue32 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamWriteValue32" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int) nogil> __cuStreamWriteValue32)(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":5606
 *     global __cuStreamWriteValue32
 *     cuPythonInit()
 *     if __cuStreamWriteValue32 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWriteValue32" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5609
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWriteValue32" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int) nogil> __cuStreamWriteValue32)(stream, addr, value, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue32)(__pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":5610
 *             raise RuntimeError('Function "cuStreamWriteValue32" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int) nogil> __cuStreamWriteValue32)(stream, addr, value, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamWriteValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5604
 * 
 * cdef CUresult _cuStreamWriteValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamWriteValue32             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamWriteValue32 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5603
 *     return err
 * 
 * cdef CUresult _cuStreamWriteValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamWriteValue32
 *     cuPythonInit()
 */

  /* function 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", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5612
 *     return err
 * 
 * cdef CUresult _cuStreamWriteValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamWriteValue64
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamWriteValue64(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", 1);
  __Pyx_TraceCall("_cuStreamWriteValue64", __pyx_f[0], 5612, 1, __PYX_ERR(0, 5612, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5613
 * 
 * cdef CUresult _cuStreamWriteValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamWriteValue64             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamWriteValue64 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5614
 * cdef CUresult _cuStreamWriteValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamWriteValue64
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamWriteValue64 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5614, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5615
 *     global __cuStreamWriteValue64
 *     cuPythonInit()
 *     if __cuStreamWriteValue64 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWriteValue64" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue64 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5616
 *     cuPythonInit()
 *     if __cuStreamWriteValue64 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamWriteValue64" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int) nogil> __cuStreamWriteValue64)(stream, addr, value, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5617
 *     if __cuStreamWriteValue64 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWriteValue64" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int) nogil> __cuStreamWriteValue64)(stream, addr, value, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__209, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5617, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5617, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5616
 *     cuPythonInit()
 *     if __cuStreamWriteValue64 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamWriteValue64" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int) nogil> __cuStreamWriteValue64)(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":5615
 *     global __cuStreamWriteValue64
 *     cuPythonInit()
 *     if __cuStreamWriteValue64 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWriteValue64" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5618
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWriteValue64" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int) nogil> __cuStreamWriteValue64)(stream, addr, value, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue64)(__pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":5619
 *             raise RuntimeError('Function "cuStreamWriteValue64" not found')
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int) nogil> __cuStreamWriteValue64)(stream, addr, value, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamBatchMemOp(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5613
 * 
 * cdef CUresult _cuStreamWriteValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamWriteValue64             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamWriteValue64 == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5612
 *     return err
 * 
 * cdef CUresult _cuStreamWriteValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamWriteValue64
 *     cuPythonInit()
 */

  /* function 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", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5621
 *     return err
 * 
 * cdef CUresult _cuStreamBatchMemOp(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamBatchMemOp
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuStreamBatchMemOp(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", 1);
  __Pyx_TraceCall("_cuStreamBatchMemOp", __pyx_f[0], 5621, 1, __PYX_ERR(0, 5621, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5622
 * 
 * cdef CUresult _cuStreamBatchMemOp(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamBatchMemOp             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamBatchMemOp == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5623
 * cdef CUresult _cuStreamBatchMemOp(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamBatchMemOp
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuStreamBatchMemOp == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5623, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5624
 *     global __cuStreamBatchMemOp
 *     cuPythonInit()
 *     if __cuStreamBatchMemOp == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamBatchMemOp" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuStreamBatchMemOp == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5625
 *     cuPythonInit()
 *     if __cuStreamBatchMemOp == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamBatchMemOp" not found')
 *     err = (<CUresult (*)(CUstream, unsigned int, CUstreamBatchMemOpParams*, unsigned int) nogil> __cuStreamBatchMemOp)(stream, count, paramArray, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5626
 *     if __cuStreamBatchMemOp == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamBatchMemOp" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, unsigned int, CUstreamBatchMemOpParams*, unsigned int) nogil> __cuStreamBatchMemOp)(stream, count, paramArray, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__210, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5626, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5626, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5625
 *     cuPythonInit()
 *     if __cuStreamBatchMemOp == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuStreamBatchMemOp" not found')
 *     err = (<CUresult (*)(CUstream, unsigned int, CUstreamBatchMemOpParams*, unsigned int) nogil> __cuStreamBatchMemOp)(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":5624
 *     global __cuStreamBatchMemOp
 *     cuPythonInit()
 *     if __cuStreamBatchMemOp == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamBatchMemOp" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5627
 *         with gil:
 *             raise RuntimeError('Function "cuStreamBatchMemOp" not found')
 *     err = (<CUresult (*)(CUstream, unsigned int, CUstreamBatchMemOpParams*, unsigned int) nogil> __cuStreamBatchMemOp)(stream, count, paramArray, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUstream, unsigned int, CUstreamBatchMemOpParams *, unsigned int))__pyx_v_4cuda_5_cuda_5ccuda___cuStreamBatchMemOp)(__pyx_v_stream, __pyx_v_count, __pyx_v_paramArray, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":5628
 *             raise RuntimeError('Function "cuStreamBatchMemOp" not found')
 *     err = (<CUresult (*)(CUstream, unsigned int, CUstreamBatchMemOpParams*, unsigned int) nogil> __cuStreamBatchMemOp)(stream, count, paramArray, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuStreamWaitValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5622
 * 
 * cdef CUresult _cuStreamBatchMemOp(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamBatchMemOp             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamBatchMemOp == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5621
 *     return err
 * 
 * cdef CUresult _cuStreamBatchMemOp(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuStreamBatchMemOp
 *     cuPythonInit()
 */

  /* function 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", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5630
 *     return err
 * 
 * cdef CUresult _cuStreamWaitValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5630, 1, __PYX_ERR(0, 5630, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5631
 * 
 * cdef CUresult _cuStreamWaitValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamWaitValue32_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamWaitValue32_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5632
 * cdef CUresult _cuStreamWaitValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5632, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5633
 *     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":5634
 *     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":5635
 *     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__211, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5635, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5635, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5634
 *     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":5633
 *     global __cuStreamWaitValue32_v2
 *     cuPythonInit()
 *     if __cuStreamWaitValue32_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitValue32_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5636
 *         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":5637
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5631
 * 
 * cdef CUresult _cuStreamWaitValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5630
 *     return err
 * 
 * cdef CUresult _cuStreamWaitValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5639
 *     return err
 * 
 * cdef CUresult _cuStreamWaitValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5639, 1, __PYX_ERR(0, 5639, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5640
 * 
 * cdef CUresult _cuStreamWaitValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamWaitValue64_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamWaitValue64_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5641
 * cdef CUresult _cuStreamWaitValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5641, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5642
 *     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":5643
 *     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":5644
 *     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__212, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5644, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5644, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5643
 *     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":5642
 *     global __cuStreamWaitValue64_v2
 *     cuPythonInit()
 *     if __cuStreamWaitValue64_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitValue64_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5645
 *         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":5646
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5640
 * 
 * cdef CUresult _cuStreamWaitValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5639
 *     return err
 * 
 * cdef CUresult _cuStreamWaitValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5648
 *     return err
 * 
 * cdef CUresult _cuStreamWriteValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5648, 1, __PYX_ERR(0, 5648, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5649
 * 
 * cdef CUresult _cuStreamWriteValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamWriteValue32_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamWriteValue32_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5650
 * cdef CUresult _cuStreamWriteValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5650, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5651
 *     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":5652
 *     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":5653
 *     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__213, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5653, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5653, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5652
 *     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":5651
 *     global __cuStreamWriteValue32_v2
 *     cuPythonInit()
 *     if __cuStreamWriteValue32_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWriteValue32_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5654
 *         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":5655
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5649
 * 
 * cdef CUresult _cuStreamWriteValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5648
 *     return err
 * 
 * cdef CUresult _cuStreamWriteValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5657
 *     return err
 * 
 * cdef CUresult _cuStreamWriteValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5657, 1, __PYX_ERR(0, 5657, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5658
 * 
 * cdef CUresult _cuStreamWriteValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamWriteValue64_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamWriteValue64_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5659
 * cdef CUresult _cuStreamWriteValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5659, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5660
 *     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":5661
 *     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":5662
 *     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__214, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5662, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5662, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5661
 *     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":5660
 *     global __cuStreamWriteValue64_v2
 *     cuPythonInit()
 *     if __cuStreamWriteValue64_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWriteValue64_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5663
 *         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":5664
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5658
 * 
 * cdef CUresult _cuStreamWriteValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5657
 *     return err
 * 
 * cdef CUresult _cuStreamWriteValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5666
 *     return err
 * 
 * cdef CUresult _cuStreamBatchMemOp_v2(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5666, 1, __PYX_ERR(0, 5666, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5667
 * 
 * cdef CUresult _cuStreamBatchMemOp_v2(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuStreamBatchMemOp_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuStreamBatchMemOp_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5668
 * cdef CUresult _cuStreamBatchMemOp_v2(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5668, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5669
 *     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":5670
 *     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":5671
 *     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__215, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5671, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5671, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5670
 *     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":5669
 *     global __cuStreamBatchMemOp_v2
 *     cuPythonInit()
 *     if __cuStreamBatchMemOp_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuStreamBatchMemOp_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5672
 *         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":5673
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5667
 * 
 * cdef CUresult _cuStreamBatchMemOp_v2(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5666
 *     return err
 * 
 * cdef CUresult _cuStreamBatchMemOp_v2(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5675
 *     return err
 * 
 * cdef CUresult _cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5675, 1, __PYX_ERR(0, 5675, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5676
 * 
 * cdef CUresult _cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuFuncGetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuFuncGetAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5677
 * cdef CUresult _cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5677, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5678
 *     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":5679
 *     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":5680
 *     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__216, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5680, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5680, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5679
 *     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":5678
 *     global __cuFuncGetAttribute
 *     cuPythonInit()
 *     if __cuFuncGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncGetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5681
 *         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":5682
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5676
 * 
 * cdef CUresult _cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5675
 *     return err
 * 
 * cdef CUresult _cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5684
 *     return err
 * 
 * cdef CUresult _cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5684, 1, __PYX_ERR(0, 5684, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5685
 * 
 * cdef CUresult _cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuFuncSetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuFuncSetAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5686
 * cdef CUresult _cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5686, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5687
 *     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":5688
 *     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":5689
 *     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__217, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5689, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5689, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5688
 *     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":5687
 *     global __cuFuncSetAttribute
 *     cuPythonInit()
 *     if __cuFuncSetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5690
 *         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":5691
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5685
 * 
 * cdef CUresult _cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5684
 *     return err
 * 
 * cdef CUresult _cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5693
 *     return err
 * 
 * cdef CUresult _cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5693, 1, __PYX_ERR(0, 5693, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5694
 * 
 * cdef CUresult _cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuFuncSetCacheConfig             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuFuncSetCacheConfig == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5695
 * cdef CUresult _cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5695, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5696
 *     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":5697
 *     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":5698
 *     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__218, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5698, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5698, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5697
 *     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":5696
 *     global __cuFuncSetCacheConfig
 *     cuPythonInit()
 *     if __cuFuncSetCacheConfig == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetCacheConfig" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5699
 *         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":5700
 *             raise RuntimeError('Function "cuFuncSetCacheConfig" not found')
 *     err = (<CUresult (*)(CUfunction, CUfunc_cache) nogil> __cuFuncSetCacheConfig)(hfunc, config)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5694
 * 
 * cdef CUresult _cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5693
 *     return err
 * 
 * cdef CUresult _cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5702
 *     return err
 * 
 * cdef CUresult _cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5702, 1, __PYX_ERR(0, 5702, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5703
 * 
 * cdef CUresult _cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuFuncSetSharedMemConfig             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuFuncSetSharedMemConfig == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5704
 * cdef CUresult _cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5704, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5705
 *     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":5706
 *     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":5707
 *     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__219, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5707, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5707, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5706
 *     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":5705
 *     global __cuFuncSetSharedMemConfig
 *     cuPythonInit()
 *     if __cuFuncSetSharedMemConfig == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetSharedMemConfig" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5708
 *         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":5709
 *             raise RuntimeError('Function "cuFuncSetSharedMemConfig" not found')
 *     err = (<CUresult (*)(CUfunction, CUsharedconfig) nogil> __cuFuncSetSharedMemConfig)(hfunc, config)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5703
 * 
 * cdef CUresult _cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5702
 *     return err
 * 
 * cdef CUresult _cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5711
 *     return err
 * 
 * cdef CUresult _cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5711, 1, __PYX_ERR(0, 5711, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5712
 * 
 * cdef CUresult _cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuFuncGetModule             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuFuncGetModule == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5713
 * cdef CUresult _cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5713, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5714
 *     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":5715
 *     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":5716
 *     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__220, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5716, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5716, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5715
 *     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":5714
 *     global __cuFuncGetModule
 *     cuPythonInit()
 *     if __cuFuncGetModule == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncGetModule" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5717
 *         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":5718
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5712
 * 
 * cdef CUresult _cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5711
 *     return err
 * 
 * cdef CUresult _cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5720
 *     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) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5720, 1, __PYX_ERR(0, 5720, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5721
 * 
 * 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) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuLaunchKernel             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLaunchKernel == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5722
 * 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) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5722, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5723
 *     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":5724
 *     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":5725
 *     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__221, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5725, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5725, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5724
 *     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":5723
 *     global __cuLaunchKernel
 *     cuPythonInit()
 *     if __cuLaunchKernel == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchKernel" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5726
 *         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":5727
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5721
 * 
 * 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) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5720
 *     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) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5729
 *     return err
 * 
 * cdef CUresult _cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5729, 1, __PYX_ERR(0, 5729, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5730
 * 
 * cdef CUresult _cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuLaunchKernelEx             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLaunchKernelEx == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5731
 * cdef CUresult _cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5731, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5732
 *     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":5733
 *     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":5734
 *     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__222, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5734, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5734, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5733
 *     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":5732
 *     global __cuLaunchKernelEx
 *     cuPythonInit()
 *     if __cuLaunchKernelEx == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchKernelEx" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5735
 *         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":5736
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5730
 * 
 * cdef CUresult _cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5729
 *     return err
 * 
 * cdef CUresult _cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5738
 *     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) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5738, 1, __PYX_ERR(0, 5738, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5739
 * 
 * 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) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuLaunchCooperativeKernel             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLaunchCooperativeKernel == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5740
 * 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) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5740, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5741
 *     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":5742
 *     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":5743
 *     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__223, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5743, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5743, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5742
 *     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":5741
 *     global __cuLaunchCooperativeKernel
 *     cuPythonInit()
 *     if __cuLaunchCooperativeKernel == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchCooperativeKernel" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5744
 *         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":5745
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5739
 * 
 * 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) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5738
 *     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) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5747
 *     return err
 * 
 * cdef CUresult _cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5747, 1, __PYX_ERR(0, 5747, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5748
 * 
 * cdef CUresult _cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuLaunchCooperativeKernelMultiDevice             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLaunchCooperativeKernelMultiDevice == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5749
 * cdef CUresult _cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5749, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5750
 *     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":5751
 *     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":5752
 *     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__224, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5752, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5752, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5751
 *     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":5750
 *     global __cuLaunchCooperativeKernelMultiDevice
 *     cuPythonInit()
 *     if __cuLaunchCooperativeKernelMultiDevice == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchCooperativeKernelMultiDevice" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5753
 *         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":5754
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5748
 * 
 * cdef CUresult _cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5747
 *     return err
 * 
 * cdef CUresult _cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5756
 *     return err
 * 
 * cdef CUresult _cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5756, 1, __PYX_ERR(0, 5756, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5757
 * 
 * cdef CUresult _cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuLaunchHostFunc             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLaunchHostFunc == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5758
 * cdef CUresult _cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5758, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5759
 *     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":5760
 *     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":5761
 *     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__225, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5761, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5761, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5760
 *     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":5759
 *     global __cuLaunchHostFunc
 *     cuPythonInit()
 *     if __cuLaunchHostFunc == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchHostFunc" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5762
 *         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":5763
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5757
 * 
 * cdef CUresult _cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5756
 *     return err
 * 
 * cdef CUresult _cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5765
 *     return err
 * 
 * cdef CUresult _cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5765, 1, __PYX_ERR(0, 5765, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5766
 * 
 * cdef CUresult _cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuFuncSetBlockShape             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuFuncSetBlockShape == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5767
 * cdef CUresult _cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5767, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5768
 *     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":5769
 *     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":5770
 *     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__226, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5770, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5770, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5769
 *     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":5768
 *     global __cuFuncSetBlockShape
 *     cuPythonInit()
 *     if __cuFuncSetBlockShape == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetBlockShape" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5771
 *         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":5772
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5766
 * 
 * cdef CUresult _cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5765
 *     return err
 * 
 * cdef CUresult _cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5774
 *     return err
 * 
 * cdef CUresult _cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5774, 1, __PYX_ERR(0, 5774, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5775
 * 
 * cdef CUresult _cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuFuncSetSharedSize             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuFuncSetSharedSize == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5776
 * cdef CUresult _cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5776, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5777
 *     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":5778
 *     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":5779
 *     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__227, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5779, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5779, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5778
 *     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":5777
 *     global __cuFuncSetSharedSize
 *     cuPythonInit()
 *     if __cuFuncSetSharedSize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetSharedSize" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5780
 *         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":5781
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5775
 * 
 * cdef CUresult _cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5774
 *     return err
 * 
 * cdef CUresult _cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5783
 *     return err
 * 
 * cdef CUresult _cuParamSetSize(CUfunction hfunc, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5783, 1, __PYX_ERR(0, 5783, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5784
 * 
 * cdef CUresult _cuParamSetSize(CUfunction hfunc, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuParamSetSize             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuParamSetSize == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5785
 * cdef CUresult _cuParamSetSize(CUfunction hfunc, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5785, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5786
 *     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":5787
 *     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":5788
 *     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__228, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5788, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5788, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5787
 *     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":5786
 *     global __cuParamSetSize
 *     cuPythonInit()
 *     if __cuParamSetSize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetSize" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5789
 *         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":5790
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5784
 * 
 * cdef CUresult _cuParamSetSize(CUfunction hfunc, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5783
 *     return err
 * 
 * cdef CUresult _cuParamSetSize(CUfunction hfunc, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5792
 *     return err
 * 
 * cdef CUresult _cuParamSeti(CUfunction hfunc, int offset, unsigned int value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5792, 1, __PYX_ERR(0, 5792, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5793
 * 
 * cdef CUresult _cuParamSeti(CUfunction hfunc, int offset, unsigned int value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuParamSeti             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuParamSeti == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5794
 * cdef CUresult _cuParamSeti(CUfunction hfunc, int offset, unsigned int value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5794, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5795
 *     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":5796
 *     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":5797
 *     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__229, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5797, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5797, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5796
 *     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":5795
 *     global __cuParamSeti
 *     cuPythonInit()
 *     if __cuParamSeti == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuParamSeti" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5798
 *         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":5799
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5793
 * 
 * cdef CUresult _cuParamSeti(CUfunction hfunc, int offset, unsigned int value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5792
 *     return err
 * 
 * cdef CUresult _cuParamSeti(CUfunction hfunc, int offset, unsigned int value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5801
 *     return err
 * 
 * cdef CUresult _cuParamSetf(CUfunction hfunc, int offset, float value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5801, 1, __PYX_ERR(0, 5801, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5802
 * 
 * cdef CUresult _cuParamSetf(CUfunction hfunc, int offset, float value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuParamSetf             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuParamSetf == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5803
 * cdef CUresult _cuParamSetf(CUfunction hfunc, int offset, float value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5803, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5804
 *     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":5805
 *     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":5806
 *     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__230, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5806, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5806, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5805
 *     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":5804
 *     global __cuParamSetf
 *     cuPythonInit()
 *     if __cuParamSetf == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetf" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5807
 *         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":5808
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5802
 * 
 * cdef CUresult _cuParamSetf(CUfunction hfunc, int offset, float value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5801
 *     return err
 * 
 * cdef CUresult _cuParamSetf(CUfunction hfunc, int offset, float value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5810
 *     return err
 * 
 * cdef CUresult _cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5810, 1, __PYX_ERR(0, 5810, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5811
 * 
 * cdef CUresult _cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuParamSetv             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuParamSetv == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5812
 * cdef CUresult _cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5812, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5813
 *     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":5814
 *     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":5815
 *     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__231, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5815, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5815, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5814
 *     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":5813
 *     global __cuParamSetv
 *     cuPythonInit()
 *     if __cuParamSetv == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetv" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5816
 *         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":5817
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5811
 * 
 * cdef CUresult _cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5810
 *     return err
 * 
 * cdef CUresult _cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5819
 *     return err
 * 
 * cdef CUresult _cuLaunch(CUfunction f) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5819, 1, __PYX_ERR(0, 5819, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5820
 * 
 * cdef CUresult _cuLaunch(CUfunction f) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuLaunch             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLaunch == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5821
 * cdef CUresult _cuLaunch(CUfunction f) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5821, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5822
 *     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":5823
 *     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":5824
 *     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__232, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5824, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5824, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5823
 *     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":5822
 *     global __cuLaunch
 *     cuPythonInit()
 *     if __cuLaunch == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunch" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5825
 *         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":5826
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5820
 * 
 * cdef CUresult _cuLaunch(CUfunction f) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5819
 *     return err
 * 
 * cdef CUresult _cuLaunch(CUfunction f) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5828
 *     return err
 * 
 * cdef CUresult _cuLaunchGrid(CUfunction f, int grid_width, int grid_height) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5828, 1, __PYX_ERR(0, 5828, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5829
 * 
 * cdef CUresult _cuLaunchGrid(CUfunction f, int grid_width, int grid_height) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuLaunchGrid             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLaunchGrid == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5830
 * cdef CUresult _cuLaunchGrid(CUfunction f, int grid_width, int grid_height) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5830, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5831
 *     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":5832
 *     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":5833
 *     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__233, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5833, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5833, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5832
 *     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":5831
 *     global __cuLaunchGrid
 *     cuPythonInit()
 *     if __cuLaunchGrid == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchGrid" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5834
 *         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":5835
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5829
 * 
 * cdef CUresult _cuLaunchGrid(CUfunction f, int grid_width, int grid_height) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5828
 *     return err
 * 
 * cdef CUresult _cuLaunchGrid(CUfunction f, int grid_width, int grid_height) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5837
 *     return err
 * 
 * cdef CUresult _cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5837, 1, __PYX_ERR(0, 5837, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5838
 * 
 * cdef CUresult _cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuLaunchGridAsync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuLaunchGridAsync == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5839
 * cdef CUresult _cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5839, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5840
 *     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":5841
 *     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":5842
 *     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__234, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5842, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5842, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5841
 *     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":5840
 *     global __cuLaunchGridAsync
 *     cuPythonInit()
 *     if __cuLaunchGridAsync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuLaunchGridAsync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5843
 *         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":5844
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5838
 * 
 * cdef CUresult _cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5837
 *     return err
 * 
 * cdef CUresult _cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5846
 *     return err
 * 
 * cdef CUresult _cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5846, 1, __PYX_ERR(0, 5846, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5847
 * 
 * cdef CUresult _cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuParamSetTexRef             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuParamSetTexRef == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5848
 * cdef CUresult _cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5848, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5849
 *     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":5850
 *     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":5851
 *     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__235, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5851, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5851, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5850
 *     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":5849
 *     global __cuParamSetTexRef
 *     cuPythonInit()
 *     if __cuParamSetTexRef == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetTexRef" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5852
 *         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":5853
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5847
 * 
 * cdef CUresult _cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5846
 *     return err
 * 
 * cdef CUresult _cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5855
 *     return err
 * 
 * cdef CUresult _cuGraphCreate(CUgraph* phGraph, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5855, 1, __PYX_ERR(0, 5855, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5856
 * 
 * cdef CUresult _cuGraphCreate(CUgraph* phGraph, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphCreate == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5857
 * cdef CUresult _cuGraphCreate(CUgraph* phGraph, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5857, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5858
 *     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":5859
 *     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":5860
 *     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__236, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5860, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5860, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5859
 *     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":5858
 *     global __cuGraphCreate
 *     cuPythonInit()
 *     if __cuGraphCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5861
 *         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":5862
 *             raise RuntimeError('Function "cuGraphCreate" not found')
 *     err = (<CUresult (*)(CUgraph*, unsigned int) nogil> __cuGraphCreate)(phGraph, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphAddKernelNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5856
 * 
 * cdef CUresult _cuGraphCreate(CUgraph* phGraph, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5855
 *     return err
 * 
 * cdef CUresult _cuGraphCreate(CUgraph* phGraph, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5864
 *     return err
 * 
 * cdef CUresult _cuGraphAddKernelNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddKernelNode
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddKernelNode(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", 1);
  __Pyx_TraceCall("_cuGraphAddKernelNode", __pyx_f[0], 5864, 1, __PYX_ERR(0, 5864, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5865
 * 
 * cdef CUresult _cuGraphAddKernelNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphAddKernelNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddKernelNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5866
 * cdef CUresult _cuGraphAddKernelNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphAddKernelNode
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphAddKernelNode == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5866, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5867
 *     global __cuGraphAddKernelNode
 *     cuPythonInit()
 *     if __cuGraphAddKernelNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddKernelNode" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddKernelNode == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5868
 *     cuPythonInit()
 *     if __cuGraphAddKernelNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddKernelNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphAddKernelNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5869
 *     if __cuGraphAddKernelNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddKernelNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphAddKernelNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__237, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5869, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5869, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5868
 *     cuPythonInit()
 *     if __cuGraphAddKernelNode == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphAddKernelNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphAddKernelNode)(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":5867
 *     global __cuGraphAddKernelNode
 *     cuPythonInit()
 *     if __cuGraphAddKernelNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddKernelNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5870
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddKernelNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphAddKernelNode)(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)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":5871
 *             raise RuntimeError('Function "cuGraphAddKernelNode" not found')
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphAddKernelNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphKernelNodeGetParams(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5865
 * 
 * cdef CUresult _cuGraphAddKernelNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphAddKernelNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddKernelNode == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5864
 *     return err
 * 
 * cdef CUresult _cuGraphAddKernelNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphAddKernelNode
 *     cuPythonInit()
 */

  /* function 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", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5873
 *     return err
 * 
 * cdef CUresult _cuGraphKernelNodeGetParams(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphKernelNodeGetParams
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeGetParams(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", 1);
  __Pyx_TraceCall("_cuGraphKernelNodeGetParams", __pyx_f[0], 5873, 1, __PYX_ERR(0, 5873, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5874
 * 
 * cdef CUresult _cuGraphKernelNodeGetParams(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphKernelNodeGetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphKernelNodeGetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5875
 * cdef CUresult _cuGraphKernelNodeGetParams(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphKernelNodeGetParams
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphKernelNodeGetParams == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5875, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5876
 *     global __cuGraphKernelNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphKernelNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeGetParams" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeGetParams == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5877
 *     cuPythonInit()
 *     if __cuGraphKernelNodeGetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphKernelNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphKernelNodeGetParams)(hNode, nodeParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5878
 *     if __cuGraphKernelNodeGetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeGetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphKernelNodeGetParams)(hNode, nodeParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__238, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5878, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5878, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5877
 *     cuPythonInit()
 *     if __cuGraphKernelNodeGetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphKernelNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphKernelNodeGetParams)(hNode, nodeParams)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5876
 *     global __cuGraphKernelNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphKernelNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5879
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphKernelNodeGetParams)(hNode, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUDA_KERNEL_NODE_PARAMS *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeGetParams)(__pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":5880
 *             raise RuntimeError('Function "cuGraphKernelNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphKernelNodeGetParams)(hNode, nodeParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphKernelNodeSetParams(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5874
 * 
 * cdef CUresult _cuGraphKernelNodeGetParams(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphKernelNodeGetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphKernelNodeGetParams == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5873
 *     return err
 * 
 * cdef CUresult _cuGraphKernelNodeGetParams(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphKernelNodeGetParams
 *     cuPythonInit()
 */

  /* function 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", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5882
 *     return err
 * 
 * cdef CUresult _cuGraphKernelNodeSetParams(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphKernelNodeSetParams
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeSetParams(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", 1);
  __Pyx_TraceCall("_cuGraphKernelNodeSetParams", __pyx_f[0], 5882, 1, __PYX_ERR(0, 5882, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5883
 * 
 * cdef CUresult _cuGraphKernelNodeSetParams(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphKernelNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphKernelNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5884
 * cdef CUresult _cuGraphKernelNodeSetParams(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphKernelNodeSetParams
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphKernelNodeSetParams == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5884, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5885
 *     global __cuGraphKernelNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphKernelNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeSetParams" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeSetParams == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":5886
 *     cuPythonInit()
 *     if __cuGraphKernelNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphKernelNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphKernelNodeSetParams)(hNode, nodeParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":5887
 *     if __cuGraphKernelNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphKernelNodeSetParams)(hNode, nodeParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__239, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5887, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5887, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5886
 *     cuPythonInit()
 *     if __cuGraphKernelNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphKernelNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphKernelNodeSetParams)(hNode, nodeParams)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":5885
 *     global __cuGraphKernelNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphKernelNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5888
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphKernelNodeSetParams)(hNode, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphNode, CUDA_KERNEL_NODE_PARAMS const *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeSetParams)(__pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":5889
 *             raise RuntimeError('Function "cuGraphKernelNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphKernelNodeSetParams)(hNode, nodeParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphAddMemcpyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5883
 * 
 * cdef CUresult _cuGraphKernelNodeSetParams(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphKernelNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphKernelNodeSetParams == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":5882
 *     return err
 * 
 * cdef CUresult _cuGraphKernelNodeSetParams(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphKernelNodeSetParams
 *     cuPythonInit()
 */

  /* function 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", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":5891
 *     return err
 * 
 * cdef CUresult _cuGraphAddMemcpyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5891, 1, __PYX_ERR(0, 5891, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5892
 * 
 * cdef CUresult _cuGraphAddMemcpyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphAddMemcpyNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddMemcpyNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5893
 * cdef CUresult _cuGraphAddMemcpyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5893, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5894
 *     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":5895
 *     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":5896
 *     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__240, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5896, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5896, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5895
 *     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":5894
 *     global __cuGraphAddMemcpyNode
 *     cuPythonInit()
 *     if __cuGraphAddMemcpyNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemcpyNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5897
 *         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":5898
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5892
 * 
 * cdef CUresult _cuGraphAddMemcpyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5891
 *     return err
 * 
 * cdef CUresult _cuGraphAddMemcpyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5900
 *     return err
 * 
 * cdef CUresult _cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5900, 1, __PYX_ERR(0, 5900, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5901
 * 
 * cdef CUresult _cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphMemcpyNodeGetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphMemcpyNodeGetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5902
 * cdef CUresult _cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5902, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5903
 *     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":5904
 *     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":5905
 *     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__241, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5905, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5905, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5904
 *     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":5903
 *     global __cuGraphMemcpyNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphMemcpyNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemcpyNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5906
 *         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":5907
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5901
 * 
 * cdef CUresult _cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5900
 *     return err
 * 
 * cdef CUresult _cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5909
 *     return err
 * 
 * cdef CUresult _cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5909, 1, __PYX_ERR(0, 5909, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5910
 * 
 * cdef CUresult _cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphMemcpyNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphMemcpyNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5911
 * cdef CUresult _cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5911, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5912
 *     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":5913
 *     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":5914
 *     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__242, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5914, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5914, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5913
 *     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":5912
 *     global __cuGraphMemcpyNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphMemcpyNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemcpyNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5915
 *         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":5916
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5910
 * 
 * cdef CUresult _cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5909
 *     return err
 * 
 * cdef CUresult _cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5918
 *     return err
 * 
 * cdef CUresult _cuGraphAddMemsetNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5918, 1, __PYX_ERR(0, 5918, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5919
 * 
 * cdef CUresult _cuGraphAddMemsetNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphAddMemsetNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddMemsetNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5920
 * cdef CUresult _cuGraphAddMemsetNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5920, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5921
 *     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":5922
 *     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":5923
 *     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__243, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5923, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5923, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5922
 *     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":5921
 *     global __cuGraphAddMemsetNode
 *     cuPythonInit()
 *     if __cuGraphAddMemsetNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemsetNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5924
 *         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":5925
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5919
 * 
 * cdef CUresult _cuGraphAddMemsetNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5918
 *     return err
 * 
 * cdef CUresult _cuGraphAddMemsetNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5927
 *     return err
 * 
 * cdef CUresult _cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5927, 1, __PYX_ERR(0, 5927, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5928
 * 
 * cdef CUresult _cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphMemsetNodeGetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphMemsetNodeGetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5929
 * cdef CUresult _cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5929, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5930
 *     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":5931
 *     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":5932
 *     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__244, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5932, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5932, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5931
 *     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":5930
 *     global __cuGraphMemsetNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphMemsetNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemsetNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5933
 *         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":5934
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5928
 * 
 * cdef CUresult _cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5927
 *     return err
 * 
 * cdef CUresult _cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5936
 *     return err
 * 
 * cdef CUresult _cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5936, 1, __PYX_ERR(0, 5936, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5937
 * 
 * cdef CUresult _cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphMemsetNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphMemsetNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5938
 * cdef CUresult _cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5938, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5939
 *     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":5940
 *     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":5941
 *     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__245, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5941, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5941, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5940
 *     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":5939
 *     global __cuGraphMemsetNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphMemsetNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemsetNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5942
 *         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":5943
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5937
 * 
 * cdef CUresult _cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5936
 *     return err
 * 
 * cdef CUresult _cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5945
 *     return err
 * 
 * cdef CUresult _cuGraphAddHostNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5945, 1, __PYX_ERR(0, 5945, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5946
 * 
 * cdef CUresult _cuGraphAddHostNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphAddHostNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddHostNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5947
 * cdef CUresult _cuGraphAddHostNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5947, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5948
 *     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":5949
 *     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":5950
 *     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__246, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5950, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5950, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5949
 *     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":5948
 *     global __cuGraphAddHostNode
 *     cuPythonInit()
 *     if __cuGraphAddHostNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddHostNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5951
 *         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":5952
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5946
 * 
 * cdef CUresult _cuGraphAddHostNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5945
 *     return err
 * 
 * cdef CUresult _cuGraphAddHostNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5954
 *     return err
 * 
 * cdef CUresult _cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5954, 1, __PYX_ERR(0, 5954, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5955
 * 
 * cdef CUresult _cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphHostNodeGetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphHostNodeGetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5956
 * cdef CUresult _cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5956, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5957
 *     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":5958
 *     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":5959
 *     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__247, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5959, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5959, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5958
 *     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":5957
 *     global __cuGraphHostNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphHostNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphHostNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5960
 *         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":5961
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5955
 * 
 * cdef CUresult _cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5954
 *     return err
 * 
 * cdef CUresult _cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5963
 *     return err
 * 
 * cdef CUresult _cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5963, 1, __PYX_ERR(0, 5963, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5964
 * 
 * cdef CUresult _cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphHostNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphHostNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5965
 * cdef CUresult _cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5965, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5966
 *     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":5967
 *     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":5968
 *     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__248, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5968, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5968, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5967
 *     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":5966
 *     global __cuGraphHostNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphHostNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphHostNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5969
 *         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":5970
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5964
 * 
 * cdef CUresult _cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5963
 *     return err
 * 
 * cdef CUresult _cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5972
 *     return err
 * 
 * cdef CUresult _cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5972, 1, __PYX_ERR(0, 5972, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5973
 * 
 * cdef CUresult _cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphAddChildGraphNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddChildGraphNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5974
 * cdef CUresult _cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5974, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5975
 *     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":5976
 *     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":5977
 *     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__249, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5977, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5977, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5976
 *     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":5975
 *     global __cuGraphAddChildGraphNode
 *     cuPythonInit()
 *     if __cuGraphAddChildGraphNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddChildGraphNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5978
 *         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":5979
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5973
 * 
 * cdef CUresult _cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5972
 *     return err
 * 
 * cdef CUresult _cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5981
 *     return err
 * 
 * cdef CUresult _cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5981, 1, __PYX_ERR(0, 5981, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5982
 * 
 * cdef CUresult _cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphChildGraphNodeGetGraph             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphChildGraphNodeGetGraph == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5983
 * cdef CUresult _cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5983, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5984
 *     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":5985
 *     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":5986
 *     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__250, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5986, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5986, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5985
 *     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":5984
 *     global __cuGraphChildGraphNodeGetGraph
 *     cuPythonInit()
 *     if __cuGraphChildGraphNodeGetGraph == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphChildGraphNodeGetGraph" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5987
 *         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":5988
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5982
 * 
 * cdef CUresult _cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5981
 *     return err
 * 
 * cdef CUresult _cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5990
 *     return err
 * 
 * cdef CUresult _cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5990, 1, __PYX_ERR(0, 5990, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":5991
 * 
 * cdef CUresult _cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphAddEmptyNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddEmptyNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":5992
 * cdef CUresult _cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 5992, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":5993
 *     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":5994
 *     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":5995
 *     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__251, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5995, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 5995, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":5994
 *     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":5993
 *     global __cuGraphAddEmptyNode
 *     cuPythonInit()
 *     if __cuGraphAddEmptyNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddEmptyNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":5996
 *         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":5997
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":5991
 * 
 * cdef CUresult _cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5990
 *     return err
 * 
 * cdef CUresult _cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":5999
 *     return err
 * 
 * cdef CUresult _cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 5999, 1, __PYX_ERR(0, 5999, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6000
 * 
 * cdef CUresult _cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphAddEventRecordNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddEventRecordNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6001
 * cdef CUresult _cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6001, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6002
 *     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":6003
 *     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":6004
 *     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__252, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6004, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6004, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6003
 *     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":6002
 *     global __cuGraphAddEventRecordNode
 *     cuPythonInit()
 *     if __cuGraphAddEventRecordNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddEventRecordNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6005
 *         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":6006
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6000
 * 
 * cdef CUresult _cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":5999
 *     return err
 * 
 * cdef CUresult _cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6008
 *     return err
 * 
 * cdef CUresult _cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6008, 1, __PYX_ERR(0, 6008, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6009
 * 
 * cdef CUresult _cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphEventRecordNodeGetEvent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphEventRecordNodeGetEvent == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6010
 * cdef CUresult _cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6010, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6011
 *     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":6012
 *     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":6013
 *     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__253, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6013, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6013, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6012
 *     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":6011
 *     global __cuGraphEventRecordNodeGetEvent
 *     cuPythonInit()
 *     if __cuGraphEventRecordNodeGetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventRecordNodeGetEvent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6014
 *         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":6015
 *             raise RuntimeError('Function "cuGraphEventRecordNodeGetEvent" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUevent*) nogil> __cuGraphEventRecordNodeGetEvent)(hNode, event_out)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6009
 * 
 * cdef CUresult _cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6008
 *     return err
 * 
 * cdef CUresult _cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6017
 *     return err
 * 
 * cdef CUresult _cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6017, 1, __PYX_ERR(0, 6017, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6018
 * 
 * cdef CUresult _cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphEventRecordNodeSetEvent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphEventRecordNodeSetEvent == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6019
 * cdef CUresult _cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6019, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6020
 *     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":6021
 *     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":6022
 *     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__254, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6022, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6022, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6021
 *     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":6020
 *     global __cuGraphEventRecordNodeSetEvent
 *     cuPythonInit()
 *     if __cuGraphEventRecordNodeSetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventRecordNodeSetEvent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6023
 *         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":6024
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6018
 * 
 * cdef CUresult _cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6017
 *     return err
 * 
 * cdef CUresult _cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6026
 *     return err
 * 
 * cdef CUresult _cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6026, 1, __PYX_ERR(0, 6026, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6027
 * 
 * cdef CUresult _cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphAddEventWaitNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddEventWaitNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6028
 * cdef CUresult _cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6028, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6029
 *     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":6030
 *     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":6031
 *     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__255, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6031, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6031, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6030
 *     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":6029
 *     global __cuGraphAddEventWaitNode
 *     cuPythonInit()
 *     if __cuGraphAddEventWaitNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddEventWaitNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6032
 *         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":6033
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6027
 * 
 * cdef CUresult _cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6026
 *     return err
 * 
 * cdef CUresult _cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6035
 *     return err
 * 
 * cdef CUresult _cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6035, 1, __PYX_ERR(0, 6035, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6036
 * 
 * cdef CUresult _cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphEventWaitNodeGetEvent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphEventWaitNodeGetEvent == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6037
 * cdef CUresult _cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6037, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6038
 *     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":6039
 *     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":6040
 *     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__256, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6040, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6040, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6039
 *     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":6038
 *     global __cuGraphEventWaitNodeGetEvent
 *     cuPythonInit()
 *     if __cuGraphEventWaitNodeGetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventWaitNodeGetEvent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6041
 *         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":6042
 *             raise RuntimeError('Function "cuGraphEventWaitNodeGetEvent" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUevent*) nogil> __cuGraphEventWaitNodeGetEvent)(hNode, event_out)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6036
 * 
 * cdef CUresult _cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6035
 *     return err
 * 
 * cdef CUresult _cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6044
 *     return err
 * 
 * cdef CUresult _cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6044, 1, __PYX_ERR(0, 6044, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6045
 * 
 * cdef CUresult _cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphEventWaitNodeSetEvent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphEventWaitNodeSetEvent == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6046
 * cdef CUresult _cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6046, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6047
 *     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":6048
 *     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":6049
 *     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__257, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6049, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6049, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6048
 *     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":6047
 *     global __cuGraphEventWaitNodeSetEvent
 *     cuPythonInit()
 *     if __cuGraphEventWaitNodeSetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventWaitNodeSetEvent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6050
 *         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":6051
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6045
 * 
 * cdef CUresult _cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6044
 *     return err
 * 
 * cdef CUresult _cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6053
 *     return err
 * 
 * cdef CUresult _cuGraphAddExternalSemaphoresSignalNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6053, 1, __PYX_ERR(0, 6053, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6054
 * 
 * cdef CUresult _cuGraphAddExternalSemaphoresSignalNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphAddExternalSemaphoresSignalNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddExternalSemaphoresSignalNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6055
 * cdef CUresult _cuGraphAddExternalSemaphoresSignalNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6055, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6056
 *     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":6057
 *     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":6058
 *     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__258, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6058, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6058, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6057
 *     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":6056
 *     global __cuGraphAddExternalSemaphoresSignalNode
 *     cuPythonInit()
 *     if __cuGraphAddExternalSemaphoresSignalNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddExternalSemaphoresSignalNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6059
 *         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":6060
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6054
 * 
 * cdef CUresult _cuGraphAddExternalSemaphoresSignalNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6053
 *     return err
 * 
 * cdef CUresult _cuGraphAddExternalSemaphoresSignalNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6062
 *     return err
 * 
 * cdef CUresult _cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6062, 1, __PYX_ERR(0, 6062, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6063
 * 
 * cdef CUresult _cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphExternalSemaphoresSignalNodeGetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresSignalNodeGetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6064
 * cdef CUresult _cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6064, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6065
 *     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":6066
 *     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":6067
 *     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__259, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6067, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6067, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6066
 *     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":6065
 *     global __cuGraphExternalSemaphoresSignalNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresSignalNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6068
 *         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":6069
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6063
 * 
 * cdef CUresult _cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6062
 *     return err
 * 
 * cdef CUresult _cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6071
 *     return err
 * 
 * cdef CUresult _cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6071, 1, __PYX_ERR(0, 6071, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6072
 * 
 * cdef CUresult _cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphExternalSemaphoresSignalNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresSignalNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6073
 * cdef CUresult _cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6073, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6074
 *     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":6075
 *     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":6076
 *     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__260, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6076, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6076, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6075
 *     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":6074
 *     global __cuGraphExternalSemaphoresSignalNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresSignalNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6077
 *         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":6078
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6072
 * 
 * cdef CUresult _cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6071
 *     return err
 * 
 * cdef CUresult _cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6080
 *     return err
 * 
 * cdef CUresult _cuGraphAddExternalSemaphoresWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6080, 1, __PYX_ERR(0, 6080, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6081
 * 
 * cdef CUresult _cuGraphAddExternalSemaphoresWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphAddExternalSemaphoresWaitNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddExternalSemaphoresWaitNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6082
 * cdef CUresult _cuGraphAddExternalSemaphoresWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6082, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6083
 *     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":6084
 *     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":6085
 *     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__261, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6085, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6085, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6084
 *     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":6083
 *     global __cuGraphAddExternalSemaphoresWaitNode
 *     cuPythonInit()
 *     if __cuGraphAddExternalSemaphoresWaitNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddExternalSemaphoresWaitNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6086
 *         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":6087
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6081
 * 
 * cdef CUresult _cuGraphAddExternalSemaphoresWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6080
 *     return err
 * 
 * cdef CUresult _cuGraphAddExternalSemaphoresWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6089
 *     return err
 * 
 * cdef CUresult _cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6089, 1, __PYX_ERR(0, 6089, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6090
 * 
 * cdef CUresult _cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphExternalSemaphoresWaitNodeGetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresWaitNodeGetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6091
 * cdef CUresult _cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6091, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6092
 *     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":6093
 *     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":6094
 *     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__262, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6094, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6094, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6093
 *     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":6092
 *     global __cuGraphExternalSemaphoresWaitNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresWaitNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6095
 *         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":6096
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6090
 * 
 * cdef CUresult _cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6089
 *     return err
 * 
 * cdef CUresult _cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6098
 *     return err
 * 
 * cdef CUresult _cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6098, 1, __PYX_ERR(0, 6098, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6099
 * 
 * cdef CUresult _cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphExternalSemaphoresWaitNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresWaitNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6100
 * cdef CUresult _cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6100, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6101
 *     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":6102
 *     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":6103
 *     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__263, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6103, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6103, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6102
 *     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":6101
 *     global __cuGraphExternalSemaphoresWaitNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExternalSemaphoresWaitNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6104
 *         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":6105
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6099
 * 
 * cdef CUresult _cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6098
 *     return err
 * 
 * cdef CUresult _cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6107
 *     return err
 * 
 * cdef CUresult _cuGraphAddBatchMemOpNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6107, 1, __PYX_ERR(0, 6107, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6108
 * 
 * cdef CUresult _cuGraphAddBatchMemOpNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphAddBatchMemOpNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddBatchMemOpNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6109
 * cdef CUresult _cuGraphAddBatchMemOpNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6109, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6110
 *     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":6111
 *     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":6112
 *     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__264, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6112, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6112, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6111
 *     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":6110
 *     global __cuGraphAddBatchMemOpNode
 *     cuPythonInit()
 *     if __cuGraphAddBatchMemOpNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddBatchMemOpNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6113
 *         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":6114
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6108
 * 
 * cdef CUresult _cuGraphAddBatchMemOpNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6107
 *     return err
 * 
 * cdef CUresult _cuGraphAddBatchMemOpNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6116
 *     return err
 * 
 * cdef CUresult _cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6116, 1, __PYX_ERR(0, 6116, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6117
 * 
 * cdef CUresult _cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphBatchMemOpNodeGetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphBatchMemOpNodeGetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6118
 * cdef CUresult _cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6118, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6119
 *     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":6120
 *     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":6121
 *     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__265, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6121, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6121, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6120
 *     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":6119
 *     global __cuGraphBatchMemOpNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphBatchMemOpNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphBatchMemOpNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6122
 *         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":6123
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6117
 * 
 * cdef CUresult _cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6116
 *     return err
 * 
 * cdef CUresult _cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6125
 *     return err
 * 
 * cdef CUresult _cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6125, 1, __PYX_ERR(0, 6125, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6126
 * 
 * cdef CUresult _cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphBatchMemOpNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphBatchMemOpNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6127
 * cdef CUresult _cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6127, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6128
 *     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":6129
 *     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":6130
 *     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__266, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6130, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6130, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6129
 *     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":6128
 *     global __cuGraphBatchMemOpNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphBatchMemOpNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphBatchMemOpNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6131
 *         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":6132
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6126
 * 
 * cdef CUresult _cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6125
 *     return err
 * 
 * cdef CUresult _cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6134
 *     return err
 * 
 * cdef CUresult _cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6134, 1, __PYX_ERR(0, 6134, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6135
 * 
 * cdef CUresult _cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphExecBatchMemOpNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecBatchMemOpNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6136
 * cdef CUresult _cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6136, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6137
 *     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":6138
 *     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":6139
 *     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__267, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6139, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6139, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6138
 *     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":6137
 *     global __cuGraphExecBatchMemOpNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecBatchMemOpNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecBatchMemOpNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6140
 *         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":6141
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6135
 * 
 * cdef CUresult _cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6134
 *     return err
 * 
 * cdef CUresult _cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6143
 *     return err
 * 
 * cdef CUresult _cuGraphAddMemAllocNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6143, 1, __PYX_ERR(0, 6143, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6144
 * 
 * cdef CUresult _cuGraphAddMemAllocNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphAddMemAllocNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddMemAllocNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6145
 * cdef CUresult _cuGraphAddMemAllocNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6145, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6146
 *     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":6147
 *     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":6148
 *     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__268, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6148, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6148, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6147
 *     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":6146
 *     global __cuGraphAddMemAllocNode
 *     cuPythonInit()
 *     if __cuGraphAddMemAllocNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemAllocNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6149
 *         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":6150
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6144
 * 
 * cdef CUresult _cuGraphAddMemAllocNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6143
 *     return err
 * 
 * cdef CUresult _cuGraphAddMemAllocNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6152
 *     return err
 * 
 * cdef CUresult _cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6152, 1, __PYX_ERR(0, 6152, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6153
 * 
 * cdef CUresult _cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphMemAllocNodeGetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphMemAllocNodeGetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6154
 * cdef CUresult _cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6154, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6155
 *     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":6156
 *     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":6157
 *     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__269, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6157, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6157, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6156
 *     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":6155
 *     global __cuGraphMemAllocNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphMemAllocNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemAllocNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6158
 *         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":6159
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6153
 * 
 * cdef CUresult _cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6152
 *     return err
 * 
 * cdef CUresult _cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6161
 *     return err
 * 
 * cdef CUresult _cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6161, 1, __PYX_ERR(0, 6161, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6162
 * 
 * cdef CUresult _cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphAddMemFreeNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddMemFreeNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6163
 * cdef CUresult _cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6163, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6164
 *     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":6165
 *     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":6166
 *     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__270, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6166, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6166, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6165
 *     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":6164
 *     global __cuGraphAddMemFreeNode
 *     cuPythonInit()
 *     if __cuGraphAddMemFreeNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddMemFreeNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6167
 *         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":6168
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6162
 * 
 * cdef CUresult _cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6161
 *     return err
 * 
 * cdef CUresult _cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6170
 *     return err
 * 
 * cdef CUresult _cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6170, 1, __PYX_ERR(0, 6170, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6171
 * 
 * cdef CUresult _cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphMemFreeNodeGetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphMemFreeNodeGetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6172
 * cdef CUresult _cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6172, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6173
 *     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":6174
 *     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":6175
 *     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__271, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6175, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6175, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6174
 *     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":6173
 *     global __cuGraphMemFreeNodeGetParams
 *     cuPythonInit()
 *     if __cuGraphMemFreeNodeGetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemFreeNodeGetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6176
 *         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":6177
 *             raise RuntimeError('Function "cuGraphMemFreeNodeGetParams" not found')
 *     err = (<CUresult (*)(CUgraphNode, CUdeviceptr*) nogil> __cuGraphMemFreeNodeGetParams)(hNode, dptr_out)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceGraphMemTrim(CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6171
 * 
 * cdef CUresult _cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6170
 *     return err
 * 
 * cdef CUresult _cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6179
 *     return err
 * 
 * cdef CUresult _cuDeviceGraphMemTrim(CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6179, 1, __PYX_ERR(0, 6179, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6180
 * 
 * cdef CUresult _cuDeviceGraphMemTrim(CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDeviceGraphMemTrim             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGraphMemTrim == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6181
 * cdef CUresult _cuDeviceGraphMemTrim(CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6181, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6182
 *     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":6183
 *     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":6184
 *     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__272, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6184, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6184, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6183
 *     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":6182
 *     global __cuDeviceGraphMemTrim
 *     cuPythonInit()
 *     if __cuDeviceGraphMemTrim == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGraphMemTrim" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6185
 *         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":6186
 *             raise RuntimeError('Function "cuDeviceGraphMemTrim" not found')
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDeviceGraphMemTrim)(device)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6180
 * 
 * cdef CUresult _cuDeviceGraphMemTrim(CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6179
 *     return err
 * 
 * cdef CUresult _cuDeviceGraphMemTrim(CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6188
 *     return err
 * 
 * cdef CUresult _cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6188, 1, __PYX_ERR(0, 6188, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6189
 * 
 * cdef CUresult _cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDeviceGetGraphMemAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetGraphMemAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6190
 * cdef CUresult _cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6190, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6191
 *     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":6192
 *     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":6193
 *     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__273, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6193, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6193, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6192
 *     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":6191
 *     global __cuDeviceGetGraphMemAttribute
 *     cuPythonInit()
 *     if __cuDeviceGetGraphMemAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetGraphMemAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6194
 *         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":6195
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6189
 * 
 * cdef CUresult _cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6188
 *     return err
 * 
 * cdef CUresult _cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6197
 *     return err
 * 
 * cdef CUresult _cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6197, 1, __PYX_ERR(0, 6197, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6198
 * 
 * cdef CUresult _cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDeviceSetGraphMemAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceSetGraphMemAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6199
 * cdef CUresult _cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6199, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6200
 *     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":6201
 *     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":6202
 *     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__274, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6202, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6202, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6201
 *     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":6200
 *     global __cuDeviceSetGraphMemAttribute
 *     cuPythonInit()
 *     if __cuDeviceSetGraphMemAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceSetGraphMemAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6203
 *         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":6204
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6198
 * 
 * cdef CUresult _cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6197
 *     return err
 * 
 * cdef CUresult _cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6206
 *     return err
 * 
 * cdef CUresult _cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6206, 1, __PYX_ERR(0, 6206, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6207
 * 
 * cdef CUresult _cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphClone             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphClone == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6208
 * cdef CUresult _cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6208, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6209
 *     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":6210
 *     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":6211
 *     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__275, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6211, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6211, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6210
 *     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":6209
 *     global __cuGraphClone
 *     cuPythonInit()
 *     if __cuGraphClone == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphClone" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6212
 *         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":6213
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6207
 * 
 * cdef CUresult _cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6206
 *     return err
 * 
 * cdef CUresult _cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6215
 *     return err
 * 
 * cdef CUresult _cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6215, 1, __PYX_ERR(0, 6215, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6216
 * 
 * cdef CUresult _cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphNodeFindInClone             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphNodeFindInClone == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6217
 * cdef CUresult _cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6217, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6218
 *     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":6219
 *     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":6220
 *     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__276, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6220, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6220, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6219
 *     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":6218
 *     global __cuGraphNodeFindInClone
 *     cuPythonInit()
 *     if __cuGraphNodeFindInClone == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeFindInClone" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6221
 *         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":6222
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6216
 * 
 * cdef CUresult _cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6215
 *     return err
 * 
 * cdef CUresult _cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6224
 *     return err
 * 
 * cdef CUresult _cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6224, 1, __PYX_ERR(0, 6224, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6225
 * 
 * cdef CUresult _cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphNodeGetType             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphNodeGetType == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6226
 * cdef CUresult _cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6226, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6227
 *     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":6228
 *     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":6229
 *     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__277, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6229, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6229, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6228
 *     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":6227
 *     global __cuGraphNodeGetType
 *     cuPythonInit()
 *     if __cuGraphNodeGetType == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetType" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6230
 *         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":6231
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6225
 * 
 * cdef CUresult _cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6224
 *     return err
 * 
 * cdef CUresult _cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6233
 *     return err
 * 
 * cdef CUresult _cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6233, 1, __PYX_ERR(0, 6233, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6234
 * 
 * cdef CUresult _cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphGetNodes             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphGetNodes == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6235
 * cdef CUresult _cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6235, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6236
 *     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":6237
 *     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":6238
 *     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__278, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6238, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6238, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6237
 *     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":6236
 *     global __cuGraphGetNodes
 *     cuPythonInit()
 *     if __cuGraphGetNodes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphGetNodes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6239
 *         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":6240
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6234
 * 
 * cdef CUresult _cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6233
 *     return err
 * 
 * cdef CUresult _cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6242
 *     return err
 * 
 * cdef CUresult _cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6242, 1, __PYX_ERR(0, 6242, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6243
 * 
 * cdef CUresult _cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphGetRootNodes             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphGetRootNodes == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6244
 * cdef CUresult _cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6244, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6245
 *     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":6246
 *     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":6247
 *     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__279, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6247, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6247, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6246
 *     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":6245
 *     global __cuGraphGetRootNodes
 *     cuPythonInit()
 *     if __cuGraphGetRootNodes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphGetRootNodes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6248
 *         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":6249
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6243
 * 
 * cdef CUresult _cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6242
 *     return err
 * 
 * cdef CUresult _cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6251
 *     return err
 * 
 * cdef CUresult _cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6251, 1, __PYX_ERR(0, 6251, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6252
 * 
 * cdef CUresult _cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphGetEdges             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphGetEdges == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6253
 * cdef CUresult _cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6253, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6254
 *     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":6255
 *     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":6256
 *     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__280, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6256, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6256, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6255
 *     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":6254
 *     global __cuGraphGetEdges
 *     cuPythonInit()
 *     if __cuGraphGetEdges == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphGetEdges" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6257
 *         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":6258
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6252
 * 
 * cdef CUresult _cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6251
 *     return err
 * 
 * cdef CUresult _cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6260
 *     return err
 * 
 * cdef CUresult _cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6260, 1, __PYX_ERR(0, 6260, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6261
 * 
 * cdef CUresult _cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphNodeGetDependencies             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphNodeGetDependencies == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6262
 * cdef CUresult _cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6262, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6263
 *     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":6264
 *     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":6265
 *     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__281, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6265, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6265, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6264
 *     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":6263
 *     global __cuGraphNodeGetDependencies
 *     cuPythonInit()
 *     if __cuGraphNodeGetDependencies == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetDependencies" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6266
 *         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":6267
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6261
 * 
 * cdef CUresult _cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6260
 *     return err
 * 
 * cdef CUresult _cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6269
 *     return err
 * 
 * cdef CUresult _cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6269, 1, __PYX_ERR(0, 6269, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6270
 * 
 * cdef CUresult _cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphNodeGetDependentNodes             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphNodeGetDependentNodes == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6271
 * cdef CUresult _cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6271, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6272
 *     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":6273
 *     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":6274
 *     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__282, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6274, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6274, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6273
 *     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":6272
 *     global __cuGraphNodeGetDependentNodes
 *     cuPythonInit()
 *     if __cuGraphNodeGetDependentNodes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetDependentNodes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6275
 *         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":6276
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6270
 * 
 * cdef CUresult _cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6269
 *     return err
 * 
 * cdef CUresult _cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6278
 *     return err
 * 
 * cdef CUresult _cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6278, 1, __PYX_ERR(0, 6278, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6279
 * 
 * cdef CUresult _cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphAddDependencies             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphAddDependencies == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6280
 * cdef CUresult _cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6280, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6281
 *     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":6282
 *     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":6283
 *     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__283, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6283, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6283, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6282
 *     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":6281
 *     global __cuGraphAddDependencies
 *     cuPythonInit()
 *     if __cuGraphAddDependencies == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddDependencies" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6284
 *         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":6285
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6279
 * 
 * cdef CUresult _cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6278
 *     return err
 * 
 * cdef CUresult _cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6287
 *     return err
 * 
 * cdef CUresult _cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6287, 1, __PYX_ERR(0, 6287, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6288
 * 
 * cdef CUresult _cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphRemoveDependencies             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphRemoveDependencies == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6289
 * cdef CUresult _cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6289, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6290
 *     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":6291
 *     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":6292
 *     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__284, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6292, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6292, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6291
 *     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":6290
 *     global __cuGraphRemoveDependencies
 *     cuPythonInit()
 *     if __cuGraphRemoveDependencies == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphRemoveDependencies" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6293
 *         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":6294
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6288
 * 
 * cdef CUresult _cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6287
 *     return err
 * 
 * cdef CUresult _cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6296
 *     return err
 * 
 * cdef CUresult _cuGraphDestroyNode(CUgraphNode hNode) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6296, 1, __PYX_ERR(0, 6296, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6297
 * 
 * cdef CUresult _cuGraphDestroyNode(CUgraphNode hNode) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphDestroyNode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphDestroyNode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6298
 * cdef CUresult _cuGraphDestroyNode(CUgraphNode hNode) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6298, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6299
 *     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":6300
 *     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":6301
 *     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__285, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6301, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6301, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6300
 *     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":6299
 *     global __cuGraphDestroyNode
 *     cuPythonInit()
 *     if __cuGraphDestroyNode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDestroyNode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6302
 *         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":6303
 *             raise RuntimeError('Function "cuGraphDestroyNode" not found')
 *     err = (<CUresult (*)(CUgraphNode) nogil> __cuGraphDestroyNode)(hNode)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphInstantiate_v2(CUgraphExec* phGraphExec, CUgraph hGraph, CUgraphNode* phErrorNode, char* logBuffer, size_t bufferSize) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6297
 * 
 * cdef CUresult _cuGraphDestroyNode(CUgraphNode hNode) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6296
 *     return err
 * 
 * cdef CUresult _cuGraphDestroyNode(CUgraphNode hNode) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6305
 *     return err
 * 
 * cdef CUresult _cuGraphInstantiate_v2(CUgraphExec* phGraphExec, CUgraph hGraph, CUgraphNode* phErrorNode, char* logBuffer, size_t bufferSize) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphInstantiate_v2
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphInstantiate_v2(CUgraphExec *__pyx_v_phGraphExec, CUgraph __pyx_v_hGraph, CUgraphNode *__pyx_v_phErrorNode, char *__pyx_v_logBuffer, size_t __pyx_v_bufferSize) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuGraphInstantiate_v2", 1);
  __Pyx_TraceCall("_cuGraphInstantiate_v2", __pyx_f[0], 6305, 1, __PYX_ERR(0, 6305, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6306
 * 
 * cdef CUresult _cuGraphInstantiate_v2(CUgraphExec* phGraphExec, CUgraph hGraph, CUgraphNode* phErrorNode, char* logBuffer, size_t bufferSize) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphInstantiate_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphInstantiate_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6307
 * cdef CUresult _cuGraphInstantiate_v2(CUgraphExec* phGraphExec, CUgraph hGraph, CUgraphNode* phErrorNode, char* logBuffer, size_t bufferSize) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphInstantiate_v2
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphInstantiate_v2 == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6307, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6308
 *     global __cuGraphInstantiate_v2
 *     cuPythonInit()
 *     if __cuGraphInstantiate_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphInstantiate_v2" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphInstantiate_v2 == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6309
 *     cuPythonInit()
 *     if __cuGraphInstantiate_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphInstantiate_v2" not found')
 *     err = (<CUresult (*)(CUgraphExec*, CUgraph, CUgraphNode*, char*, size_t) nogil> __cuGraphInstantiate_v2)(phGraphExec, hGraph, phErrorNode, logBuffer, bufferSize)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6310
 *     if __cuGraphInstantiate_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphInstantiate_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec*, CUgraph, CUgraphNode*, char*, size_t) nogil> __cuGraphInstantiate_v2)(phGraphExec, hGraph, phErrorNode, logBuffer, bufferSize)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__286, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6310, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6310, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6309
 *     cuPythonInit()
 *     if __cuGraphInstantiate_v2 == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphInstantiate_v2" not found')
 *     err = (<CUresult (*)(CUgraphExec*, CUgraph, CUgraphNode*, char*, size_t) nogil> __cuGraphInstantiate_v2)(phGraphExec, hGraph, phErrorNode, logBuffer, bufferSize)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6308
 *     global __cuGraphInstantiate_v2
 *     cuPythonInit()
 *     if __cuGraphInstantiate_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphInstantiate_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6311
 *         with gil:
 *             raise RuntimeError('Function "cuGraphInstantiate_v2" not found')
 *     err = (<CUresult (*)(CUgraphExec*, CUgraph, CUgraphNode*, char*, size_t) nogil> __cuGraphInstantiate_v2)(phGraphExec, hGraph, phErrorNode, logBuffer, bufferSize)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphExec *, CUgraph, CUgraphNode *, char *, size_t))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphInstantiate_v2)(__pyx_v_phGraphExec, __pyx_v_hGraph, __pyx_v_phErrorNode, __pyx_v_logBuffer, __pyx_v_bufferSize);

    /* "cuda/_cuda/ccuda.pyx":6312
 *             raise RuntimeError('Function "cuGraphInstantiate_v2" not found')
 *     err = (<CUresult (*)(CUgraphExec*, CUgraph, CUgraphNode*, char*, size_t) nogil> __cuGraphInstantiate_v2)(phGraphExec, hGraph, phErrorNode, logBuffer, bufferSize)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphInstantiateWithFlags(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6306
 * 
 * cdef CUresult _cuGraphInstantiate_v2(CUgraphExec* phGraphExec, CUgraph hGraph, CUgraphNode* phErrorNode, char* logBuffer, size_t bufferSize) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphInstantiate_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphInstantiate_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":6305
 *     return err
 * 
 * cdef CUresult _cuGraphInstantiate_v2(CUgraphExec* phGraphExec, CUgraph hGraph, CUgraphNode* phErrorNode, char* logBuffer, size_t bufferSize) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphInstantiate_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._cuGraphInstantiate_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":6314
 *     return err
 * 
 * cdef CUresult _cuGraphInstantiateWithFlags(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6314, 1, __PYX_ERR(0, 6314, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6315
 * 
 * cdef CUresult _cuGraphInstantiateWithFlags(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphInstantiateWithFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphInstantiateWithFlags == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6316
 * cdef CUresult _cuGraphInstantiateWithFlags(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6316, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6317
 *     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":6318
 *     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":6319
 *     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__287, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6319, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6319, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6318
 *     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":6317
 *     global __cuGraphInstantiateWithFlags
 *     cuPythonInit()
 *     if __cuGraphInstantiateWithFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphInstantiateWithFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6320
 *         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":6321
 *             raise RuntimeError('Function "cuGraphInstantiateWithFlags" not found')
 *     err = (<CUresult (*)(CUgraphExec*, CUgraph, unsigned long long) nogil> __cuGraphInstantiateWithFlags)(phGraphExec, hGraph, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphExecKernelNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6315
 * 
 * cdef CUresult _cuGraphInstantiateWithFlags(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6314
 *     return err
 * 
 * cdef CUresult _cuGraphInstantiateWithFlags(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6323
 *     return err
 * 
 * cdef CUresult _cuGraphExecKernelNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecKernelNodeSetParams
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecKernelNodeSetParams(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", 1);
  __Pyx_TraceCall("_cuGraphExecKernelNodeSetParams", __pyx_f[0], 6323, 1, __PYX_ERR(0, 6323, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6324
 * 
 * cdef CUresult _cuGraphExecKernelNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphExecKernelNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecKernelNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6325
 * cdef CUresult _cuGraphExecKernelNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphExecKernelNodeSetParams
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphExecKernelNodeSetParams == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6325, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6326
 *     global __cuGraphExecKernelNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecKernelNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecKernelNodeSetParams" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecKernelNodeSetParams == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6327
 *     cuPythonInit()
 *     if __cuGraphExecKernelNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecKernelNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphExecKernelNodeSetParams)(hGraphExec, hNode, nodeParams)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6328
 *     if __cuGraphExecKernelNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecKernelNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphExecKernelNodeSetParams)(hGraphExec, hNode, nodeParams)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__288, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6328, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6328, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6327
 *     cuPythonInit()
 *     if __cuGraphExecKernelNodeSetParams == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecKernelNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphExecKernelNodeSetParams)(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":6326
 *     global __cuGraphExecKernelNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecKernelNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecKernelNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6329
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecKernelNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphExecKernelNodeSetParams)(hGraphExec, hNode, nodeParams)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphExec, CUgraphNode, CUDA_KERNEL_NODE_PARAMS const *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecKernelNodeSetParams)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams);

    /* "cuda/_cuda/ccuda.pyx":6330
 *             raise RuntimeError('Function "cuGraphExecKernelNodeSetParams" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphExecKernelNodeSetParams)(hGraphExec, hNode, nodeParams)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6324
 * 
 * cdef CUresult _cuGraphExecKernelNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphExecKernelNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecKernelNodeSetParams == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6323
 *     return err
 * 
 * cdef CUresult _cuGraphExecKernelNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecKernelNodeSetParams
 *     cuPythonInit()
 */

  /* function 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", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6332
 *     return err
 * 
 * cdef CUresult _cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6332, 1, __PYX_ERR(0, 6332, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6333
 * 
 * cdef CUresult _cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphExecMemcpyNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecMemcpyNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6334
 * cdef CUresult _cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6334, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6335
 *     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":6336
 *     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":6337
 *     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__289, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6337, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6337, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6336
 *     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":6335
 *     global __cuGraphExecMemcpyNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecMemcpyNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecMemcpyNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6338
 *         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":6339
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6333
 * 
 * cdef CUresult _cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6332
 *     return err
 * 
 * cdef CUresult _cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6341
 *     return err
 * 
 * cdef CUresult _cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6341, 1, __PYX_ERR(0, 6341, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6342
 * 
 * cdef CUresult _cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphExecMemsetNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecMemsetNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6343
 * cdef CUresult _cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6343, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6344
 *     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":6345
 *     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":6346
 *     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__290, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6346, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6346, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6345
 *     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":6344
 *     global __cuGraphExecMemsetNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecMemsetNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecMemsetNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6347
 *         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":6348
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6342
 * 
 * cdef CUresult _cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6341
 *     return err
 * 
 * cdef CUresult _cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6350
 *     return err
 * 
 * cdef CUresult _cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6350, 1, __PYX_ERR(0, 6350, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6351
 * 
 * cdef CUresult _cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphExecHostNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecHostNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6352
 * cdef CUresult _cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6352, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6353
 *     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":6354
 *     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":6355
 *     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__291, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6355, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6355, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6354
 *     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":6353
 *     global __cuGraphExecHostNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecHostNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecHostNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6356
 *         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":6357
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6351
 * 
 * cdef CUresult _cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6350
 *     return err
 * 
 * cdef CUresult _cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6359
 *     return err
 * 
 * cdef CUresult _cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6359, 1, __PYX_ERR(0, 6359, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6360
 * 
 * cdef CUresult _cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphExecChildGraphNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecChildGraphNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6361
 * cdef CUresult _cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6361, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6362
 *     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":6363
 *     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":6364
 *     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__292, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6364, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6364, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6363
 *     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":6362
 *     global __cuGraphExecChildGraphNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecChildGraphNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecChildGraphNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6365
 *         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":6366
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6360
 * 
 * cdef CUresult _cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6359
 *     return err
 * 
 * cdef CUresult _cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6368
 *     return err
 * 
 * cdef CUresult _cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6368, 1, __PYX_ERR(0, 6368, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6369
 * 
 * cdef CUresult _cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphExecEventRecordNodeSetEvent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecEventRecordNodeSetEvent == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6370
 * cdef CUresult _cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6370, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6371
 *     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":6372
 *     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":6373
 *     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__293, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6373, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6373, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6372
 *     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":6371
 *     global __cuGraphExecEventRecordNodeSetEvent
 *     cuPythonInit()
 *     if __cuGraphExecEventRecordNodeSetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecEventRecordNodeSetEvent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6374
 *         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":6375
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6369
 * 
 * cdef CUresult _cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6368
 *     return err
 * 
 * cdef CUresult _cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6377
 *     return err
 * 
 * cdef CUresult _cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6377, 1, __PYX_ERR(0, 6377, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6378
 * 
 * cdef CUresult _cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphExecEventWaitNodeSetEvent             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecEventWaitNodeSetEvent == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6379
 * cdef CUresult _cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6379, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6380
 *     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":6381
 *     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":6382
 *     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__294, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6382, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6382, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6381
 *     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":6380
 *     global __cuGraphExecEventWaitNodeSetEvent
 *     cuPythonInit()
 *     if __cuGraphExecEventWaitNodeSetEvent == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecEventWaitNodeSetEvent" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6383
 *         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":6384
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6378
 * 
 * cdef CUresult _cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6377
 *     return err
 * 
 * cdef CUresult _cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6386
 *     return err
 * 
 * cdef CUresult _cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6386, 1, __PYX_ERR(0, 6386, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6387
 * 
 * cdef CUresult _cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphExecExternalSemaphoresSignalNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecExternalSemaphoresSignalNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6388
 * cdef CUresult _cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6388, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6389
 *     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":6390
 *     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":6391
 *     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__295, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6391, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6391, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6390
 *     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":6389
 *     global __cuGraphExecExternalSemaphoresSignalNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecExternalSemaphoresSignalNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecExternalSemaphoresSignalNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6392
 *         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":6393
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6387
 * 
 * cdef CUresult _cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6386
 *     return err
 * 
 * cdef CUresult _cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6395
 *     return err
 * 
 * cdef CUresult _cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6395, 1, __PYX_ERR(0, 6395, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6396
 * 
 * cdef CUresult _cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphExecExternalSemaphoresWaitNodeSetParams             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecExternalSemaphoresWaitNodeSetParams == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6397
 * cdef CUresult _cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6397, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6398
 *     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":6399
 *     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":6400
 *     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__296, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6400, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6400, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6399
 *     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":6398
 *     global __cuGraphExecExternalSemaphoresWaitNodeSetParams
 *     cuPythonInit()
 *     if __cuGraphExecExternalSemaphoresWaitNodeSetParams == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecExternalSemaphoresWaitNodeSetParams" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6401
 *         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":6402
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6396
 * 
 * cdef CUresult _cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6395
 *     return err
 * 
 * cdef CUresult _cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6404
 *     return err
 * 
 * cdef CUresult _cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6404, 1, __PYX_ERR(0, 6404, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6405
 * 
 * cdef CUresult _cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphNodeSetEnabled             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphNodeSetEnabled == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6406
 * cdef CUresult _cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6406, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6407
 *     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":6408
 *     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":6409
 *     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__297, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6409, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6409, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6408
 *     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":6407
 *     global __cuGraphNodeSetEnabled
 *     cuPythonInit()
 *     if __cuGraphNodeSetEnabled == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeSetEnabled" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6410
 *         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":6411
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6405
 * 
 * cdef CUresult _cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6404
 *     return err
 * 
 * cdef CUresult _cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6413
 *     return err
 * 
 * cdef CUresult _cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6413, 1, __PYX_ERR(0, 6413, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6414
 * 
 * cdef CUresult _cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphNodeGetEnabled             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphNodeGetEnabled == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6415
 * cdef CUresult _cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6415, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6416
 *     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":6417
 *     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":6418
 *     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__298, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6418, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6418, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6417
 *     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":6416
 *     global __cuGraphNodeGetEnabled
 *     cuPythonInit()
 *     if __cuGraphNodeGetEnabled == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetEnabled" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6419
 *         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":6420
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6414
 * 
 * cdef CUresult _cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6413
 *     return err
 * 
 * cdef CUresult _cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6422
 *     return err
 * 
 * cdef CUresult _cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6422, 1, __PYX_ERR(0, 6422, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6423
 * 
 * cdef CUresult _cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphUpload             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphUpload == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6424
 * cdef CUresult _cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6424, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6425
 *     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":6426
 *     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":6427
 *     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__299, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6427, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6427, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6426
 *     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":6425
 *     global __cuGraphUpload
 *     cuPythonInit()
 *     if __cuGraphUpload == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphUpload" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6428
 *         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":6429
 *             raise RuntimeError('Function "cuGraphUpload" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUstream) nogil> __cuGraphUpload)(hGraphExec, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6423
 * 
 * cdef CUresult _cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6422
 *     return err
 * 
 * cdef CUresult _cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6431
 *     return err
 * 
 * cdef CUresult _cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6431, 1, __PYX_ERR(0, 6431, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6432
 * 
 * cdef CUresult _cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphLaunch             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphLaunch == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6433
 * cdef CUresult _cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6433, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6434
 *     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":6435
 *     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":6436
 *     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__300, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6436, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6436, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6435
 *     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":6434
 *     global __cuGraphLaunch
 *     cuPythonInit()
 *     if __cuGraphLaunch == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphLaunch" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6437
 *         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":6438
 *             raise RuntimeError('Function "cuGraphLaunch" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUstream) nogil> __cuGraphLaunch)(hGraphExec, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphExecDestroy(CUgraphExec hGraphExec) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6432
 * 
 * cdef CUresult _cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6431
 *     return err
 * 
 * cdef CUresult _cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6440
 *     return err
 * 
 * cdef CUresult _cuGraphExecDestroy(CUgraphExec hGraphExec) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6440, 1, __PYX_ERR(0, 6440, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6441
 * 
 * cdef CUresult _cuGraphExecDestroy(CUgraphExec hGraphExec) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphExecDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6442
 * cdef CUresult _cuGraphExecDestroy(CUgraphExec hGraphExec) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6442, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6443
 *     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":6444
 *     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":6445
 *     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__301, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6445, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6445, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6444
 *     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":6443
 *     global __cuGraphExecDestroy
 *     cuPythonInit()
 *     if __cuGraphExecDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6446
 *         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":6447
 *             raise RuntimeError('Function "cuGraphExecDestroy" not found')
 *     err = (<CUresult (*)(CUgraphExec) nogil> __cuGraphExecDestroy)(hGraphExec)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphDestroy(CUgraph hGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6441
 * 
 * cdef CUresult _cuGraphExecDestroy(CUgraphExec hGraphExec) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6440
 *     return err
 * 
 * cdef CUresult _cuGraphExecDestroy(CUgraphExec hGraphExec) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6449
 *     return err
 * 
 * cdef CUresult _cuGraphDestroy(CUgraph hGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6449, 1, __PYX_ERR(0, 6449, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6450
 * 
 * cdef CUresult _cuGraphDestroy(CUgraph hGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6451
 * cdef CUresult _cuGraphDestroy(CUgraph hGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6451, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6452
 *     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":6453
 *     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":6454
 *     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__302, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6454, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6454, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6453
 *     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":6452
 *     global __cuGraphDestroy
 *     cuPythonInit()
 *     if __cuGraphDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6455
 *         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":6456
 *             raise RuntimeError('Function "cuGraphDestroy" not found')
 *     err = (<CUresult (*)(CUgraph) nogil> __cuGraphDestroy)(hGraph)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphExecUpdate(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphNode* hErrorNode_out, CUgraphExecUpdateResult* updateResult_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6450
 * 
 * cdef CUresult _cuGraphDestroy(CUgraph hGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6449
 *     return err
 * 
 * cdef CUresult _cuGraphDestroy(CUgraph hGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6458
 *     return err
 * 
 * cdef CUresult _cuGraphExecUpdate(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphNode* hErrorNode_out, CUgraphExecUpdateResult* updateResult_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecUpdate
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecUpdate(CUgraphExec __pyx_v_hGraphExec, CUgraph __pyx_v_hGraph, CUgraphNode *__pyx_v_hErrorNode_out, CUgraphExecUpdateResult *__pyx_v_updateResult_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("_cuGraphExecUpdate", 1);
  __Pyx_TraceCall("_cuGraphExecUpdate", __pyx_f[0], 6458, 1, __PYX_ERR(0, 6458, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6459
 * 
 * cdef CUresult _cuGraphExecUpdate(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphNode* hErrorNode_out, CUgraphExecUpdateResult* updateResult_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphExecUpdate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecUpdate == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6460
 * cdef CUresult _cuGraphExecUpdate(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphNode* hErrorNode_out, CUgraphExecUpdateResult* updateResult_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphExecUpdate
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGraphExecUpdate == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6460, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6461
 *     global __cuGraphExecUpdate
 *     cuPythonInit()
 *     if __cuGraphExecUpdate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecUpdate" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecUpdate == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":6462
 *     cuPythonInit()
 *     if __cuGraphExecUpdate == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecUpdate" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraph, CUgraphNode*, CUgraphExecUpdateResult*) nogil> __cuGraphExecUpdate)(hGraphExec, hGraph, hErrorNode_out, updateResult_out)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":6463
 *     if __cuGraphExecUpdate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecUpdate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraph, CUgraphNode*, CUgraphExecUpdateResult*) nogil> __cuGraphExecUpdate)(hGraphExec, hGraph, hErrorNode_out, updateResult_out)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__303, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6463, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6463, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6462
 *     cuPythonInit()
 *     if __cuGraphExecUpdate == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGraphExecUpdate" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraph, CUgraphNode*, CUgraphExecUpdateResult*) nogil> __cuGraphExecUpdate)(hGraphExec, hGraph, hErrorNode_out, updateResult_out)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":6461
 *     global __cuGraphExecUpdate
 *     cuPythonInit()
 *     if __cuGraphExecUpdate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecUpdate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6464
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecUpdate" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraph, CUgraphNode*, CUgraphExecUpdateResult*) nogil> __cuGraphExecUpdate)(hGraphExec, hGraph, hErrorNode_out, updateResult_out)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(CUgraphExec, CUgraph, CUgraphNode *, CUgraphExecUpdateResult *))__pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecUpdate)(__pyx_v_hGraphExec, __pyx_v_hGraph, __pyx_v_hErrorNode_out, __pyx_v_updateResult_out);

    /* "cuda/_cuda/ccuda.pyx":6465
 *             raise RuntimeError('Function "cuGraphExecUpdate" not found')
 *     err = (<CUresult (*)(CUgraphExec, CUgraph, CUgraphNode*, CUgraphExecUpdateResult*) nogil> __cuGraphExecUpdate)(hGraphExec, hGraph, hErrorNode_out, updateResult_out)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6459
 * 
 * cdef CUresult _cuGraphExecUpdate(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphNode* hErrorNode_out, CUgraphExecUpdateResult* updateResult_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphExecUpdate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphExecUpdate == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":6458
 *     return err
 * 
 * cdef CUresult _cuGraphExecUpdate(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphNode* hErrorNode_out, CUgraphExecUpdateResult* updateResult_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGraphExecUpdate
 *     cuPythonInit()
 */

  /* function 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", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":6467
 *     return err
 * 
 * cdef CUresult _cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6467, 1, __PYX_ERR(0, 6467, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6468
 * 
 * cdef CUresult _cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphKernelNodeCopyAttributes             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphKernelNodeCopyAttributes == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6469
 * cdef CUresult _cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6469, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6470
 *     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":6471
 *     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":6472
 *     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__304, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6472, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6472, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6471
 *     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":6470
 *     global __cuGraphKernelNodeCopyAttributes
 *     cuPythonInit()
 *     if __cuGraphKernelNodeCopyAttributes == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeCopyAttributes" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6473
 *         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":6474
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6468
 * 
 * cdef CUresult _cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6467
 *     return err
 * 
 * cdef CUresult _cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6476
 *     return err
 * 
 * cdef CUresult _cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6476, 1, __PYX_ERR(0, 6476, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6477
 * 
 * cdef CUresult _cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphKernelNodeGetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphKernelNodeGetAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6478
 * cdef CUresult _cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6478, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6479
 *     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":6480
 *     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":6481
 *     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__305, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6481, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6481, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6480
 *     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":6479
 *     global __cuGraphKernelNodeGetAttribute
 *     cuPythonInit()
 *     if __cuGraphKernelNodeGetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeGetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6482
 *         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":6483
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6477
 * 
 * cdef CUresult _cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6476
 *     return err
 * 
 * cdef CUresult _cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6485
 *     return err
 * 
 * cdef CUresult _cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6485, 1, __PYX_ERR(0, 6485, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6486
 * 
 * cdef CUresult _cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphKernelNodeSetAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphKernelNodeSetAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6487
 * cdef CUresult _cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6487, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6488
 *     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":6489
 *     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":6490
 *     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__306, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6490, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6490, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6489
 *     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":6488
 *     global __cuGraphKernelNodeSetAttribute
 *     cuPythonInit()
 *     if __cuGraphKernelNodeSetAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeSetAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6491
 *         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":6492
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6486
 * 
 * cdef CUresult _cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6485
 *     return err
 * 
 * cdef CUresult _cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6494
 *     return err
 * 
 * cdef CUresult _cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6494, 1, __PYX_ERR(0, 6494, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6495
 * 
 * cdef CUresult _cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphDebugDotPrint             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphDebugDotPrint == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6496
 * cdef CUresult _cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6496, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6497
 *     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":6498
 *     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":6499
 *     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__307, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6499, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6499, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6498
 *     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":6497
 *     global __cuGraphDebugDotPrint
 *     cuPythonInit()
 *     if __cuGraphDebugDotPrint == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDebugDotPrint" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6500
 *         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":6501
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6495
 * 
 * cdef CUresult _cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6494
 *     return err
 * 
 * cdef CUresult _cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6503
 *     return err
 * 
 * cdef CUresult _cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6503, 1, __PYX_ERR(0, 6503, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6504
 * 
 * cdef CUresult _cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuUserObjectCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuUserObjectCreate == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6505
 * cdef CUresult _cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6505, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6506
 *     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":6507
 *     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":6508
 *     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__308, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6508, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6508, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6507
 *     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":6506
 *     global __cuUserObjectCreate
 *     cuPythonInit()
 *     if __cuUserObjectCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6509
 *         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":6510
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6504
 * 
 * cdef CUresult _cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6503
 *     return err
 * 
 * cdef CUresult _cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6512
 *     return err
 * 
 * cdef CUresult _cuUserObjectRetain(CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6512, 1, __PYX_ERR(0, 6512, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6513
 * 
 * cdef CUresult _cuUserObjectRetain(CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuUserObjectRetain             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuUserObjectRetain == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6514
 * cdef CUresult _cuUserObjectRetain(CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6514, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6515
 *     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":6516
 *     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":6517
 *     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__309, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6517, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6517, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6516
 *     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":6515
 *     global __cuUserObjectRetain
 *     cuPythonInit()
 *     if __cuUserObjectRetain == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectRetain" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6518
 *         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":6519
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6513
 * 
 * cdef CUresult _cuUserObjectRetain(CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6512
 *     return err
 * 
 * cdef CUresult _cuUserObjectRetain(CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6521
 *     return err
 * 
 * cdef CUresult _cuUserObjectRelease(CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6521, 1, __PYX_ERR(0, 6521, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6522
 * 
 * cdef CUresult _cuUserObjectRelease(CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuUserObjectRelease             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuUserObjectRelease == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6523
 * cdef CUresult _cuUserObjectRelease(CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6523, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6524
 *     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":6525
 *     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":6526
 *     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__310, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6526, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6526, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6525
 *     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":6524
 *     global __cuUserObjectRelease
 *     cuPythonInit()
 *     if __cuUserObjectRelease == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectRelease" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6527
 *         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":6528
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6522
 * 
 * cdef CUresult _cuUserObjectRelease(CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6521
 *     return err
 * 
 * cdef CUresult _cuUserObjectRelease(CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6530
 *     return err
 * 
 * cdef CUresult _cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6530, 1, __PYX_ERR(0, 6530, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6531
 * 
 * cdef CUresult _cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphRetainUserObject             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphRetainUserObject == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6532
 * cdef CUresult _cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6532, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6533
 *     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":6534
 *     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":6535
 *     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__311, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6535, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6535, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6534
 *     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":6533
 *     global __cuGraphRetainUserObject
 *     cuPythonInit()
 *     if __cuGraphRetainUserObject == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphRetainUserObject" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6536
 *         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":6537
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6531
 * 
 * cdef CUresult _cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6530
 *     return err
 * 
 * cdef CUresult _cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6539
 *     return err
 * 
 * cdef CUresult _cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6539, 1, __PYX_ERR(0, 6539, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6540
 * 
 * cdef CUresult _cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphReleaseUserObject             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphReleaseUserObject == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6541
 * cdef CUresult _cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6541, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6542
 *     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":6543
 *     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":6544
 *     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__312, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6544, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6544, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6543
 *     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":6542
 *     global __cuGraphReleaseUserObject
 *     cuPythonInit()
 *     if __cuGraphReleaseUserObject == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphReleaseUserObject" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6545
 *         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":6546
 *             raise RuntimeError('Function "cuGraphReleaseUserObject" not found')
 *     err = (<CUresult (*)(CUgraph, CUuserObject, unsigned int) nogil> __cuGraphReleaseUserObject)(graph, object, count)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6540
 * 
 * cdef CUresult _cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6539
 *     return err
 * 
 * cdef CUresult _cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6548
 *     return err
 * 
 * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6548, 1, __PYX_ERR(0, 6548, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6549
 * 
 * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuOccupancyMaxActiveBlocksPerMultiprocessor             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuOccupancyMaxActiveBlocksPerMultiprocessor == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6550
 * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6550, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6551
 *     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":6552
 *     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":6553
 *     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__313, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6553, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6553, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6552
 *     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":6551
 *     global __cuOccupancyMaxActiveBlocksPerMultiprocessor
 *     cuPythonInit()
 *     if __cuOccupancyMaxActiveBlocksPerMultiprocessor == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessor" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6554
 *         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":6555
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6549
 * 
 * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6548
 *     return err
 * 
 * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6557
 *     return err
 * 
 * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6557, 1, __PYX_ERR(0, 6557, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6558
 * 
 * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6559
 * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6559, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6560
 *     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":6561
 *     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":6562
 *     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__314, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6562, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6562, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6561
 *     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":6560
 *     global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags
 *     cuPythonInit()
 *     if __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6563
 *         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":6564
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6558
 * 
 * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6557
 *     return err
 * 
 * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6566
 *     return err
 * 
 * cdef CUresult _cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6566, 1, __PYX_ERR(0, 6566, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6567
 * 
 * cdef CUresult _cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuOccupancyMaxPotentialBlockSize             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuOccupancyMaxPotentialBlockSize == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6568
 * cdef CUresult _cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6568, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6569
 *     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":6570
 *     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":6571
 *     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__315, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6571, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6571, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6570
 *     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":6569
 *     global __cuOccupancyMaxPotentialBlockSize
 *     cuPythonInit()
 *     if __cuOccupancyMaxPotentialBlockSize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSize" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6572
 *         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":6573
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6567
 * 
 * cdef CUresult _cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6566
 *     return err
 * 
 * cdef CUresult _cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6575
 *     return err
 * 
 * cdef CUresult _cuOccupancyMaxPotentialBlockSizeWithFlags(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6575, 1, __PYX_ERR(0, 6575, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6576
 * 
 * cdef CUresult _cuOccupancyMaxPotentialBlockSizeWithFlags(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuOccupancyMaxPotentialBlockSizeWithFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuOccupancyMaxPotentialBlockSizeWithFlags == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6577
 * cdef CUresult _cuOccupancyMaxPotentialBlockSizeWithFlags(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6577, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6578
 *     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":6579
 *     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":6580
 *     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__316, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6580, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6580, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6579
 *     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":6578
 *     global __cuOccupancyMaxPotentialBlockSizeWithFlags
 *     cuPythonInit()
 *     if __cuOccupancyMaxPotentialBlockSizeWithFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSizeWithFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6581
 *         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":6582
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6576
 * 
 * cdef CUresult _cuOccupancyMaxPotentialBlockSizeWithFlags(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6575
 *     return err
 * 
 * cdef CUresult _cuOccupancyMaxPotentialBlockSizeWithFlags(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6584
 *     return err
 * 
 * cdef CUresult _cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6584, 1, __PYX_ERR(0, 6584, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6585
 * 
 * cdef CUresult _cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuOccupancyAvailableDynamicSMemPerBlock             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuOccupancyAvailableDynamicSMemPerBlock == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6586
 * cdef CUresult _cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6586, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6587
 *     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":6588
 *     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":6589
 *     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__317, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6589, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6589, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6588
 *     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":6587
 *     global __cuOccupancyAvailableDynamicSMemPerBlock
 *     cuPythonInit()
 *     if __cuOccupancyAvailableDynamicSMemPerBlock == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyAvailableDynamicSMemPerBlock" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6590
 *         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":6591
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6585
 * 
 * cdef CUresult _cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6584
 *     return err
 * 
 * cdef CUresult _cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6593
 *     return err
 * 
 * cdef CUresult _cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6593, 1, __PYX_ERR(0, 6593, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6594
 * 
 * cdef CUresult _cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuOccupancyMaxPotentialClusterSize             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuOccupancyMaxPotentialClusterSize == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6595
 * cdef CUresult _cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6595, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6596
 *     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":6597
 *     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":6598
 *     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__318, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6598, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6598, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6597
 *     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":6596
 *     global __cuOccupancyMaxPotentialClusterSize
 *     cuPythonInit()
 *     if __cuOccupancyMaxPotentialClusterSize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxPotentialClusterSize" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6599
 *         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":6600
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6594
 * 
 * cdef CUresult _cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6593
 *     return err
 * 
 * cdef CUresult _cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6602
 *     return err
 * 
 * cdef CUresult _cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6602, 1, __PYX_ERR(0, 6602, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6603
 * 
 * cdef CUresult _cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuOccupancyMaxActiveClusters             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuOccupancyMaxActiveClusters == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6604
 * cdef CUresult _cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6604, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6605
 *     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":6606
 *     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":6607
 *     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__319, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6607, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6607, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6606
 *     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":6605
 *     global __cuOccupancyMaxActiveClusters
 *     cuPythonInit()
 *     if __cuOccupancyMaxActiveClusters == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuOccupancyMaxActiveClusters" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6608
 *         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":6609
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6603
 * 
 * cdef CUresult _cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6602
 *     return err
 * 
 * cdef CUresult _cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6611
 *     return err
 * 
 * cdef CUresult _cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6611, 1, __PYX_ERR(0, 6611, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6612
 * 
 * cdef CUresult _cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefSetArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetArray == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6613
 * cdef CUresult _cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6613, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6614
 *     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":6615
 *     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":6616
 *     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__320, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6616, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6616, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6615
 *     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":6614
 *     global __cuTexRefSetArray
 *     cuPythonInit()
 *     if __cuTexRefSetArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6617
 *         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":6618
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6612
 * 
 * cdef CUresult _cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6611
 *     return err
 * 
 * cdef CUresult _cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6620
 *     return err
 * 
 * cdef CUresult _cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6620, 1, __PYX_ERR(0, 6620, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6621
 * 
 * cdef CUresult _cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefSetMipmappedArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetMipmappedArray == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6622
 * cdef CUresult _cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6622, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6623
 *     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":6624
 *     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":6625
 *     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__321, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6625, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6625, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6624
 *     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":6623
 *     global __cuTexRefSetMipmappedArray
 *     cuPythonInit()
 *     if __cuTexRefSetMipmappedArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmappedArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6626
 *         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":6627
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6621
 * 
 * cdef CUresult _cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6620
 *     return err
 * 
 * cdef CUresult _cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6629
 *     return err
 * 
 * cdef CUresult _cuTexRefSetAddress_v2(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6629, 1, __PYX_ERR(0, 6629, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6630
 * 
 * cdef CUresult _cuTexRefSetAddress_v2(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefSetAddress_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetAddress_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6631
 * cdef CUresult _cuTexRefSetAddress_v2(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6631, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6632
 *     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":6633
 *     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":6634
 *     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__322, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6634, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6634, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6633
 *     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":6632
 *     global __cuTexRefSetAddress_v2
 *     cuPythonInit()
 *     if __cuTexRefSetAddress_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetAddress_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6635
 *         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":6636
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6630
 * 
 * cdef CUresult _cuTexRefSetAddress_v2(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6629
 *     return err
 * 
 * cdef CUresult _cuTexRefSetAddress_v2(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6638
 *     return err
 * 
 * cdef CUresult _cuTexRefSetAddress2D_v3(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6638, 1, __PYX_ERR(0, 6638, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6639
 * 
 * cdef CUresult _cuTexRefSetAddress2D_v3(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefSetAddress2D_v3             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetAddress2D_v3 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6640
 * cdef CUresult _cuTexRefSetAddress2D_v3(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6640, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6641
 *     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":6642
 *     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":6643
 *     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__323, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6643, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6643, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6642
 *     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":6641
 *     global __cuTexRefSetAddress2D_v3
 *     cuPythonInit()
 *     if __cuTexRefSetAddress2D_v3 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetAddress2D_v3" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6644
 *         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":6645
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6639
 * 
 * cdef CUresult _cuTexRefSetAddress2D_v3(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6638
 *     return err
 * 
 * cdef CUresult _cuTexRefSetAddress2D_v3(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6647
 *     return err
 * 
 * cdef CUresult _cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6647, 1, __PYX_ERR(0, 6647, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6648
 * 
 * cdef CUresult _cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefSetFormat             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetFormat == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6649
 * cdef CUresult _cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6649, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6650
 *     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":6651
 *     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":6652
 *     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__324, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6652, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6652, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6651
 *     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":6650
 *     global __cuTexRefSetFormat
 *     cuPythonInit()
 *     if __cuTexRefSetFormat == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFormat" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6653
 *         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":6654
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6648
 * 
 * cdef CUresult _cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6647
 *     return err
 * 
 * cdef CUresult _cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6656
 *     return err
 * 
 * cdef CUresult _cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6656, 1, __PYX_ERR(0, 6656, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6657
 * 
 * cdef CUresult _cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefSetAddressMode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetAddressMode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6658
 * cdef CUresult _cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6658, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6659
 *     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":6660
 *     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":6661
 *     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__325, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6661, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6661, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6660
 *     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":6659
 *     global __cuTexRefSetAddressMode
 *     cuPythonInit()
 *     if __cuTexRefSetAddressMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetAddressMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6662
 *         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":6663
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6657
 * 
 * cdef CUresult _cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6656
 *     return err
 * 
 * cdef CUresult _cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6665
 *     return err
 * 
 * cdef CUresult _cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6665, 1, __PYX_ERR(0, 6665, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6666
 * 
 * cdef CUresult _cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefSetFilterMode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetFilterMode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6667
 * cdef CUresult _cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6667, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6668
 *     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":6669
 *     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":6670
 *     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__326, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6670, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6670, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6669
 *     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":6668
 *     global __cuTexRefSetFilterMode
 *     cuPythonInit()
 *     if __cuTexRefSetFilterMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFilterMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6671
 *         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":6672
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6666
 * 
 * cdef CUresult _cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6665
 *     return err
 * 
 * cdef CUresult _cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6674
 *     return err
 * 
 * cdef CUresult _cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6674, 1, __PYX_ERR(0, 6674, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6675
 * 
 * cdef CUresult _cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefSetMipmapFilterMode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapFilterMode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6676
 * cdef CUresult _cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6676, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6677
 *     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":6678
 *     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":6679
 *     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__327, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6679, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6679, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6678
 *     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":6677
 *     global __cuTexRefSetMipmapFilterMode
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapFilterMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapFilterMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6680
 *         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":6681
 *             raise RuntimeError('Function "cuTexRefSetMipmapFilterMode" not found')
 *     err = (<CUresult (*)(CUtexref, CUfilter_mode) nogil> __cuTexRefSetMipmapFilterMode)(hTexRef, fm)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6675
 * 
 * cdef CUresult _cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6674
 *     return err
 * 
 * cdef CUresult _cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6683
 *     return err
 * 
 * cdef CUresult _cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6683, 1, __PYX_ERR(0, 6683, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6684
 * 
 * cdef CUresult _cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefSetMipmapLevelBias             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapLevelBias == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6685
 * cdef CUresult _cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6685, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6686
 *     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":6687
 *     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":6688
 *     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__328, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6688, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6688, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6687
 *     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":6686
 *     global __cuTexRefSetMipmapLevelBias
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapLevelBias == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapLevelBias" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6689
 *         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":6690
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6684
 * 
 * cdef CUresult _cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6683
 *     return err
 * 
 * cdef CUresult _cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6692
 *     return err
 * 
 * cdef CUresult _cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6692, 1, __PYX_ERR(0, 6692, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6693
 * 
 * cdef CUresult _cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefSetMipmapLevelClamp             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapLevelClamp == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6694
 * cdef CUresult _cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6694, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6695
 *     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":6696
 *     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":6697
 *     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__329, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6697, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6697, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6696
 *     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":6695
 *     global __cuTexRefSetMipmapLevelClamp
 *     cuPythonInit()
 *     if __cuTexRefSetMipmapLevelClamp == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapLevelClamp" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6698
 *         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":6699
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6693
 * 
 * cdef CUresult _cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6692
 *     return err
 * 
 * cdef CUresult _cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6701
 *     return err
 * 
 * cdef CUresult _cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6701, 1, __PYX_ERR(0, 6701, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6702
 * 
 * cdef CUresult _cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefSetMaxAnisotropy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetMaxAnisotropy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6703
 * cdef CUresult _cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6703, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6704
 *     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":6705
 *     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":6706
 *     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__330, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6706, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6706, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6705
 *     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":6704
 *     global __cuTexRefSetMaxAnisotropy
 *     cuPythonInit()
 *     if __cuTexRefSetMaxAnisotropy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMaxAnisotropy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6707
 *         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":6708
 *             raise RuntimeError('Function "cuTexRefSetMaxAnisotropy" not found')
 *     err = (<CUresult (*)(CUtexref, unsigned int) nogil> __cuTexRefSetMaxAnisotropy)(hTexRef, maxAniso)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6702
 * 
 * cdef CUresult _cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6701
 *     return err
 * 
 * cdef CUresult _cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6710
 *     return err
 * 
 * cdef CUresult _cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6710, 1, __PYX_ERR(0, 6710, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6711
 * 
 * cdef CUresult _cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefSetBorderColor             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetBorderColor == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6712
 * cdef CUresult _cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6712, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6713
 *     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":6714
 *     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":6715
 *     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__331, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6715, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6715, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6714
 *     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":6713
 *     global __cuTexRefSetBorderColor
 *     cuPythonInit()
 *     if __cuTexRefSetBorderColor == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetBorderColor" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6716
 *         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":6717
 *             raise RuntimeError('Function "cuTexRefSetBorderColor" not found')
 *     err = (<CUresult (*)(CUtexref, float*) nogil> __cuTexRefSetBorderColor)(hTexRef, pBorderColor)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6711
 * 
 * cdef CUresult _cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6710
 *     return err
 * 
 * cdef CUresult _cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6719
 *     return err
 * 
 * cdef CUresult _cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6719, 1, __PYX_ERR(0, 6719, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6720
 * 
 * cdef CUresult _cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefSetFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefSetFlags == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6721
 * cdef CUresult _cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6721, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6722
 *     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":6723
 *     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":6724
 *     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__332, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6724, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6724, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6723
 *     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":6722
 *     global __cuTexRefSetFlags
 *     cuPythonInit()
 *     if __cuTexRefSetFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6725
 *         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":6726
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6720
 * 
 * cdef CUresult _cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6719
 *     return err
 * 
 * cdef CUresult _cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6728
 *     return err
 * 
 * cdef CUresult _cuTexRefGetAddress_v2(CUdeviceptr* pdptr, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6728, 1, __PYX_ERR(0, 6728, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6729
 * 
 * cdef CUresult _cuTexRefGetAddress_v2(CUdeviceptr* pdptr, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefGetAddress_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetAddress_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6730
 * cdef CUresult _cuTexRefGetAddress_v2(CUdeviceptr* pdptr, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6730, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6731
 *     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":6732
 *     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":6733
 *     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__333, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6733, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6733, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6732
 *     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":6731
 *     global __cuTexRefGetAddress_v2
 *     cuPythonInit()
 *     if __cuTexRefGetAddress_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetAddress_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6734
 *         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":6735
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6729
 * 
 * cdef CUresult _cuTexRefGetAddress_v2(CUdeviceptr* pdptr, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6728
 *     return err
 * 
 * cdef CUresult _cuTexRefGetAddress_v2(CUdeviceptr* pdptr, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6737
 *     return err
 * 
 * cdef CUresult _cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6737, 1, __PYX_ERR(0, 6737, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6738
 * 
 * cdef CUresult _cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefGetArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetArray == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6739
 * cdef CUresult _cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6739, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6740
 *     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":6741
 *     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":6742
 *     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__334, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6742, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6742, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6741
 *     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":6740
 *     global __cuTexRefGetArray
 *     cuPythonInit()
 *     if __cuTexRefGetArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6743
 *         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":6744
 *             raise RuntimeError('Function "cuTexRefGetArray" not found')
 *     err = (<CUresult (*)(CUarray*, CUtexref) nogil> __cuTexRefGetArray)(phArray, hTexRef)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6738
 * 
 * cdef CUresult _cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6737
 *     return err
 * 
 * cdef CUresult _cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6746
 *     return err
 * 
 * cdef CUresult _cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6746, 1, __PYX_ERR(0, 6746, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6747
 * 
 * cdef CUresult _cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefGetMipmappedArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetMipmappedArray == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6748
 * cdef CUresult _cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6748, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6749
 *     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":6750
 *     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":6751
 *     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__335, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6751, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6751, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6750
 *     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":6749
 *     global __cuTexRefGetMipmappedArray
 *     cuPythonInit()
 *     if __cuTexRefGetMipmappedArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmappedArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6752
 *         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":6753
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6747
 * 
 * cdef CUresult _cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6746
 *     return err
 * 
 * cdef CUresult _cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6755
 *     return err
 * 
 * cdef CUresult _cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6755, 1, __PYX_ERR(0, 6755, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6756
 * 
 * cdef CUresult _cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefGetAddressMode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetAddressMode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6757
 * cdef CUresult _cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6757, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6758
 *     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":6759
 *     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":6760
 *     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__336, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6760, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6760, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6759
 *     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":6758
 *     global __cuTexRefGetAddressMode
 *     cuPythonInit()
 *     if __cuTexRefGetAddressMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetAddressMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6761
 *         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":6762
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6756
 * 
 * cdef CUresult _cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6755
 *     return err
 * 
 * cdef CUresult _cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6764
 *     return err
 * 
 * cdef CUresult _cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6764, 1, __PYX_ERR(0, 6764, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6765
 * 
 * cdef CUresult _cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefGetFilterMode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetFilterMode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6766
 * cdef CUresult _cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6766, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6767
 *     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":6768
 *     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":6769
 *     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__337, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6769, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6769, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6768
 *     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":6767
 *     global __cuTexRefGetFilterMode
 *     cuPythonInit()
 *     if __cuTexRefGetFilterMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFilterMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6770
 *         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":6771
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6765
 * 
 * cdef CUresult _cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6764
 *     return err
 * 
 * cdef CUresult _cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6773
 *     return err
 * 
 * cdef CUresult _cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6773, 1, __PYX_ERR(0, 6773, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6774
 * 
 * cdef CUresult _cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefGetFormat             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetFormat == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6775
 * cdef CUresult _cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6775, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6776
 *     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":6777
 *     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":6778
 *     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__338, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6778, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6778, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6777
 *     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":6776
 *     global __cuTexRefGetFormat
 *     cuPythonInit()
 *     if __cuTexRefGetFormat == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFormat" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6779
 *         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":6780
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6774
 * 
 * cdef CUresult _cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6773
 *     return err
 * 
 * cdef CUresult _cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6782
 *     return err
 * 
 * cdef CUresult _cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6782, 1, __PYX_ERR(0, 6782, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6783
 * 
 * cdef CUresult _cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefGetMipmapFilterMode             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapFilterMode == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6784
 * cdef CUresult _cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6784, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6785
 *     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":6786
 *     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":6787
 *     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__339, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6787, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6787, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6786
 *     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":6785
 *     global __cuTexRefGetMipmapFilterMode
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapFilterMode == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapFilterMode" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6788
 *         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":6789
 *             raise RuntimeError('Function "cuTexRefGetMipmapFilterMode" not found')
 *     err = (<CUresult (*)(CUfilter_mode*, CUtexref) nogil> __cuTexRefGetMipmapFilterMode)(pfm, hTexRef)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6783
 * 
 * cdef CUresult _cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6782
 *     return err
 * 
 * cdef CUresult _cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6791
 *     return err
 * 
 * cdef CUresult _cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6791, 1, __PYX_ERR(0, 6791, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6792
 * 
 * cdef CUresult _cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefGetMipmapLevelBias             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapLevelBias == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6793
 * cdef CUresult _cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6793, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6794
 *     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":6795
 *     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":6796
 *     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__340, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6796, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6796, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6795
 *     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":6794
 *     global __cuTexRefGetMipmapLevelBias
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapLevelBias == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapLevelBias" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6797
 *         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":6798
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6792
 * 
 * cdef CUresult _cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6791
 *     return err
 * 
 * cdef CUresult _cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6800
 *     return err
 * 
 * cdef CUresult _cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6800, 1, __PYX_ERR(0, 6800, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6801
 * 
 * cdef CUresult _cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefGetMipmapLevelClamp             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapLevelClamp == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6802
 * cdef CUresult _cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6802, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6803
 *     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":6804
 *     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":6805
 *     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__341, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6805, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6805, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6804
 *     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":6803
 *     global __cuTexRefGetMipmapLevelClamp
 *     cuPythonInit()
 *     if __cuTexRefGetMipmapLevelClamp == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapLevelClamp" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6806
 *         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":6807
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6801
 * 
 * cdef CUresult _cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6800
 *     return err
 * 
 * cdef CUresult _cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6809
 *     return err
 * 
 * cdef CUresult _cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6809, 1, __PYX_ERR(0, 6809, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6810
 * 
 * cdef CUresult _cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefGetMaxAnisotropy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetMaxAnisotropy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6811
 * cdef CUresult _cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6811, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6812
 *     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":6813
 *     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":6814
 *     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__342, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6814, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6814, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6813
 *     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":6812
 *     global __cuTexRefGetMaxAnisotropy
 *     cuPythonInit()
 *     if __cuTexRefGetMaxAnisotropy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMaxAnisotropy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6815
 *         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":6816
 *             raise RuntimeError('Function "cuTexRefGetMaxAnisotropy" not found')
 *     err = (<CUresult (*)(int*, CUtexref) nogil> __cuTexRefGetMaxAnisotropy)(pmaxAniso, hTexRef)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6810
 * 
 * cdef CUresult _cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6809
 *     return err
 * 
 * cdef CUresult _cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6818
 *     return err
 * 
 * cdef CUresult _cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6818, 1, __PYX_ERR(0, 6818, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6819
 * 
 * cdef CUresult _cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefGetBorderColor             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetBorderColor == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6820
 * cdef CUresult _cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6820, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6821
 *     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":6822
 *     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":6823
 *     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__343, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6823, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6823, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6822
 *     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":6821
 *     global __cuTexRefGetBorderColor
 *     cuPythonInit()
 *     if __cuTexRefGetBorderColor == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetBorderColor" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6824
 *         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":6825
 *             raise RuntimeError('Function "cuTexRefGetBorderColor" not found')
 *     err = (<CUresult (*)(float*, CUtexref) nogil> __cuTexRefGetBorderColor)(pBorderColor, hTexRef)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6819
 * 
 * cdef CUresult _cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6818
 *     return err
 * 
 * cdef CUresult _cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6827
 *     return err
 * 
 * cdef CUresult _cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6827, 1, __PYX_ERR(0, 6827, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6828
 * 
 * cdef CUresult _cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefGetFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefGetFlags == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6829
 * cdef CUresult _cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6829, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6830
 *     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":6831
 *     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":6832
 *     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__344, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6832, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6832, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6831
 *     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":6830
 *     global __cuTexRefGetFlags
 *     cuPythonInit()
 *     if __cuTexRefGetFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6833
 *         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":6834
 *             raise RuntimeError('Function "cuTexRefGetFlags" not found')
 *     err = (<CUresult (*)(unsigned int*, CUtexref) nogil> __cuTexRefGetFlags)(pFlags, hTexRef)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefCreate(CUtexref* pTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6828
 * 
 * cdef CUresult _cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6827
 *     return err
 * 
 * cdef CUresult _cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6836
 *     return err
 * 
 * cdef CUresult _cuTexRefCreate(CUtexref* pTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6836, 1, __PYX_ERR(0, 6836, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6837
 * 
 * cdef CUresult _cuTexRefCreate(CUtexref* pTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefCreate == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6838
 * cdef CUresult _cuTexRefCreate(CUtexref* pTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6838, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6839
 *     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":6840
 *     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":6841
 *     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__345, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6841, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6841, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6840
 *     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":6839
 *     global __cuTexRefCreate
 *     cuPythonInit()
 *     if __cuTexRefCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6842
 *         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":6843
 *             raise RuntimeError('Function "cuTexRefCreate" not found')
 *     err = (<CUresult (*)(CUtexref*) nogil> __cuTexRefCreate)(pTexRef)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexRefDestroy(CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6837
 * 
 * cdef CUresult _cuTexRefCreate(CUtexref* pTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6836
 *     return err
 * 
 * cdef CUresult _cuTexRefCreate(CUtexref* pTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6845
 *     return err
 * 
 * cdef CUresult _cuTexRefDestroy(CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6845, 1, __PYX_ERR(0, 6845, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6846
 * 
 * cdef CUresult _cuTexRefDestroy(CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexRefDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexRefDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6847
 * cdef CUresult _cuTexRefDestroy(CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6847, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6848
 *     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":6849
 *     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":6850
 *     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__346, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6850, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6850, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6849
 *     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":6848
 *     global __cuTexRefDestroy
 *     cuPythonInit()
 *     if __cuTexRefDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6851
 *         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":6852
 *             raise RuntimeError('Function "cuTexRefDestroy" not found')
 *     err = (<CUresult (*)(CUtexref) nogil> __cuTexRefDestroy)(hTexRef)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6846
 * 
 * cdef CUresult _cuTexRefDestroy(CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6845
 *     return err
 * 
 * cdef CUresult _cuTexRefDestroy(CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6854
 *     return err
 * 
 * cdef CUresult _cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6854, 1, __PYX_ERR(0, 6854, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6855
 * 
 * cdef CUresult _cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuSurfRefSetArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuSurfRefSetArray == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6856
 * cdef CUresult _cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6856, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6857
 *     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":6858
 *     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":6859
 *     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__347, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6859, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6859, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6858
 *     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":6857
 *     global __cuSurfRefSetArray
 *     cuPythonInit()
 *     if __cuSurfRefSetArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSurfRefSetArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6860
 *         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":6861
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6855
 * 
 * cdef CUresult _cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6854
 *     return err
 * 
 * cdef CUresult _cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6863
 *     return err
 * 
 * cdef CUresult _cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6863, 1, __PYX_ERR(0, 6863, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6864
 * 
 * cdef CUresult _cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuSurfRefGetArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuSurfRefGetArray == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6865
 * cdef CUresult _cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6865, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6866
 *     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":6867
 *     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":6868
 *     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__348, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6868, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6868, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6867
 *     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":6866
 *     global __cuSurfRefGetArray
 *     cuPythonInit()
 *     if __cuSurfRefGetArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSurfRefGetArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6869
 *         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":6870
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6864
 * 
 * cdef CUresult _cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6863
 *     return err
 * 
 * cdef CUresult _cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6872
 *     return err
 * 
 * cdef CUresult _cuTexObjectCreate(CUtexObject* pTexObject, const CUDA_RESOURCE_DESC* pResDesc, const CUDA_TEXTURE_DESC* pTexDesc, const CUDA_RESOURCE_VIEW_DESC* pResViewDesc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6872, 1, __PYX_ERR(0, 6872, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6873
 * 
 * cdef CUresult _cuTexObjectCreate(CUtexObject* pTexObject, const CUDA_RESOURCE_DESC* pResDesc, const CUDA_TEXTURE_DESC* pTexDesc, const CUDA_RESOURCE_VIEW_DESC* pResViewDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexObjectCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexObjectCreate == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6874
 * cdef CUresult _cuTexObjectCreate(CUtexObject* pTexObject, const CUDA_RESOURCE_DESC* pResDesc, const CUDA_TEXTURE_DESC* pTexDesc, const CUDA_RESOURCE_VIEW_DESC* pResViewDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6874, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6875
 *     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":6876
 *     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":6877
 *     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__349, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6877, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6877, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6876
 *     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":6875
 *     global __cuTexObjectCreate
 *     cuPythonInit()
 *     if __cuTexObjectCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6878
 *         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":6879
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6873
 * 
 * cdef CUresult _cuTexObjectCreate(CUtexObject* pTexObject, const CUDA_RESOURCE_DESC* pResDesc, const CUDA_TEXTURE_DESC* pTexDesc, const CUDA_RESOURCE_VIEW_DESC* pResViewDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6872
 *     return err
 * 
 * cdef CUresult _cuTexObjectCreate(CUtexObject* pTexObject, const CUDA_RESOURCE_DESC* pResDesc, const CUDA_TEXTURE_DESC* pTexDesc, const CUDA_RESOURCE_VIEW_DESC* pResViewDesc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6881
 *     return err
 * 
 * cdef CUresult _cuTexObjectDestroy(CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6881, 1, __PYX_ERR(0, 6881, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6882
 * 
 * cdef CUresult _cuTexObjectDestroy(CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexObjectDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexObjectDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6883
 * cdef CUresult _cuTexObjectDestroy(CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6883, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6884
 *     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":6885
 *     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":6886
 *     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__350, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6886, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6886, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6885
 *     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":6884
 *     global __cuTexObjectDestroy
 *     cuPythonInit()
 *     if __cuTexObjectDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6887
 *         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":6888
 *             raise RuntimeError('Function "cuTexObjectDestroy" not found')
 *     err = (<CUresult (*)(CUtexObject) nogil> __cuTexObjectDestroy)(texObject)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6882
 * 
 * cdef CUresult _cuTexObjectDestroy(CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6881
 *     return err
 * 
 * cdef CUresult _cuTexObjectDestroy(CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6890
 *     return err
 * 
 * cdef CUresult _cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6890, 1, __PYX_ERR(0, 6890, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6891
 * 
 * cdef CUresult _cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexObjectGetResourceDesc             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexObjectGetResourceDesc == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6892
 * cdef CUresult _cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6892, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6893
 *     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":6894
 *     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":6895
 *     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__351, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6895, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6895, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6894
 *     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":6893
 *     global __cuTexObjectGetResourceDesc
 *     cuPythonInit()
 *     if __cuTexObjectGetResourceDesc == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectGetResourceDesc" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6896
 *         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":6897
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6891
 * 
 * cdef CUresult _cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6890
 *     return err
 * 
 * cdef CUresult _cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6899
 *     return err
 * 
 * cdef CUresult _cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6899, 1, __PYX_ERR(0, 6899, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6900
 * 
 * cdef CUresult _cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexObjectGetTextureDesc             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexObjectGetTextureDesc == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6901
 * cdef CUresult _cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6901, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6902
 *     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":6903
 *     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":6904
 *     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__352, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6904, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6904, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6903
 *     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":6902
 *     global __cuTexObjectGetTextureDesc
 *     cuPythonInit()
 *     if __cuTexObjectGetTextureDesc == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectGetTextureDesc" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6905
 *         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":6906
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6900
 * 
 * cdef CUresult _cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6899
 *     return err
 * 
 * cdef CUresult _cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6908
 *     return err
 * 
 * cdef CUresult _cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6908, 1, __PYX_ERR(0, 6908, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6909
 * 
 * cdef CUresult _cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuTexObjectGetResourceViewDesc             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuTexObjectGetResourceViewDesc == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6910
 * cdef CUresult _cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6910, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6911
 *     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":6912
 *     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":6913
 *     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__353, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6913, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6913, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6912
 *     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":6911
 *     global __cuTexObjectGetResourceViewDesc
 *     cuPythonInit()
 *     if __cuTexObjectGetResourceViewDesc == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectGetResourceViewDesc" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6914
 *         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":6915
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6909
 * 
 * cdef CUresult _cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6908
 *     return err
 * 
 * cdef CUresult _cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6917
 *     return err
 * 
 * cdef CUresult _cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6917, 1, __PYX_ERR(0, 6917, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6918
 * 
 * cdef CUresult _cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuSurfObjectCreate             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuSurfObjectCreate == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6919
 * cdef CUresult _cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6919, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6920
 *     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":6921
 *     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":6922
 *     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__354, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6922, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6922, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6921
 *     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":6920
 *     global __cuSurfObjectCreate
 *     cuPythonInit()
 *     if __cuSurfObjectCreate == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectCreate" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6923
 *         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":6924
 *             raise RuntimeError('Function "cuSurfObjectCreate" not found')
 *     err = (<CUresult (*)(CUsurfObject*, const CUDA_RESOURCE_DESC*) nogil> __cuSurfObjectCreate)(pSurfObject, pResDesc)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuSurfObjectDestroy(CUsurfObject surfObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6918
 * 
 * cdef CUresult _cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6917
 *     return err
 * 
 * cdef CUresult _cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6926
 *     return err
 * 
 * cdef CUresult _cuSurfObjectDestroy(CUsurfObject surfObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6926, 1, __PYX_ERR(0, 6926, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6927
 * 
 * cdef CUresult _cuSurfObjectDestroy(CUsurfObject surfObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuSurfObjectDestroy             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuSurfObjectDestroy == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6928
 * cdef CUresult _cuSurfObjectDestroy(CUsurfObject surfObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6928, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6929
 *     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":6930
 *     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":6931
 *     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__355, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6931, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6931, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6930
 *     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":6929
 *     global __cuSurfObjectDestroy
 *     cuPythonInit()
 *     if __cuSurfObjectDestroy == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectDestroy" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6932
 *         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":6933
 *             raise RuntimeError('Function "cuSurfObjectDestroy" not found')
 *     err = (<CUresult (*)(CUsurfObject) nogil> __cuSurfObjectDestroy)(surfObject)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6927
 * 
 * cdef CUresult _cuSurfObjectDestroy(CUsurfObject surfObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6926
 *     return err
 * 
 * cdef CUresult _cuSurfObjectDestroy(CUsurfObject surfObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6935
 *     return err
 * 
 * cdef CUresult _cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6935, 1, __PYX_ERR(0, 6935, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6936
 * 
 * cdef CUresult _cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuSurfObjectGetResourceDesc             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuSurfObjectGetResourceDesc == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6937
 * cdef CUresult _cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6937, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6938
 *     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":6939
 *     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":6940
 *     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__356, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6940, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6940, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6939
 *     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":6938
 *     global __cuSurfObjectGetResourceDesc
 *     cuPythonInit()
 *     if __cuSurfObjectGetResourceDesc == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectGetResourceDesc" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6941
 *         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":6942
 *             raise RuntimeError('Function "cuSurfObjectGetResourceDesc" not found')
 *     err = (<CUresult (*)(CUDA_RESOURCE_DESC*, CUsurfObject) nogil> __cuSurfObjectGetResourceDesc)(pResDesc, surfObject)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6936
 * 
 * cdef CUresult _cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6935
 *     return err
 * 
 * cdef CUresult _cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6944
 *     return err
 * 
 * cdef CUresult _cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6944, 1, __PYX_ERR(0, 6944, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6945
 * 
 * cdef CUresult _cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDeviceCanAccessPeer             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceCanAccessPeer == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6946
 * cdef CUresult _cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6946, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6947
 *     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":6948
 *     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":6949
 *     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__357, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6949, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6949, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6948
 *     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":6947
 *     global __cuDeviceCanAccessPeer
 *     cuPythonInit()
 *     if __cuDeviceCanAccessPeer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceCanAccessPeer" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6950
 *         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":6951
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6945
 * 
 * cdef CUresult _cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6944
 *     return err
 * 
 * cdef CUresult _cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6953
 *     return err
 * 
 * cdef CUresult _cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6953, 1, __PYX_ERR(0, 6953, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6954
 * 
 * cdef CUresult _cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuCtxEnablePeerAccess             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxEnablePeerAccess == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6955
 * cdef CUresult _cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6955, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6956
 *     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":6957
 *     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":6958
 *     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__358, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6958, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6958, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6957
 *     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":6956
 *     global __cuCtxEnablePeerAccess
 *     cuPythonInit()
 *     if __cuCtxEnablePeerAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxEnablePeerAccess" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6959
 *         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":6960
 *             raise RuntimeError('Function "cuCtxEnablePeerAccess" not found')
 *     err = (<CUresult (*)(CUcontext, unsigned int) nogil> __cuCtxEnablePeerAccess)(peerContext, Flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuCtxDisablePeerAccess(CUcontext peerContext) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6954
 * 
 * cdef CUresult _cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6953
 *     return err
 * 
 * cdef CUresult _cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6962
 *     return err
 * 
 * cdef CUresult _cuCtxDisablePeerAccess(CUcontext peerContext) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6962, 1, __PYX_ERR(0, 6962, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6963
 * 
 * cdef CUresult _cuCtxDisablePeerAccess(CUcontext peerContext) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuCtxDisablePeerAccess             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuCtxDisablePeerAccess == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6964
 * cdef CUresult _cuCtxDisablePeerAccess(CUcontext peerContext) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6964, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6965
 *     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":6966
 *     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":6967
 *     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__359, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6967, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6967, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6966
 *     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":6965
 *     global __cuCtxDisablePeerAccess
 *     cuPythonInit()
 *     if __cuCtxDisablePeerAccess == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDisablePeerAccess" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6968
 *         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":6969
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6963
 * 
 * cdef CUresult _cuCtxDisablePeerAccess(CUcontext peerContext) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6962
 *     return err
 * 
 * cdef CUresult _cuCtxDisablePeerAccess(CUcontext peerContext) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6971
 *     return err
 * 
 * cdef CUresult _cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6971, 1, __PYX_ERR(0, 6971, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6972
 * 
 * cdef CUresult _cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuDeviceGetP2PAttribute             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuDeviceGetP2PAttribute == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6973
 * cdef CUresult _cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6973, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6974
 *     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":6975
 *     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":6976
 *     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__360, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6976, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6976, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6975
 *     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":6974
 *     global __cuDeviceGetP2PAttribute
 *     cuPythonInit()
 *     if __cuDeviceGetP2PAttribute == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetP2PAttribute" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6977
 *         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":6978
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6972
 * 
 * cdef CUresult _cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6971
 *     return err
 * 
 * cdef CUresult _cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6980
 *     return err
 * 
 * cdef CUresult _cuGraphicsUnregisterResource(CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6980, 1, __PYX_ERR(0, 6980, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6981
 * 
 * cdef CUresult _cuGraphicsUnregisterResource(CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphicsUnregisterResource             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsUnregisterResource == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6982
 * cdef CUresult _cuGraphicsUnregisterResource(CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6982, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6983
 *     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":6984
 *     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":6985
 *     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__361, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6985, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6985, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6984
 *     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":6983
 *     global __cuGraphicsUnregisterResource
 *     cuPythonInit()
 *     if __cuGraphicsUnregisterResource == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsUnregisterResource" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6986
 *         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":6987
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6981
 * 
 * cdef CUresult _cuGraphicsUnregisterResource(CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6980
 *     return err
 * 
 * cdef CUresult _cuGraphicsUnregisterResource(CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6989
 *     return err
 * 
 * cdef CUresult _cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6989, 1, __PYX_ERR(0, 6989, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6990
 * 
 * cdef CUresult _cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphicsSubResourceGetMappedArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsSubResourceGetMappedArray == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":6991
 * cdef CUresult _cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 6991, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":6992
 *     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":6993
 *     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":6994
 *     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__362, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6994, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 6994, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":6993
 *     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":6992
 *     global __cuGraphicsSubResourceGetMappedArray
 *     cuPythonInit()
 *     if __cuGraphicsSubResourceGetMappedArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsSubResourceGetMappedArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":6995
 *         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":6996
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6990
 * 
 * cdef CUresult _cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6989
 *     return err
 * 
 * cdef CUresult _cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":6998
 *     return err
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 6998, 1, __PYX_ERR(0, 6998, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":6999
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphicsResourceGetMappedMipmappedArray             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedMipmappedArray == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7000
 * cdef CUresult _cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 7000, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7001
 *     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":7002
 *     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":7003
 *     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__363, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7003, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7003, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7002
 *     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":7001
 *     global __cuGraphicsResourceGetMappedMipmappedArray
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedMipmappedArray == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedMipmappedArray" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7004
 *         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":7005
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":6999
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":6998
 *     return err
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":7007
 *     return err
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedPointer_v2(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 7007, 1, __PYX_ERR(0, 7007, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7008
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedPointer_v2(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphicsResourceGetMappedPointer_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedPointer_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7009
 * cdef CUresult _cuGraphicsResourceGetMappedPointer_v2(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 7009, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7010
 *     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":7011
 *     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":7012
 *     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__364, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7012, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7012, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7011
 *     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":7010
 *     global __cuGraphicsResourceGetMappedPointer_v2
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedPointer_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedPointer_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7013
 *         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":7014
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7008
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedPointer_v2(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":7007
 *     return err
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedPointer_v2(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":7016
 *     return err
 * 
 * cdef CUresult _cuGraphicsResourceSetMapFlags_v2(CUgraphicsResource resource, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 7016, 1, __PYX_ERR(0, 7016, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7017
 * 
 * cdef CUresult _cuGraphicsResourceSetMapFlags_v2(CUgraphicsResource resource, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphicsResourceSetMapFlags_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsResourceSetMapFlags_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7018
 * cdef CUresult _cuGraphicsResourceSetMapFlags_v2(CUgraphicsResource resource, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 7018, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7019
 *     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":7020
 *     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":7021
 *     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__365, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7021, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7021, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7020
 *     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":7019
 *     global __cuGraphicsResourceSetMapFlags_v2
 *     cuPythonInit()
 *     if __cuGraphicsResourceSetMapFlags_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceSetMapFlags_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7022
 *         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":7023
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7017
 * 
 * cdef CUresult _cuGraphicsResourceSetMapFlags_v2(CUgraphicsResource resource, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":7016
 *     return err
 * 
 * cdef CUresult _cuGraphicsResourceSetMapFlags_v2(CUgraphicsResource resource, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":7025
 *     return err
 * 
 * cdef CUresult _cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 7025, 1, __PYX_ERR(0, 7025, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7026
 * 
 * cdef CUresult _cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphicsMapResources             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsMapResources == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7027
 * cdef CUresult _cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 7027, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7028
 *     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":7029
 *     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":7030
 *     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__366, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7030, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7030, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7029
 *     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":7028
 *     global __cuGraphicsMapResources
 *     cuPythonInit()
 *     if __cuGraphicsMapResources == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsMapResources" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7031
 *         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":7032
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7026
 * 
 * cdef CUresult _cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":7025
 *     return err
 * 
 * cdef CUresult _cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":7034
 *     return err
 * 
 * cdef CUresult _cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 7034, 1, __PYX_ERR(0, 7034, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7035
 * 
 * cdef CUresult _cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphicsUnmapResources             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsUnmapResources == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7036
 * cdef CUresult _cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 7036, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7037
 *     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":7038
 *     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":7039
 *     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__367, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7039, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7039, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7038
 *     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":7037
 *     global __cuGraphicsUnmapResources
 *     cuPythonInit()
 *     if __cuGraphicsUnmapResources == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsUnmapResources" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7040
 *         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":7041
 *             raise RuntimeError('Function "cuGraphicsUnmapResources" not found')
 *     err = (<CUresult (*)(unsigned int, CUgraphicsResource*, CUstream) nogil> __cuGraphicsUnmapResources)(count, resources, hStream)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGetProcAddress(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7035
 * 
 * cdef CUresult _cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":7034
 *     return err
 * 
 * cdef CUresult _cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":7043
 *     return err
 * 
 * cdef CUresult _cuGetProcAddress(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGetProcAddress
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(char const *__pyx_v_symbol, void **__pyx_v_pfn, int __pyx_v_cudaVersion, 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("_cuGetProcAddress", 1);
  __Pyx_TraceCall("_cuGetProcAddress", __pyx_f[0], 7043, 1, __PYX_ERR(0, 7043, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7044
 * 
 * cdef CUresult _cuGetProcAddress(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGetProcAddress             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGetProcAddress == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7045
 * cdef CUresult _cuGetProcAddress(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGetProcAddress
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuGetProcAddress == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7045, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7046
 *     global __cuGetProcAddress
 *     cuPythonInit()
 *     if __cuGetProcAddress == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGetProcAddress" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuGetProcAddress == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7047
 *     cuPythonInit()
 *     if __cuGetProcAddress == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGetProcAddress" not found')
 *     err = (<CUresult (*)(const char*, void**, int, cuuint64_t) nogil> __cuGetProcAddress)(symbol, pfn, cudaVersion, flags)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7048
 *     if __cuGetProcAddress == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGetProcAddress" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const char*, void**, int, cuuint64_t) nogil> __cuGetProcAddress)(symbol, pfn, cudaVersion, flags)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__368, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7048, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7048, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7047
 *     cuPythonInit()
 *     if __cuGetProcAddress == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuGetProcAddress" not found')
 *     err = (<CUresult (*)(const char*, void**, int, cuuint64_t) nogil> __cuGetProcAddress)(symbol, pfn, cudaVersion, flags)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7046
 *     global __cuGetProcAddress
 *     cuPythonInit()
 *     if __cuGetProcAddress == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGetProcAddress" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7049
 *         with gil:
 *             raise RuntimeError('Function "cuGetProcAddress" not found')
 *     err = (<CUresult (*)(const char*, void**, int, cuuint64_t) nogil> __cuGetProcAddress)(symbol, pfn, cudaVersion, flags)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(char const *, void **, int, cuuint64_t))__pyx_v_4cuda_5_cuda_5ccuda___cuGetProcAddress)(__pyx_v_symbol, __pyx_v_pfn, __pyx_v_cudaVersion, __pyx_v_flags);

    /* "cuda/_cuda/ccuda.pyx":7050
 *             raise RuntimeError('Function "cuGetProcAddress" not found')
 *     err = (<CUresult (*)(const char*, void**, int, cuuint64_t) nogil> __cuGetProcAddress)(symbol, pfn, cudaVersion, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7044
 * 
 * cdef CUresult _cuGetProcAddress(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGetProcAddress             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGetProcAddress == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7043
 *     return err
 * 
 * cdef CUresult _cuGetProcAddress(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuGetProcAddress
 *     cuPythonInit()
 */

  /* function 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", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7052
 *     return err
 * 
 * cdef CUresult _cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 7052, 1, __PYX_ERR(0, 7052, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7053
 * 
 * cdef CUresult _cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGetExportTable             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGetExportTable == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7054
 * cdef CUresult _cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 7054, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7055
 *     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":7056
 *     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":7057
 *     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__369, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7057, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7057, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7056
 *     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":7055
 *     global __cuGetExportTable
 *     cuPythonInit()
 *     if __cuGetExportTable == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGetExportTable" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7058
 *         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":7059
 *             raise RuntimeError('Function "cuGetExportTable" not found')
 *     err = (<CUresult (*)(const void**, const CUuuid*) nogil> __cuGetExportTable)(ppExportTable, pExportTableId)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuProfilerInitialize(const char* configFile, const char* outputFile, CUoutput_mode outputMode) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7053
 * 
 * cdef CUresult _cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":7052
 *     return err
 * 
 * cdef CUresult _cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":7061
 *     return err
 * 
 * cdef CUresult _cuProfilerInitialize(const char* configFile, const char* outputFile, CUoutput_mode outputMode) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuProfilerInitialize
 *     cuPythonInit()
 */

static CUresult __pyx_f_4cuda_5_cuda_5ccuda__cuProfilerInitialize(char const *__pyx_v_configFile, char const *__pyx_v_outputFile, CUoutput_mode __pyx_v_outputMode) {
  CUresult __pyx_v_err;
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save;
  #endif
  __Pyx_RefNannySetupContext("_cuProfilerInitialize", 1);
  __Pyx_TraceCall("_cuProfilerInitialize", __pyx_f[0], 7061, 1, __PYX_ERR(0, 7061, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7062
 * 
 * cdef CUresult _cuProfilerInitialize(const char* configFile, const char* outputFile, CUoutput_mode outputMode) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuProfilerInitialize             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuProfilerInitialize == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7063
 * cdef CUresult _cuProfilerInitialize(const char* configFile, const char* outputFile, CUoutput_mode outputMode) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuProfilerInitialize
 *     cuPythonInit()             # <<<<<<<<<<<<<<
 *     if __cuProfilerInitialize == NULL:
 *         with gil:
 */
    __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7063, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7064
 *     global __cuProfilerInitialize
 *     cuPythonInit()
 *     if __cuProfilerInitialize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuProfilerInitialize" not found')
 */
    __pyx_t_2 = ((__pyx_v_4cuda_5_cuda_5ccuda___cuProfilerInitialize == NULL) != 0);
    if (__pyx_t_2) {

      /* "cuda/_cuda/ccuda.pyx":7065
 *     cuPythonInit()
 *     if __cuProfilerInitialize == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuProfilerInitialize" not found')
 *     err = (<CUresult (*)(const char*, const char*, CUoutput_mode) nogil> __cuProfilerInitialize)(configFile, outputFile, outputMode)
 */
      {
          #ifdef WITH_THREAD
          PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
          #endif
          /*try:*/ {

            /* "cuda/_cuda/ccuda.pyx":7066
 *     if __cuProfilerInitialize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuProfilerInitialize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const char*, const char*, CUoutput_mode) nogil> __cuProfilerInitialize)(configFile, outputFile, outputMode)
 *     return err
 */
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__370, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7066, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7066, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7065
 *     cuPythonInit()
 *     if __cuProfilerInitialize == NULL:
 *         with gil:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('Function "cuProfilerInitialize" not found')
 *     err = (<CUresult (*)(const char*, const char*, CUoutput_mode) nogil> __cuProfilerInitialize)(configFile, outputFile, outputMode)
 */
          /*finally:*/ {
            __pyx_L8_error: {
              #ifdef WITH_THREAD
              __Pyx_PyGILState_Release(__pyx_gilstate_save);
              #endif
              goto __pyx_L4_error;
            }
          }
      }

      /* "cuda/_cuda/ccuda.pyx":7064
 *     global __cuProfilerInitialize
 *     cuPythonInit()
 *     if __cuProfilerInitialize == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuProfilerInitialize" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7067
 *         with gil:
 *             raise RuntimeError('Function "cuProfilerInitialize" not found')
 *     err = (<CUresult (*)(const char*, const char*, CUoutput_mode) nogil> __cuProfilerInitialize)(configFile, outputFile, outputMode)             # <<<<<<<<<<<<<<
 *     return err
 * 
 */
    __pyx_v_err = ((CUresult (*)(char const *, char const *, CUoutput_mode))__pyx_v_4cuda_5_cuda_5ccuda___cuProfilerInitialize)(__pyx_v_configFile, __pyx_v_outputFile, __pyx_v_outputMode);

    /* "cuda/_cuda/ccuda.pyx":7068
 *             raise RuntimeError('Function "cuProfilerInitialize" not found')
 *     err = (<CUresult (*)(const char*, const char*, CUoutput_mode) nogil> __cuProfilerInitialize)(configFile, outputFile, outputMode)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuProfilerStart() nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7062
 * 
 * cdef CUresult _cuProfilerInitialize(const char* configFile, const char* outputFile, CUoutput_mode outputMode) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuProfilerInitialize             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuProfilerInitialize == NULL:
 */
  /*finally:*/ {
    __pyx_L3_return: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L0;
    }
    __pyx_L4_error: {
      #ifdef WITH_THREAD
      __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
      #endif
      goto __pyx_L1_error;
    }
  }

  /* "cuda/_cuda/ccuda.pyx":7061
 *     return err
 * 
 * cdef CUresult _cuProfilerInitialize(const char* configFile, const char* outputFile, CUoutput_mode outputMode) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     global __cuProfilerInitialize
 *     cuPythonInit()
 */

  /* function exit code */
  __pyx_r = (enum cudaError_enum) 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cuda._cuda.ccuda._cuProfilerInitialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "cuda/_cuda/ccuda.pyx":7070
 *     return err
 * 
 * cdef CUresult _cuProfilerStart() nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 7070, 1, __PYX_ERR(0, 7070, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7071
 * 
 * cdef CUresult _cuProfilerStart() nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuProfilerStart             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuProfilerStart == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7072
 * cdef CUresult _cuProfilerStart() nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 7072, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7073
 *     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":7074
 *     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":7075
 *     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__371, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7075, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7075, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7074
 *     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":7073
 *     global __cuProfilerStart
 *     cuPythonInit()
 *     if __cuProfilerStart == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuProfilerStart" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7076
 *         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":7077
 *             raise RuntimeError('Function "cuProfilerStart" not found')
 *     err = (<CUresult (*)() nogil> __cuProfilerStart)()
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuProfilerStop() nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7071
 * 
 * cdef CUresult _cuProfilerStart() nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":7070
 *     return err
 * 
 * cdef CUresult _cuProfilerStart() nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":7079
 *     return err
 * 
 * cdef CUresult _cuProfilerStop() nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 7079, 1, __PYX_ERR(0, 7079, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7080
 * 
 * cdef CUresult _cuProfilerStop() nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuProfilerStop             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuProfilerStop == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7081
 * cdef CUresult _cuProfilerStop() nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 7081, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7082
 *     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":7083
 *     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":7084
 *     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__372, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7084, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7084, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7083
 *     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":7082
 *     global __cuProfilerStop
 *     cuPythonInit()
 *     if __cuProfilerStop == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuProfilerStop" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7085
 *         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":7086
 *             raise RuntimeError('Function "cuProfilerStop" not found')
 *     err = (<CUresult (*)() nogil> __cuProfilerStop)()
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7080
 * 
 * cdef CUresult _cuProfilerStop() nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":7079
 *     return err
 * 
 * cdef CUresult _cuProfilerStop() nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":7088
 *     return err
 * 
 * cdef CUresult _cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 7088, 1, __PYX_ERR(0, 7088, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7089
 * 
 * cdef CUresult _cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuVDPAUGetDevice             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuVDPAUGetDevice == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7090
 * cdef CUresult _cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 7090, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7091
 *     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":7092
 *     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":7093
 *     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__373, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7093, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7093, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7092
 *     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":7091
 *     global __cuVDPAUGetDevice
 *     cuPythonInit()
 *     if __cuVDPAUGetDevice == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuVDPAUGetDevice" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7094
 *         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":7095
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7089
 * 
 * cdef CUresult _cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":7088
 *     return err
 * 
 * cdef CUresult _cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":7097
 *     return err
 * 
 * cdef CUresult _cuVDPAUCtxCreate_v2(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 7097, 1, __PYX_ERR(0, 7097, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7098
 * 
 * cdef CUresult _cuVDPAUCtxCreate_v2(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuVDPAUCtxCreate_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuVDPAUCtxCreate_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7099
 * cdef CUresult _cuVDPAUCtxCreate_v2(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 7099, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7100
 *     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":7101
 *     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":7102
 *     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__374, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7102, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7102, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7101
 *     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":7100
 *     global __cuVDPAUCtxCreate_v2
 *     cuPythonInit()
 *     if __cuVDPAUCtxCreate_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuVDPAUCtxCreate_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7103
 *         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":7104
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7098
 * 
 * cdef CUresult _cuVDPAUCtxCreate_v2(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":7097
 *     return err
 * 
 * cdef CUresult _cuVDPAUCtxCreate_v2(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":7106
 *     return err
 * 
 * cdef CUresult _cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 7106, 1, __PYX_ERR(0, 7106, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7107
 * 
 * cdef CUresult _cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphicsVDPAURegisterVideoSurface             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsVDPAURegisterVideoSurface == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7108
 * cdef CUresult _cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 7108, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7109
 *     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":7110
 *     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":7111
 *     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__375, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7111, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7111, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7110
 *     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":7109
 *     global __cuGraphicsVDPAURegisterVideoSurface
 *     cuPythonInit()
 *     if __cuGraphicsVDPAURegisterVideoSurface == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsVDPAURegisterVideoSurface" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7112
 *         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":7113
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7107
 * 
 * cdef CUresult _cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":7106
 *     return err
 * 
 * cdef CUresult _cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":7115
 *     return err
 * 
 * cdef CUresult _cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 7115, 1, __PYX_ERR(0, 7115, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7116
 * 
 * cdef CUresult _cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphicsVDPAURegisterOutputSurface             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsVDPAURegisterOutputSurface == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7117
 * cdef CUresult _cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 7117, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7118
 *     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":7119
 *     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":7120
 *     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__376, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7120, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7120, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7119
 *     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":7118
 *     global __cuGraphicsVDPAURegisterOutputSurface
 *     cuPythonInit()
 *     if __cuGraphicsVDPAURegisterOutputSurface == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsVDPAURegisterOutputSurface" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7121
 *         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":7122
 *             raise RuntimeError('Function "cuGraphicsVDPAURegisterOutputSurface" not found')
 *     err = (<CUresult (*)(CUgraphicsResource*, VdpOutputSurface, unsigned int) nogil> __cuGraphicsVDPAURegisterOutputSurface)(pCudaResource, vdpSurface, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7116
 * 
 * cdef CUresult _cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":7115
 *     return err
 * 
 * cdef CUresult _cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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;
}

/* "cuda/_cuda/ccuda.pyx":7124
 *     return err
 * 
 * cdef CUresult _cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 7124, 1, __PYX_ERR(0, 7124, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7125
 * 
 * cdef CUresult _cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphicsEGLRegisterImage             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsEGLRegisterImage == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7126
 * cdef CUresult _cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 7126, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7127
 *     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":7128
 *     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":7129
 *     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__377, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7129, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7129, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7128
 *     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":7127
 *     global __cuGraphicsEGLRegisterImage
 *     cuPythonInit()
 *     if __cuGraphicsEGLRegisterImage == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsEGLRegisterImage" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7130
 *         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":7131
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7125
 * 
 * cdef CUresult _cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":7124
 *     return err
 * 
 * cdef CUresult _cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":7133
 *     return err
 * 
 * cdef CUresult _cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 7133, 1, __PYX_ERR(0, 7133, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7134
 * 
 * cdef CUresult _cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuEGLStreamConsumerConnect             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerConnect == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7135
 * cdef CUresult _cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 7135, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7136
 *     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":7137
 *     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":7138
 *     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__378, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7138, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7138, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7137
 *     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":7136
 *     global __cuEGLStreamConsumerConnect
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerConnect == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerConnect" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7139
 *         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":7140
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7134
 * 
 * cdef CUresult _cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":7133
 *     return err
 * 
 * cdef CUresult _cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":7142
 *     return err
 * 
 * cdef CUresult _cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 7142, 1, __PYX_ERR(0, 7142, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7143
 * 
 * cdef CUresult _cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuEGLStreamConsumerConnectWithFlags             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerConnectWithFlags == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7144
 * cdef CUresult _cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 7144, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7145
 *     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":7146
 *     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":7147
 *     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__379, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7147, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7147, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7146
 *     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":7145
 *     global __cuEGLStreamConsumerConnectWithFlags
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerConnectWithFlags == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerConnectWithFlags" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7148
 *         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":7149
 *             raise RuntimeError('Function "cuEGLStreamConsumerConnectWithFlags" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*, EGLStreamKHR, unsigned int) nogil> __cuEGLStreamConsumerConnectWithFlags)(conn, stream, flags)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7143
 * 
 * cdef CUresult _cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":7142
 *     return err
 * 
 * cdef CUresult _cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":7151
 *     return err
 * 
 * cdef CUresult _cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 7151, 1, __PYX_ERR(0, 7151, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7152
 * 
 * cdef CUresult _cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuEGLStreamConsumerDisconnect             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerDisconnect == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7153
 * cdef CUresult _cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 7153, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7154
 *     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":7155
 *     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":7156
 *     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__380, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7156, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7156, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7155
 *     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":7154
 *     global __cuEGLStreamConsumerDisconnect
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerDisconnect == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerDisconnect" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7157
 *         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":7158
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7152
 * 
 * cdef CUresult _cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":7151
 *     return err
 * 
 * cdef CUresult _cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":7160
 *     return err
 * 
 * cdef CUresult _cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 7160, 1, __PYX_ERR(0, 7160, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7161
 * 
 * cdef CUresult _cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuEGLStreamConsumerAcquireFrame             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerAcquireFrame == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7162
 * cdef CUresult _cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 7162, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7163
 *     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":7164
 *     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":7165
 *     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__381, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7165, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7165, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7164
 *     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":7163
 *     global __cuEGLStreamConsumerAcquireFrame
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerAcquireFrame == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerAcquireFrame" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7166
 *         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":7167
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7161
 * 
 * cdef CUresult _cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":7160
 *     return err
 * 
 * cdef CUresult _cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":7169
 *     return err
 * 
 * cdef CUresult _cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 7169, 1, __PYX_ERR(0, 7169, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7170
 * 
 * cdef CUresult _cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuEGLStreamConsumerReleaseFrame             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerReleaseFrame == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7171
 * cdef CUresult _cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 7171, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7172
 *     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":7173
 *     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":7174
 *     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__382, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7174, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7174, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7173
 *     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":7172
 *     global __cuEGLStreamConsumerReleaseFrame
 *     cuPythonInit()
 *     if __cuEGLStreamConsumerReleaseFrame == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerReleaseFrame" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7175
 *         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":7176
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7170
 * 
 * cdef CUresult _cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":7169
 *     return err
 * 
 * cdef CUresult _cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":7178
 *     return err
 * 
 * cdef CUresult _cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 7178, 1, __PYX_ERR(0, 7178, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7179
 * 
 * cdef CUresult _cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuEGLStreamProducerConnect             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamProducerConnect == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7180
 * cdef CUresult _cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 7180, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7181
 *     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":7182
 *     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":7183
 *     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__383, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7183, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7183, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7182
 *     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":7181
 *     global __cuEGLStreamProducerConnect
 *     cuPythonInit()
 *     if __cuEGLStreamProducerConnect == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerConnect" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7184
 *         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":7185
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7179
 * 
 * cdef CUresult _cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":7178
 *     return err
 * 
 * cdef CUresult _cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":7187
 *     return err
 * 
 * cdef CUresult _cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 7187, 1, __PYX_ERR(0, 7187, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7188
 * 
 * cdef CUresult _cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuEGLStreamProducerDisconnect             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamProducerDisconnect == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7189
 * cdef CUresult _cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 7189, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7190
 *     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":7191
 *     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":7192
 *     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__384, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7192, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7192, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7191
 *     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":7190
 *     global __cuEGLStreamProducerDisconnect
 *     cuPythonInit()
 *     if __cuEGLStreamProducerDisconnect == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerDisconnect" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7193
 *         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":7194
 *             raise RuntimeError('Function "cuEGLStreamProducerDisconnect" not found')
 *     err = (<CUresult (*)(CUeglStreamConnection*) nogil> __cuEGLStreamProducerDisconnect)(conn)
 *     return err             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult _cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7188
 * 
 * cdef CUresult _cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":7187
 *     return err
 * 
 * cdef CUresult _cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":7196
 *     return err
 * 
 * cdef CUresult _cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 7196, 1, __PYX_ERR(0, 7196, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7197
 * 
 * cdef CUresult _cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuEGLStreamProducerPresentFrame             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamProducerPresentFrame == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7198
 * cdef CUresult _cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 7198, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7199
 *     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":7200
 *     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":7201
 *     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__385, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7201, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7201, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7200
 *     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":7199
 *     global __cuEGLStreamProducerPresentFrame
 *     cuPythonInit()
 *     if __cuEGLStreamProducerPresentFrame == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerPresentFrame" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7202
 *         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":7203
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7197
 * 
 * cdef CUresult _cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":7196
 *     return err
 * 
 * cdef CUresult _cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":7205
 *     return err
 * 
 * cdef CUresult _cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 7205, 1, __PYX_ERR(0, 7205, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7206
 * 
 * cdef CUresult _cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuEGLStreamProducerReturnFrame             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEGLStreamProducerReturnFrame == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7207
 * cdef CUresult _cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 7207, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7208
 *     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":7209
 *     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":7210
 *     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__386, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7210, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7210, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7209
 *     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":7208
 *     global __cuEGLStreamProducerReturnFrame
 *     cuPythonInit()
 *     if __cuEGLStreamProducerReturnFrame == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerReturnFrame" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7211
 *         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":7212
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7206
 * 
 * cdef CUresult _cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":7205
 *     return err
 * 
 * cdef CUresult _cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":7214
 *     return err
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 7214, 1, __PYX_ERR(0, 7214, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7215
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphicsResourceGetMappedEglFrame             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedEglFrame == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7216
 * cdef CUresult _cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 7216, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7217
 *     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":7218
 *     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":7219
 *     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__387, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7219, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7219, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7218
 *     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":7217
 *     global __cuGraphicsResourceGetMappedEglFrame
 *     cuPythonInit()
 *     if __cuGraphicsResourceGetMappedEglFrame == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedEglFrame" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7220
 *         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":7221
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7215
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":7214
 *     return err
 * 
 * cdef CUresult _cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":7223
 *     return err
 * 
 * cdef CUresult _cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 7223, 1, __PYX_ERR(0, 7223, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7224
 * 
 * cdef CUresult _cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuEventCreateFromEGLSync             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuEventCreateFromEGLSync == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7225
 * cdef CUresult _cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 7225, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7226
 *     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":7227
 *     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":7228
 *     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__388, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7228, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7228, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7227
 *     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":7226
 *     global __cuEventCreateFromEGLSync
 *     cuPythonInit()
 *     if __cuEventCreateFromEGLSync == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuEventCreateFromEGLSync" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7229
 *         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":7230
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7224
 * 
 * cdef CUresult _cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":7223
 *     return err
 * 
 * cdef CUresult _cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":7232
 *     return err
 * 
 * cdef CUresult _cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 7232, 1, __PYX_ERR(0, 7232, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7233
 * 
 * cdef CUresult _cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphicsGLRegisterBuffer             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsGLRegisterBuffer == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7234
 * cdef CUresult _cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 7234, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7235
 *     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":7236
 *     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":7237
 *     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__389, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7237, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7237, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7236
 *     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":7235
 *     global __cuGraphicsGLRegisterBuffer
 *     cuPythonInit()
 *     if __cuGraphicsGLRegisterBuffer == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsGLRegisterBuffer" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7238
 *         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":7239
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7233
 * 
 * cdef CUresult _cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":7232
 *     return err
 * 
 * cdef CUresult _cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":7241
 *     return err
 * 
 * cdef CUresult _cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 7241, 1, __PYX_ERR(0, 7241, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7242
 * 
 * cdef CUresult _cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGraphicsGLRegisterImage             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGraphicsGLRegisterImage == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7243
 * cdef CUresult _cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 7243, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7244
 *     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":7245
 *     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":7246
 *     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__390, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7246, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7246, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7245
 *     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":7244
 *     global __cuGraphicsGLRegisterImage
 *     cuPythonInit()
 *     if __cuGraphicsGLRegisterImage == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsGLRegisterImage" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7247
 *         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":7248
 *             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) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
    __pyx_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7242
 * 
 * cdef CUresult _cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":7241
 *     return err
 * 
 * cdef CUresult _cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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":7250
 *     return err
 * 
 * cdef CUresult _cuGLGetDevices_v2(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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], 7250, 1, __PYX_ERR(0, 7250, __pyx_L1_error));

  /* "cuda/_cuda/ccuda.pyx":7251
 * 
 * cdef CUresult _cuGLGetDevices_v2(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     global __cuGLGetDevices_v2             # <<<<<<<<<<<<<<
 *     cuPythonInit()
 *     if __cuGLGetDevices_v2 == NULL:
 */
  /*try:*/ {

    /* "cuda/_cuda/ccuda.pyx":7252
 * cdef CUresult _cuGLGetDevices_v2(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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, 7252, __pyx_L4_error)

    /* "cuda/_cuda/ccuda.pyx":7253
 *     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":7254
 *     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":7255
 *     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__391, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7255, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 7255, __pyx_L8_error)
          }

          /* "cuda/_cuda/ccuda.pyx":7254
 *     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":7253
 *     global __cuGLGetDevices_v2
 *     cuPythonInit()
 *     if __cuGLGetDevices_v2 == NULL:             # <<<<<<<<<<<<<<
 *         with gil:
 *             raise RuntimeError('Function "cuGLGetDevices_v2" not found')
 */
    }

    /* "cuda/_cuda/ccuda.pyx":7256
 *         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":7257
 *             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_r = __pyx_v_err;
    goto __pyx_L3_return;
  }

  /* "cuda/_cuda/ccuda.pyx":7251
 * 
 * cdef CUresult _cuGLGetDevices_v2(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     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":7250
 *     return err
 * 
 * cdef CUresult _cuGLGetDevices_v2(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     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;
}

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_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_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_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_not_fo, __pyx_k_Function_cuGetProcAddress_not_fo, sizeof(__pyx_k_Function_cuGetProcAddress_not_fo), 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_no, __pyx_k_Function_cuGraphAddKernelNode_no, sizeof(__pyx_k_Function_cuGraphAddKernelNode_no), 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_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_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_cuGraphExecUpdate_not_f, __pyx_k_Function_cuGraphExecUpdate_not_f, sizeof(__pyx_k_Function_cuGraphExecUpdate_not_f), 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_cuGraphInstantiate_v2_n, __pyx_k_Function_cuGraphInstantiate_v2_n, sizeof(__pyx_k_Function_cuGraphInstantiate_v2_n), 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_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_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_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_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_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_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_cuProfilerInitialize_no, __pyx_k_Function_cuProfilerInitialize_no, sizeof(__pyx_k_Function_cuProfilerInitialize_no), 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_not, __pyx_k_Function_cuStreamBatchMemOp_not, sizeof(__pyx_k_Function_cuStreamBatchMemOp_not), 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_cuStreamGetCaptureInfo_2, __pyx_k_Function_cuStreamGetCaptureInfo_2, sizeof(__pyx_k_Function_cuStreamGetCaptureInfo_2), 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_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_not, __pyx_k_Function_cuStreamWaitValue32_not, sizeof(__pyx_k_Function_cuStreamWaitValue32_not), 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_not, __pyx_k_Function_cuStreamWaitValue64_not, sizeof(__pyx_k_Function_cuStreamWaitValue64_not), 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_no, __pyx_k_Function_cuStreamWriteValue32_no, sizeof(__pyx_k_Function_cuStreamWriteValue32_no), 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_no, __pyx_k_Function_cuStreamWriteValue64_no, sizeof(__pyx_k_Function_cuStreamWriteValue64_no), 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_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_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_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_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, __pyx_k_cuGetProcAddress, sizeof(__pyx_k_cuGetProcAddress), 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, __pyx_k_cuGraphAddKernelNode, sizeof(__pyx_k_cuGraphAddKernelNode), 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_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_cuGraphExecHostNodeSetParams, __pyx_k_cuGraphExecHostNodeSetParams, sizeof(__pyx_k_cuGraphExecHostNodeSetParams), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphExecKernelNodeSetParams, __pyx_k_cuGraphExecKernelNodeSetParams, sizeof(__pyx_k_cuGraphExecKernelNodeSetParams), 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_cuGraphExecUpdate, __pyx_k_cuGraphExecUpdate, sizeof(__pyx_k_cuGraphExecUpdate), 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_cuGraphInstantiate_v2, __pyx_k_cuGraphInstantiate_v2, sizeof(__pyx_k_cuGraphInstantiate_v2), 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, __pyx_k_cuGraphKernelNodeGetParams, sizeof(__pyx_k_cuGraphKernelNodeGetParams), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphKernelNodeSetAttribute, __pyx_k_cuGraphKernelNodeSetAttribute, sizeof(__pyx_k_cuGraphKernelNodeSetAttribute), 0, 1, 0, 1},
  {&__pyx_n_u_cuGraphKernelNodeSetParams, __pyx_k_cuGraphKernelNodeSetParams, sizeof(__pyx_k_cuGraphKernelNodeSetParams), 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_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_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_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_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_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_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_cuProfilerInitialize, __pyx_k_cuProfilerInitialize, sizeof(__pyx_k_cuProfilerInitialize), 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, __pyx_k_cuStreamBatchMemOp, sizeof(__pyx_k_cuStreamBatchMemOp), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamBatchMemOp_ptsz, __pyx_k_cuStreamBatchMemOp_ptsz, sizeof(__pyx_k_cuStreamBatchMemOp_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, __pyx_k_cuStreamGetCaptureInfo, sizeof(__pyx_k_cuStreamGetCaptureInfo), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamGetCaptureInfo_ptsz, __pyx_k_cuStreamGetCaptureInfo_ptsz, sizeof(__pyx_k_cuStreamGetCaptureInfo_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_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, __pyx_k_cuStreamWaitValue32, sizeof(__pyx_k_cuStreamWaitValue32), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamWaitValue32_ptsz, __pyx_k_cuStreamWaitValue32_ptsz, sizeof(__pyx_k_cuStreamWaitValue32_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, __pyx_k_cuStreamWaitValue64, sizeof(__pyx_k_cuStreamWaitValue64), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamWaitValue64_ptsz, __pyx_k_cuStreamWaitValue64_ptsz, sizeof(__pyx_k_cuStreamWaitValue64_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, __pyx_k_cuStreamWriteValue32, sizeof(__pyx_k_cuStreamWriteValue32), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamWriteValue32_ptsz, __pyx_k_cuStreamWriteValue32_ptsz, sizeof(__pyx_k_cuStreamWriteValue32_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, __pyx_k_cuStreamWriteValue64, sizeof(__pyx_k_cuStreamWriteValue64), 0, 1, 0, 1},
  {&__pyx_n_u_cuStreamWriteValue64_ptsz, __pyx_k_cuStreamWriteValue64_ptsz, sizeof(__pyx_k_cuStreamWriteValue64_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_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, 428, __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":413
 *     __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, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);

  /* "cuda/_cuda/ccuda.pyx":3754
 *     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, 3754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);

  /* "cuda/_cuda/ccuda.pyx":3763
 *     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, 3763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "cuda/_cuda/ccuda.pyx":3772
 *     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, 3772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);

  /* "cuda/_cuda/ccuda.pyx":3781
 *     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, 3781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "cuda/_cuda/ccuda.pyx":3790
 *     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, 3790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "cuda/_cuda/ccuda.pyx":3799
 *     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, 3799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);

  /* "cuda/_cuda/ccuda.pyx":3808
 *     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, 3808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "cuda/_cuda/ccuda.pyx":3817
 *     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, 3817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "cuda/_cuda/ccuda.pyx":3826
 *     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, 3826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "cuda/_cuda/ccuda.pyx":3835
 *     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, 3835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "cuda/_cuda/ccuda.pyx":3844
 *     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, 3844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);

  /* "cuda/_cuda/ccuda.pyx":3853
 *     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, 3853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);

  /* "cuda/_cuda/ccuda.pyx":3862
 *     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, 3862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);

  /* "cuda/_cuda/ccuda.pyx":3871
 *     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, 3871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "cuda/_cuda/ccuda.pyx":3880
 *     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, 3880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "cuda/_cuda/ccuda.pyx":3889
 *     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, 3889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);

  /* "cuda/_cuda/ccuda.pyx":3898
 *     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, 3898, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);

  /* "cuda/_cuda/ccuda.pyx":3907
 *     if __cuFlushGPUDirectRDMAWrites == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFlushGPUDirectRDMAWrites" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUflushGPUDirectRDMAWritesTarget, CUflushGPUDirectRDMAWritesScope) nogil> __cuFlushGPUDirectRDMAWrites)(target, scope)
 *     return err
 */
  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFlushGPUDirectRDMAWri); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 3907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__19);
  __Pyx_GIVEREF(__pyx_tuple__19);

  /* "cuda/_cuda/ccuda.pyx":3916
 *     if __cuDeviceGetProperties == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetProperties" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevprop*, CUdevice) nogil> __cuDeviceGetProperties)(prop, dev)
 *     return err
 */
  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetProperties_n); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 3916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);

  /* "cuda/_cuda/ccuda.pyx":3925
 *     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__21 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceComputeCapabili); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 3925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__21);
  __Pyx_GIVEREF(__pyx_tuple__21);

  /* "cuda/_cuda/ccuda.pyx":3934
 *     if __cuDevicePrimaryCtxRetain == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRetain" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*, CUdevice) nogil> __cuDevicePrimaryCtxRetain)(pctx, dev)
 *     return err
 */
  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDevicePrimaryCtxRetai); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 3934, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);

  /* "cuda/_cuda/ccuda.pyx":3943
 *     if __cuDevicePrimaryCtxRelease_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxRelease_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDevicePrimaryCtxRelease_v2)(dev)
 *     return err
 */
  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDevicePrimaryCtxRelea); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 3943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);

  /* "cuda/_cuda/ccuda.pyx":3952
 *     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__24 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDevicePrimaryCtxSetFl); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 3952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);

  /* "cuda/_cuda/ccuda.pyx":3961
 *     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__25 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDevicePrimaryCtxGetSt); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 3961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__25);
  __Pyx_GIVEREF(__pyx_tuple__25);

  /* "cuda/_cuda/ccuda.pyx":3970
 *     if __cuDevicePrimaryCtxReset_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDevicePrimaryCtxReset_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDevicePrimaryCtxReset_v2)(dev)
 *     return err
 */
  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDevicePrimaryCtxReset); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 3970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);

  /* "cuda/_cuda/ccuda.pyx":3979
 *     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__27 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetExecAffinity); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 3979, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "cuda/_cuda/ccuda.pyx":3988
 *     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, 3988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);

  /* "cuda/_cuda/ccuda.pyx":3997
 *     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, 3997, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);

  /* "cuda/_cuda/ccuda.pyx":4006
 *     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, 4006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);

  /* "cuda/_cuda/ccuda.pyx":4015
 *     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, 4015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);

  /* "cuda/_cuda/ccuda.pyx":4024
 *     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, 4024, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);

  /* "cuda/_cuda/ccuda.pyx":4033
 *     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, 4033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);

  /* "cuda/_cuda/ccuda.pyx":4042
 *     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, 4042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);

  /* "cuda/_cuda/ccuda.pyx":4051
 *     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, 4051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);

  /* "cuda/_cuda/ccuda.pyx":4060
 *     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, 4060, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);

  /* "cuda/_cuda/ccuda.pyx":4069
 *     if __cuCtxSynchronize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSynchronize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)() nogil> __cuCtxSynchronize)()
 *     return err
 */
  __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxSynchronize_not_fo); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 4069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);

  /* "cuda/_cuda/ccuda.pyx":4078
 *     if __cuCtxSetLimit == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetLimit" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUlimit, size_t) nogil> __cuCtxSetLimit)(limit, value)
 *     return err
 */
  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxSetLimit_not_found); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 4078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);

  /* "cuda/_cuda/ccuda.pyx":4087
 *     if __cuCtxGetLimit == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetLimit" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(size_t*, CUlimit) nogil> __cuCtxGetLimit)(pvalue, limit)
 *     return err
 */
  __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetLimit_not_found); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 4087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__39);
  __Pyx_GIVEREF(__pyx_tuple__39);

  /* "cuda/_cuda/ccuda.pyx":4096
 *     if __cuCtxGetCacheConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetCacheConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunc_cache*) nogil> __cuCtxGetCacheConfig)(pconfig)
 *     return err
 */
  __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetCacheConfig_not); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 4096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__40);
  __Pyx_GIVEREF(__pyx_tuple__40);

  /* "cuda/_cuda/ccuda.pyx":4105
 *     if __cuCtxSetCacheConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetCacheConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunc_cache) nogil> __cuCtxSetCacheConfig)(config)
 *     return err
 */
  __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxSetCacheConfig_not); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 4105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);

  /* "cuda/_cuda/ccuda.pyx":4114
 *     if __cuCtxGetSharedMemConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetSharedMemConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUsharedconfig*) nogil> __cuCtxGetSharedMemConfig)(pConfig)
 *     return err
 */
  __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetSharedMemConfig); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 4114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__42);
  __Pyx_GIVEREF(__pyx_tuple__42);

  /* "cuda/_cuda/ccuda.pyx":4123
 *     if __cuCtxSetSharedMemConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxSetSharedMemConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUsharedconfig) nogil> __cuCtxSetSharedMemConfig)(config)
 *     return err
 */
  __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxSetSharedMemConfig); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 4123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);

  /* "cuda/_cuda/ccuda.pyx":4132
 *     if __cuCtxGetApiVersion == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetApiVersion" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext, unsigned int*) nogil> __cuCtxGetApiVersion)(ctx, version)
 *     return err
 */
  __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetApiVersion_not); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 4132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);

  /* "cuda/_cuda/ccuda.pyx":4141
 *     if __cuCtxGetStreamPriorityRange == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetStreamPriorityRange" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, int*) nogil> __cuCtxGetStreamPriorityRange)(leastPriority, greatestPriority)
 *     return err
 */
  __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetStreamPriorityR); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 4141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);

  /* "cuda/_cuda/ccuda.pyx":4150
 *     if __cuCtxResetPersistingL2Cache == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxResetPersistingL2Cache" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)() nogil> __cuCtxResetPersistingL2Cache)()
 *     return err
 */
  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxResetPersistingL2C); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 4150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);

  /* "cuda/_cuda/ccuda.pyx":4159
 *     if __cuCtxGetExecAffinity == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxGetExecAffinity" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUexecAffinityParam*, CUexecAffinityType) nogil> __cuCtxGetExecAffinity)(pExecAffinity, typename)
 *     return err
 */
  __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxGetExecAffinity_no); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 4159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__47);
  __Pyx_GIVEREF(__pyx_tuple__47);

  /* "cuda/_cuda/ccuda.pyx":4168
 *     if __cuCtxAttach == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxAttach" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext*, unsigned int) nogil> __cuCtxAttach)(pctx, flags)
 *     return err
 */
  __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxAttach_not_found); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 4168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);

  /* "cuda/_cuda/ccuda.pyx":4177
 *     if __cuCtxDetach == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDetach" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDetach)(ctx)
 *     return err
 */
  __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxDetach_not_found); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 4177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__49);
  __Pyx_GIVEREF(__pyx_tuple__49);

  /* "cuda/_cuda/ccuda.pyx":4186
 *     if __cuModuleLoad == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoad" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule*, const char*) nogil> __cuModuleLoad)(module, fname)
 *     return err
 */
  __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleLoad_not_found); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 4186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__50);
  __Pyx_GIVEREF(__pyx_tuple__50);

  /* "cuda/_cuda/ccuda.pyx":4195
 *     if __cuModuleLoadData == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadData" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule*, const void*) nogil> __cuModuleLoadData)(module, image)
 *     return err
 */
  __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleLoadData_not_fo); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 4195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__51);
  __Pyx_GIVEREF(__pyx_tuple__51);

  /* "cuda/_cuda/ccuda.pyx":4204
 *     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__52 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleLoadDataEx_not); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 4204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);

  /* "cuda/_cuda/ccuda.pyx":4213
 *     if __cuModuleLoadFatBinary == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleLoadFatBinary" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule*, const void*) nogil> __cuModuleLoadFatBinary)(module, fatCubin)
 *     return err
 */
  __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleLoadFatBinary_n); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 4213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__53);
  __Pyx_GIVEREF(__pyx_tuple__53);

  /* "cuda/_cuda/ccuda.pyx":4222
 *     if __cuModuleUnload == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleUnload" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule) nogil> __cuModuleUnload)(hmod)
 *     return err
 */
  __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleUnload_not_foun); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 4222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);

  /* "cuda/_cuda/ccuda.pyx":4231
 *     if __cuModuleGetLoadingMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuModuleGetLoadingMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmoduleLoadingMode*) nogil> __cuModuleGetLoadingMode)(mode)
 *     return err
 */
  __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleGetLoadingMode); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 4231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);

  /* "cuda/_cuda/ccuda.pyx":4240
 *     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__56 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleGetFunction_not); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 4240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);

  /* "cuda/_cuda/ccuda.pyx":4249
 *     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__57 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleGetGlobal_v2_no); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 4249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);

  /* "cuda/_cuda/ccuda.pyx":4258
 *     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__58 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleGetTexRef_not_f); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 4258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);

  /* "cuda/_cuda/ccuda.pyx":4267
 *     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__59 = PyTuple_Pack(1, __pyx_kp_u_Function_cuModuleGetSurfRef_not); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 4267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);

  /* "cuda/_cuda/ccuda.pyx":4276
 *     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, 4276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__60);
  __Pyx_GIVEREF(__pyx_tuple__60);

  /* "cuda/_cuda/ccuda.pyx":4285
 *     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, 4285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__61);
  __Pyx_GIVEREF(__pyx_tuple__61);

  /* "cuda/_cuda/ccuda.pyx":4294
 *     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, 4294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);

  /* "cuda/_cuda/ccuda.pyx":4303
 *     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, 4303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);

  /* "cuda/_cuda/ccuda.pyx":4312
 *     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, 4312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__64);
  __Pyx_GIVEREF(__pyx_tuple__64);

  /* "cuda/_cuda/ccuda.pyx":4321
 *     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__65 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemGetInfo_v2_not_fou); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 4321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);

  /* "cuda/_cuda/ccuda.pyx":4330
 *     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__66 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAlloc_v2_not_found); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 4330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);

  /* "cuda/_cuda/ccuda.pyx":4339
 *     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__67 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAllocPitch_v2_not); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 4339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__67);
  __Pyx_GIVEREF(__pyx_tuple__67);

  /* "cuda/_cuda/ccuda.pyx":4348
 *     if __cuMemFree_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemFree_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr) nogil> __cuMemFree_v2)(dptr)
 *     return err
 */
  __pyx_tuple__68 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemFree_v2_not_found); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 4348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);

  /* "cuda/_cuda/ccuda.pyx":4357
 *     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__69 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemGetAddressRange_v2); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 4357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__69);
  __Pyx_GIVEREF(__pyx_tuple__69);

  /* "cuda/_cuda/ccuda.pyx":4366
 *     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__70 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAllocHost_v2_not_f); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 4366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);

  /* "cuda/_cuda/ccuda.pyx":4375
 *     if __cuMemFreeHost == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemFreeHost" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*) nogil> __cuMemFreeHost)(p)
 *     return err
 */
  __pyx_tuple__71 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemFreeHost_not_found); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 4375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__71);
  __Pyx_GIVEREF(__pyx_tuple__71);

  /* "cuda/_cuda/ccuda.pyx":4384
 *     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__72 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemHostAlloc_not_foun); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 4384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__72);
  __Pyx_GIVEREF(__pyx_tuple__72);

  /* "cuda/_cuda/ccuda.pyx":4393
 *     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__73 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemHostGetDevicePoint); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 4393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__73);
  __Pyx_GIVEREF(__pyx_tuple__73);

  /* "cuda/_cuda/ccuda.pyx":4402
 *     if __cuMemHostGetFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostGetFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int*, void*) nogil> __cuMemHostGetFlags)(pFlags, p)
 *     return err
 */
  __pyx_tuple__74 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemHostGetFlags_not_f); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 4402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);

  /* "cuda/_cuda/ccuda.pyx":4411
 *     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__75 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAllocManaged_not_f); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 4411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);

  /* "cuda/_cuda/ccuda.pyx":4420
 *     if __cuDeviceGetByPCIBusId == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGetByPCIBusId" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice*, const char*) nogil> __cuDeviceGetByPCIBusId)(dev, pciBusId)
 *     return err
 */
  __pyx_tuple__76 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetByPCIBusId_n); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 4420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);

  /* "cuda/_cuda/ccuda.pyx":4429
 *     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__77 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetPCIBusId_not); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 4429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__77);
  __Pyx_GIVEREF(__pyx_tuple__77);

  /* "cuda/_cuda/ccuda.pyx":4438
 *     if __cuIpcGetEventHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuIpcGetEventHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUipcEventHandle*, CUevent) nogil> __cuIpcGetEventHandle)(pHandle, event)
 *     return err
 */
  __pyx_tuple__78 = PyTuple_Pack(1, __pyx_kp_u_Function_cuIpcGetEventHandle_not); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 4438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__78);
  __Pyx_GIVEREF(__pyx_tuple__78);

  /* "cuda/_cuda/ccuda.pyx":4447
 *     if __cuIpcOpenEventHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuIpcOpenEventHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent*, CUipcEventHandle) nogil> __cuIpcOpenEventHandle)(phEvent, handle)
 *     return err
 */
  __pyx_tuple__79 = PyTuple_Pack(1, __pyx_kp_u_Function_cuIpcOpenEventHandle_no); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 4447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);

  /* "cuda/_cuda/ccuda.pyx":4456
 *     if __cuIpcGetMemHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuIpcGetMemHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUipcMemHandle*, CUdeviceptr) nogil> __cuIpcGetMemHandle)(pHandle, dptr)
 *     return err
 */
  __pyx_tuple__80 = PyTuple_Pack(1, __pyx_kp_u_Function_cuIpcGetMemHandle_not_f); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 4456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__80);
  __Pyx_GIVEREF(__pyx_tuple__80);

  /* "cuda/_cuda/ccuda.pyx":4465
 *     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__81 = PyTuple_Pack(1, __pyx_kp_u_Function_cuIpcOpenMemHandle_v2_n); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 4465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);

  /* "cuda/_cuda/ccuda.pyx":4474
 *     if __cuIpcCloseMemHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuIpcCloseMemHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr) nogil> __cuIpcCloseMemHandle)(dptr)
 *     return err
 */
  __pyx_tuple__82 = PyTuple_Pack(1, __pyx_kp_u_Function_cuIpcCloseMemHandle_not); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 4474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__82);
  __Pyx_GIVEREF(__pyx_tuple__82);

  /* "cuda/_cuda/ccuda.pyx":4483
 *     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__83 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemHostRegister_v2_no); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 4483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__83);
  __Pyx_GIVEREF(__pyx_tuple__83);

  /* "cuda/_cuda/ccuda.pyx":4492
 *     if __cuMemHostUnregister == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemHostUnregister" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(void*) nogil> __cuMemHostUnregister)(p)
 *     return err
 */
  __pyx_tuple__84 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemHostUnregister_not); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 4492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__84);
  __Pyx_GIVEREF(__pyx_tuple__84);

  /* "cuda/_cuda/ccuda.pyx":4501
 *     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__85 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpy_not_found); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 4501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__85);
  __Pyx_GIVEREF(__pyx_tuple__85);

  /* "cuda/_cuda/ccuda.pyx":4510
 *     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__86 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyPeer_not_found); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 4510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);

  /* "cuda/_cuda/ccuda.pyx":4519
 *     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__87 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyHtoD_v2_not_fou); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 4519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__87);
  __Pyx_GIVEREF(__pyx_tuple__87);

  /* "cuda/_cuda/ccuda.pyx":4528
 *     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__88 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyDtoH_v2_not_fou); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 4528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__88);
  __Pyx_GIVEREF(__pyx_tuple__88);

  /* "cuda/_cuda/ccuda.pyx":4537
 *     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__89 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyDtoD_v2_not_fou); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 4537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__89);
  __Pyx_GIVEREF(__pyx_tuple__89);

  /* "cuda/_cuda/ccuda.pyx":4546
 *     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__90 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyDtoA_v2_not_fou); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 4546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);

  /* "cuda/_cuda/ccuda.pyx":4555
 *     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__91 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyAtoD_v2_not_fou); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 4555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__91);
  __Pyx_GIVEREF(__pyx_tuple__91);

  /* "cuda/_cuda/ccuda.pyx":4564
 *     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__92 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyHtoA_v2_not_fou); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 4564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);

  /* "cuda/_cuda/ccuda.pyx":4573
 *     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__93 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyAtoH_v2_not_fou); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 4573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__93);
  __Pyx_GIVEREF(__pyx_tuple__93);

  /* "cuda/_cuda/ccuda.pyx":4582
 *     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__94 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyAtoA_v2_not_fou); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 4582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__94);
  __Pyx_GIVEREF(__pyx_tuple__94);

  /* "cuda/_cuda/ccuda.pyx":4591
 *     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__95 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpy2D_v2_not_found); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 4591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__95);
  __Pyx_GIVEREF(__pyx_tuple__95);

  /* "cuda/_cuda/ccuda.pyx":4600
 *     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__96 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpy2DUnaligned_v2); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 4600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__96);
  __Pyx_GIVEREF(__pyx_tuple__96);

  /* "cuda/_cuda/ccuda.pyx":4609
 *     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__97 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpy3D_v2_not_found); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 4609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__97);
  __Pyx_GIVEREF(__pyx_tuple__97);

  /* "cuda/_cuda/ccuda.pyx":4618
 *     if __cuMemcpy3DPeer == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemcpy3DPeer" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const CUDA_MEMCPY3D_PEER*) nogil> __cuMemcpy3DPeer)(pCopy)
 *     return err
 */
  __pyx_tuple__98 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpy3DPeer_not_foun); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 4618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__98);
  __Pyx_GIVEREF(__pyx_tuple__98);

  /* "cuda/_cuda/ccuda.pyx":4627
 *     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__99 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyAsync_not_found); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 4627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__99);
  __Pyx_GIVEREF(__pyx_tuple__99);

  /* "cuda/_cuda/ccuda.pyx":4636
 *     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__100 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyPeerAsync_not_f); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 4636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__100);
  __Pyx_GIVEREF(__pyx_tuple__100);

  /* "cuda/_cuda/ccuda.pyx":4645
 *     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__101 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyHtoDAsync_v2_no); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 4645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__101);
  __Pyx_GIVEREF(__pyx_tuple__101);

  /* "cuda/_cuda/ccuda.pyx":4654
 *     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__102 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyDtoHAsync_v2_no); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 4654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__102);
  __Pyx_GIVEREF(__pyx_tuple__102);

  /* "cuda/_cuda/ccuda.pyx":4663
 *     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__103 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyDtoDAsync_v2_no); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 4663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__103);
  __Pyx_GIVEREF(__pyx_tuple__103);

  /* "cuda/_cuda/ccuda.pyx":4672
 *     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__104 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyHtoAAsync_v2_no); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 4672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__104);
  __Pyx_GIVEREF(__pyx_tuple__104);

  /* "cuda/_cuda/ccuda.pyx":4681
 *     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__105 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpyAtoHAsync_v2_no); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 4681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__105);
  __Pyx_GIVEREF(__pyx_tuple__105);

  /* "cuda/_cuda/ccuda.pyx":4690
 *     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__106 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpy2DAsync_v2_not); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 4690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__106);
  __Pyx_GIVEREF(__pyx_tuple__106);

  /* "cuda/_cuda/ccuda.pyx":4699
 *     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__107 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpy3DAsync_v2_not); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 4699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__107);
  __Pyx_GIVEREF(__pyx_tuple__107);

  /* "cuda/_cuda/ccuda.pyx":4708
 *     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__108 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemcpy3DPeerAsync_not); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 4708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__108);
  __Pyx_GIVEREF(__pyx_tuple__108);

  /* "cuda/_cuda/ccuda.pyx":4717
 *     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__109 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD8_v2_not_found); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(0, 4717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__109);
  __Pyx_GIVEREF(__pyx_tuple__109);

  /* "cuda/_cuda/ccuda.pyx":4726
 *     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__110 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD16_v2_not_foun); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 4726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__110);
  __Pyx_GIVEREF(__pyx_tuple__110);

  /* "cuda/_cuda/ccuda.pyx":4735
 *     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__111 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD32_v2_not_foun); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 4735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__111);
  __Pyx_GIVEREF(__pyx_tuple__111);

  /* "cuda/_cuda/ccuda.pyx":4744
 *     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__112 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD2D8_v2_not_fou); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 4744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__112);
  __Pyx_GIVEREF(__pyx_tuple__112);

  /* "cuda/_cuda/ccuda.pyx":4753
 *     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__113 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD2D16_v2_not_fo); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(0, 4753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__113);
  __Pyx_GIVEREF(__pyx_tuple__113);

  /* "cuda/_cuda/ccuda.pyx":4762
 *     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__114 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD2D32_v2_not_fo); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 4762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__114);
  __Pyx_GIVEREF(__pyx_tuple__114);

  /* "cuda/_cuda/ccuda.pyx":4771
 *     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__115 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD8Async_not_fou); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(0, 4771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__115);
  __Pyx_GIVEREF(__pyx_tuple__115);

  /* "cuda/_cuda/ccuda.pyx":4780
 *     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__116 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD16Async_not_fo); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(0, 4780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__116);
  __Pyx_GIVEREF(__pyx_tuple__116);

  /* "cuda/_cuda/ccuda.pyx":4789
 *     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__117 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD32Async_not_fo); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(0, 4789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__117);
  __Pyx_GIVEREF(__pyx_tuple__117);

  /* "cuda/_cuda/ccuda.pyx":4798
 *     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__118 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD2D8Async_not_f); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 4798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__118);
  __Pyx_GIVEREF(__pyx_tuple__118);

  /* "cuda/_cuda/ccuda.pyx":4807
 *     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__119 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD2D16Async_not); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(0, 4807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__119);
  __Pyx_GIVEREF(__pyx_tuple__119);

  /* "cuda/_cuda/ccuda.pyx":4816
 *     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__120 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemsetD2D32Async_not); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 4816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__120);
  __Pyx_GIVEREF(__pyx_tuple__120);

  /* "cuda/_cuda/ccuda.pyx":4825
 *     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__121 = PyTuple_Pack(1, __pyx_kp_u_Function_cuArrayCreate_v2_not_fo); if (unlikely(!__pyx_tuple__121)) __PYX_ERR(0, 4825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__121);
  __Pyx_GIVEREF(__pyx_tuple__121);

  /* "cuda/_cuda/ccuda.pyx":4834
 *     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__122 = PyTuple_Pack(1, __pyx_kp_u_Function_cuArrayGetDescriptor_v2); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 4834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__122);
  __Pyx_GIVEREF(__pyx_tuple__122);

  /* "cuda/_cuda/ccuda.pyx":4843
 *     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__123 = PyTuple_Pack(1, __pyx_kp_u_Function_cuArrayGetSparsePropert); if (unlikely(!__pyx_tuple__123)) __PYX_ERR(0, 4843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__123);
  __Pyx_GIVEREF(__pyx_tuple__123);

  /* "cuda/_cuda/ccuda.pyx":4852
 *     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__124 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMipmappedArrayGetSpar); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 4852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__124);
  __Pyx_GIVEREF(__pyx_tuple__124);

  /* "cuda/_cuda/ccuda.pyx":4861
 *     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__125 = PyTuple_Pack(1, __pyx_kp_u_Function_cuArrayGetMemoryRequire); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(0, 4861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__125);
  __Pyx_GIVEREF(__pyx_tuple__125);

  /* "cuda/_cuda/ccuda.pyx":4870
 *     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__126 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMipmappedArrayGetMemo); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(0, 4870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__126);
  __Pyx_GIVEREF(__pyx_tuple__126);

  /* "cuda/_cuda/ccuda.pyx":4879
 *     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__127 = PyTuple_Pack(1, __pyx_kp_u_Function_cuArrayGetPlane_not_fou); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(0, 4879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__127);
  __Pyx_GIVEREF(__pyx_tuple__127);

  /* "cuda/_cuda/ccuda.pyx":4888
 *     if __cuArrayDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuArrayDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray) nogil> __cuArrayDestroy)(hArray)
 *     return err
 */
  __pyx_tuple__128 = PyTuple_Pack(1, __pyx_kp_u_Function_cuArrayDestroy_not_foun); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(0, 4888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__128);
  __Pyx_GIVEREF(__pyx_tuple__128);

  /* "cuda/_cuda/ccuda.pyx":4897
 *     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__129 = PyTuple_Pack(1, __pyx_kp_u_Function_cuArray3DCreate_v2_not); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(0, 4897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__129);
  __Pyx_GIVEREF(__pyx_tuple__129);

  /* "cuda/_cuda/ccuda.pyx":4906
 *     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__130 = PyTuple_Pack(1, __pyx_kp_u_Function_cuArray3DGetDescriptor); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(0, 4906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__130);
  __Pyx_GIVEREF(__pyx_tuple__130);

  /* "cuda/_cuda/ccuda.pyx":4915
 *     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__131 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMipmappedArrayCreate); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(0, 4915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__131);
  __Pyx_GIVEREF(__pyx_tuple__131);

  /* "cuda/_cuda/ccuda.pyx":4924
 *     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__132 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMipmappedArrayGetLeve); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(0, 4924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__132);
  __Pyx_GIVEREF(__pyx_tuple__132);

  /* "cuda/_cuda/ccuda.pyx":4933
 *     if __cuMipmappedArrayDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMipmappedArrayDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmipmappedArray) nogil> __cuMipmappedArrayDestroy)(hMipmappedArray)
 *     return err
 */
  __pyx_tuple__133 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMipmappedArrayDestroy); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(0, 4933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__133);
  __Pyx_GIVEREF(__pyx_tuple__133);

  /* "cuda/_cuda/ccuda.pyx":4942
 *     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__134 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemGetHandleForAddres); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(0, 4942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__134);
  __Pyx_GIVEREF(__pyx_tuple__134);

  /* "cuda/_cuda/ccuda.pyx":4951
 *     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__135 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAddressReserve_not); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(0, 4951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__135);
  __Pyx_GIVEREF(__pyx_tuple__135);

  /* "cuda/_cuda/ccuda.pyx":4960
 *     if __cuMemAddressFree == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemAddressFree" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t) nogil> __cuMemAddressFree)(ptr, size)
 *     return err
 */
  __pyx_tuple__136 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAddressFree_not_fo); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(0, 4960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__136);
  __Pyx_GIVEREF(__pyx_tuple__136);

  /* "cuda/_cuda/ccuda.pyx":4969
 *     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__137 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemCreate_not_found); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(0, 4969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__137);
  __Pyx_GIVEREF(__pyx_tuple__137);

  /* "cuda/_cuda/ccuda.pyx":4978
 *     if __cuMemRelease == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemRelease" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle) nogil> __cuMemRelease)(handle)
 *     return err
 */
  __pyx_tuple__138 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemRelease_not_found); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(0, 4978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__138);
  __Pyx_GIVEREF(__pyx_tuple__138);

  /* "cuda/_cuda/ccuda.pyx":4987
 *     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__139 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemMap_not_found); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(0, 4987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__139);
  __Pyx_GIVEREF(__pyx_tuple__139);

  /* "cuda/_cuda/ccuda.pyx":4996
 *     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__140 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemMapArrayAsync_not); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(0, 4996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__140);
  __Pyx_GIVEREF(__pyx_tuple__140);

  /* "cuda/_cuda/ccuda.pyx":5005
 *     if __cuMemUnmap == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemUnmap" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, size_t) nogil> __cuMemUnmap)(ptr, size)
 *     return err
 */
  __pyx_tuple__141 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemUnmap_not_found); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(0, 5005, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__141);
  __Pyx_GIVEREF(__pyx_tuple__141);

  /* "cuda/_cuda/ccuda.pyx":5014
 *     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__142 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemSetAccess_not_foun); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(0, 5014, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__142);
  __Pyx_GIVEREF(__pyx_tuple__142);

  /* "cuda/_cuda/ccuda.pyx":5023
 *     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__143 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemGetAccess_not_foun); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(0, 5023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__143);
  __Pyx_GIVEREF(__pyx_tuple__143);

  /* "cuda/_cuda/ccuda.pyx":5032
 *     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__144 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemExportToShareableH); if (unlikely(!__pyx_tuple__144)) __PYX_ERR(0, 5032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__144);
  __Pyx_GIVEREF(__pyx_tuple__144);

  /* "cuda/_cuda/ccuda.pyx":5041
 *     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__145 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemImportFromShareabl); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(0, 5041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__145);
  __Pyx_GIVEREF(__pyx_tuple__145);

  /* "cuda/_cuda/ccuda.pyx":5050
 *     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__146 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemGetAllocationGranu); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(0, 5050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__146);
  __Pyx_GIVEREF(__pyx_tuple__146);

  /* "cuda/_cuda/ccuda.pyx":5059
 *     if __cuMemGetAllocationPropertiesFromHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemGetAllocationPropertiesFromHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemAllocationProp*, CUmemGenericAllocationHandle) nogil> __cuMemGetAllocationPropertiesFromHandle)(prop, handle)
 *     return err
 */
  __pyx_tuple__147 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemGetAllocationPrope); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(0, 5059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__147);
  __Pyx_GIVEREF(__pyx_tuple__147);

  /* "cuda/_cuda/ccuda.pyx":5068
 *     if __cuMemRetainAllocationHandle == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemRetainAllocationHandle" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemGenericAllocationHandle*, void*) nogil> __cuMemRetainAllocationHandle)(handle, addr)
 *     return err
 */
  __pyx_tuple__148 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemRetainAllocationHa); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(0, 5068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__148);
  __Pyx_GIVEREF(__pyx_tuple__148);

  /* "cuda/_cuda/ccuda.pyx":5077
 *     if __cuMemFreeAsync == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemFreeAsync" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdeviceptr, CUstream) nogil> __cuMemFreeAsync)(dptr, hStream)
 *     return err
 */
  __pyx_tuple__149 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemFreeAsync_not_foun); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(0, 5077, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__149);
  __Pyx_GIVEREF(__pyx_tuple__149);

  /* "cuda/_cuda/ccuda.pyx":5086
 *     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__150 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAllocAsync_not_fou); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(0, 5086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__150);
  __Pyx_GIVEREF(__pyx_tuple__150);

  /* "cuda/_cuda/ccuda.pyx":5095
 *     if __cuMemPoolTrimTo == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolTrimTo" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool, size_t) nogil> __cuMemPoolTrimTo)(pool, minBytesToKeep)
 *     return err
 */
  __pyx_tuple__151 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolTrimTo_not_fou); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(0, 5095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__151);
  __Pyx_GIVEREF(__pyx_tuple__151);

  /* "cuda/_cuda/ccuda.pyx":5104
 *     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__152 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolSetAttribute_n); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(0, 5104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__152);
  __Pyx_GIVEREF(__pyx_tuple__152);

  /* "cuda/_cuda/ccuda.pyx":5113
 *     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__153 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolGetAttribute_n); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(0, 5113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__153);
  __Pyx_GIVEREF(__pyx_tuple__153);

  /* "cuda/_cuda/ccuda.pyx":5122
 *     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__154 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolSetAccess_not); if (unlikely(!__pyx_tuple__154)) __PYX_ERR(0, 5122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__154);
  __Pyx_GIVEREF(__pyx_tuple__154);

  /* "cuda/_cuda/ccuda.pyx":5131
 *     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__155 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolGetAccess_not); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(0, 5131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__155);
  __Pyx_GIVEREF(__pyx_tuple__155);

  /* "cuda/_cuda/ccuda.pyx":5140
 *     if __cuMemPoolCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool*, const CUmemPoolProps*) nogil> __cuMemPoolCreate)(pool, poolProps)
 *     return err
 */
  __pyx_tuple__156 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolCreate_not_fou); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(0, 5140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__156);
  __Pyx_GIVEREF(__pyx_tuple__156);

  /* "cuda/_cuda/ccuda.pyx":5149
 *     if __cuMemPoolDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemoryPool) nogil> __cuMemPoolDestroy)(pool)
 *     return err
 */
  __pyx_tuple__157 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolDestroy_not_fo); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(0, 5149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__157);
  __Pyx_GIVEREF(__pyx_tuple__157);

  /* "cuda/_cuda/ccuda.pyx":5158
 *     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__158 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAllocFromPoolAsync); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(0, 5158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__158);
  __Pyx_GIVEREF(__pyx_tuple__158);

  /* "cuda/_cuda/ccuda.pyx":5167
 *     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__159 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolExportToSharea); if (unlikely(!__pyx_tuple__159)) __PYX_ERR(0, 5167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__159);
  __Pyx_GIVEREF(__pyx_tuple__159);

  /* "cuda/_cuda/ccuda.pyx":5176
 *     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__160 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolImportFromShar); if (unlikely(!__pyx_tuple__160)) __PYX_ERR(0, 5176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__160);
  __Pyx_GIVEREF(__pyx_tuple__160);

  /* "cuda/_cuda/ccuda.pyx":5185
 *     if __cuMemPoolExportPointer == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuMemPoolExportPointer" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmemPoolPtrExportData*, CUdeviceptr) nogil> __cuMemPoolExportPointer)(shareData_out, ptr)
 *     return err
 */
  __pyx_tuple__161 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolExportPointer); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(0, 5185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__161);
  __Pyx_GIVEREF(__pyx_tuple__161);

  /* "cuda/_cuda/ccuda.pyx":5194
 *     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__162 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPoolImportPointer); if (unlikely(!__pyx_tuple__162)) __PYX_ERR(0, 5194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__162);
  __Pyx_GIVEREF(__pyx_tuple__162);

  /* "cuda/_cuda/ccuda.pyx":5203
 *     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__163 = PyTuple_Pack(1, __pyx_kp_u_Function_cuPointerGetAttribute_n); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(0, 5203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__163);
  __Pyx_GIVEREF(__pyx_tuple__163);

  /* "cuda/_cuda/ccuda.pyx":5212
 *     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__164 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemPrefetchAsync_not); if (unlikely(!__pyx_tuple__164)) __PYX_ERR(0, 5212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__164);
  __Pyx_GIVEREF(__pyx_tuple__164);

  /* "cuda/_cuda/ccuda.pyx":5221
 *     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__165 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemAdvise_not_found); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(0, 5221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__165);
  __Pyx_GIVEREF(__pyx_tuple__165);

  /* "cuda/_cuda/ccuda.pyx":5230
 *     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__166 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemRangeGetAttribute); if (unlikely(!__pyx_tuple__166)) __PYX_ERR(0, 5230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__166);
  __Pyx_GIVEREF(__pyx_tuple__166);

  /* "cuda/_cuda/ccuda.pyx":5239
 *     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__167 = PyTuple_Pack(1, __pyx_kp_u_Function_cuMemRangeGetAttributes); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(0, 5239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__167);
  __Pyx_GIVEREF(__pyx_tuple__167);

  /* "cuda/_cuda/ccuda.pyx":5248
 *     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__168 = PyTuple_Pack(1, __pyx_kp_u_Function_cuPointerSetAttribute_n); if (unlikely(!__pyx_tuple__168)) __PYX_ERR(0, 5248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__168);
  __Pyx_GIVEREF(__pyx_tuple__168);

  /* "cuda/_cuda/ccuda.pyx":5257
 *     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__169 = PyTuple_Pack(1, __pyx_kp_u_Function_cuPointerGetAttributes); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(0, 5257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__169);
  __Pyx_GIVEREF(__pyx_tuple__169);

  /* "cuda/_cuda/ccuda.pyx":5266
 *     if __cuStreamCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream*, unsigned int) nogil> __cuStreamCreate)(phStream, Flags)
 *     return err
 */
  __pyx_tuple__170 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamCreate_not_foun); if (unlikely(!__pyx_tuple__170)) __PYX_ERR(0, 5266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__170);
  __Pyx_GIVEREF(__pyx_tuple__170);

  /* "cuda/_cuda/ccuda.pyx":5275
 *     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__171 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamCreateWithPrior); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(0, 5275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__171);
  __Pyx_GIVEREF(__pyx_tuple__171);

  /* "cuda/_cuda/ccuda.pyx":5284
 *     if __cuStreamGetPriority == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetPriority" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, int*) nogil> __cuStreamGetPriority)(hStream, priority)
 *     return err
 */
  __pyx_tuple__172 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamGetPriority_not); if (unlikely(!__pyx_tuple__172)) __PYX_ERR(0, 5284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__172);
  __Pyx_GIVEREF(__pyx_tuple__172);

  /* "cuda/_cuda/ccuda.pyx":5293
 *     if __cuStreamGetFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, unsigned int*) nogil> __cuStreamGetFlags)(hStream, flags)
 *     return err
 */
  __pyx_tuple__173 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamGetFlags_not_fo); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(0, 5293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__173);
  __Pyx_GIVEREF(__pyx_tuple__173);

  /* "cuda/_cuda/ccuda.pyx":5302
 *     if __cuStreamGetCtx == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetCtx" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUcontext*) nogil> __cuStreamGetCtx)(hStream, pctx)
 *     return err
 */
  __pyx_tuple__174 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamGetCtx_not_foun); if (unlikely(!__pyx_tuple__174)) __PYX_ERR(0, 5302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__174);
  __Pyx_GIVEREF(__pyx_tuple__174);

  /* "cuda/_cuda/ccuda.pyx":5311
 *     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__175 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamWaitEvent_not_f); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(0, 5311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__175);
  __Pyx_GIVEREF(__pyx_tuple__175);

  /* "cuda/_cuda/ccuda.pyx":5320
 *     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__176 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamAddCallback_not); if (unlikely(!__pyx_tuple__176)) __PYX_ERR(0, 5320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__176);
  __Pyx_GIVEREF(__pyx_tuple__176);

  /* "cuda/_cuda/ccuda.pyx":5329
 *     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__177 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamBeginCapture_v2); if (unlikely(!__pyx_tuple__177)) __PYX_ERR(0, 5329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__177);
  __Pyx_GIVEREF(__pyx_tuple__177);

  /* "cuda/_cuda/ccuda.pyx":5338
 *     if __cuThreadExchangeStreamCaptureMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuThreadExchangeStreamCaptureMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstreamCaptureMode*) nogil> __cuThreadExchangeStreamCaptureMode)(mode)
 *     return err
 */
  __pyx_tuple__178 = PyTuple_Pack(1, __pyx_kp_u_Function_cuThreadExchangeStreamC); if (unlikely(!__pyx_tuple__178)) __PYX_ERR(0, 5338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__178);
  __Pyx_GIVEREF(__pyx_tuple__178);

  /* "cuda/_cuda/ccuda.pyx":5347
 *     if __cuStreamEndCapture == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamEndCapture" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUgraph*) nogil> __cuStreamEndCapture)(hStream, phGraph)
 *     return err
 */
  __pyx_tuple__179 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamEndCapture_not); if (unlikely(!__pyx_tuple__179)) __PYX_ERR(0, 5347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__179);
  __Pyx_GIVEREF(__pyx_tuple__179);

  /* "cuda/_cuda/ccuda.pyx":5356
 *     if __cuStreamIsCapturing == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamIsCapturing" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureStatus*) nogil> __cuStreamIsCapturing)(hStream, captureStatus)
 *     return err
 */
  __pyx_tuple__180 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamIsCapturing_not); if (unlikely(!__pyx_tuple__180)) __PYX_ERR(0, 5356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__180);
  __Pyx_GIVEREF(__pyx_tuple__180);

  /* "cuda/_cuda/ccuda.pyx":5365
 *     if __cuStreamGetCaptureInfo == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamGetCaptureInfo" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUstreamCaptureStatus*, cuuint64_t*) nogil> __cuStreamGetCaptureInfo)(hStream, captureStatus_out, id_out)
 *     return err
 */
  __pyx_tuple__181 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamGetCaptureInfo); if (unlikely(!__pyx_tuple__181)) __PYX_ERR(0, 5365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__181);
  __Pyx_GIVEREF(__pyx_tuple__181);

  /* "cuda/_cuda/ccuda.pyx":5374
 *     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__182 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamGetCaptureInfo_2); if (unlikely(!__pyx_tuple__182)) __PYX_ERR(0, 5374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__182);
  __Pyx_GIVEREF(__pyx_tuple__182);

  /* "cuda/_cuda/ccuda.pyx":5383
 *     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__183 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamUpdateCaptureDe); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(0, 5383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__183);
  __Pyx_GIVEREF(__pyx_tuple__183);

  /* "cuda/_cuda/ccuda.pyx":5392
 *     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__184 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamAttachMemAsync); if (unlikely(!__pyx_tuple__184)) __PYX_ERR(0, 5392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__184);
  __Pyx_GIVEREF(__pyx_tuple__184);

  /* "cuda/_cuda/ccuda.pyx":5401
 *     if __cuStreamQuery == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamQuery" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamQuery)(hStream)
 *     return err
 */
  __pyx_tuple__185 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamQuery_not_found); if (unlikely(!__pyx_tuple__185)) __PYX_ERR(0, 5401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__185);
  __Pyx_GIVEREF(__pyx_tuple__185);

  /* "cuda/_cuda/ccuda.pyx":5410
 *     if __cuStreamSynchronize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamSynchronize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamSynchronize)(hStream)
 *     return err
 */
  __pyx_tuple__186 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamSynchronize_not); if (unlikely(!__pyx_tuple__186)) __PYX_ERR(0, 5410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__186);
  __Pyx_GIVEREF(__pyx_tuple__186);

  /* "cuda/_cuda/ccuda.pyx":5419
 *     if __cuStreamDestroy_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamDestroy_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream) nogil> __cuStreamDestroy_v2)(hStream)
 *     return err
 */
  __pyx_tuple__187 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamDestroy_v2_not); if (unlikely(!__pyx_tuple__187)) __PYX_ERR(0, 5419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__187);
  __Pyx_GIVEREF(__pyx_tuple__187);

  /* "cuda/_cuda/ccuda.pyx":5428
 *     if __cuStreamCopyAttributes == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamCopyAttributes" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUstream) nogil> __cuStreamCopyAttributes)(dst, src)
 *     return err
 */
  __pyx_tuple__188 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamCopyAttributes); if (unlikely(!__pyx_tuple__188)) __PYX_ERR(0, 5428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__188);
  __Pyx_GIVEREF(__pyx_tuple__188);

  /* "cuda/_cuda/ccuda.pyx":5437
 *     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__189 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamGetAttribute_no); if (unlikely(!__pyx_tuple__189)) __PYX_ERR(0, 5437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__189);
  __Pyx_GIVEREF(__pyx_tuple__189);

  /* "cuda/_cuda/ccuda.pyx":5446
 *     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__190 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamSetAttribute_no); if (unlikely(!__pyx_tuple__190)) __PYX_ERR(0, 5446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__190);
  __Pyx_GIVEREF(__pyx_tuple__190);

  /* "cuda/_cuda/ccuda.pyx":5455
 *     if __cuEventCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent*, unsigned int) nogil> __cuEventCreate)(phEvent, Flags)
 *     return err
 */
  __pyx_tuple__191 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventCreate_not_found); if (unlikely(!__pyx_tuple__191)) __PYX_ERR(0, 5455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__191);
  __Pyx_GIVEREF(__pyx_tuple__191);

  /* "cuda/_cuda/ccuda.pyx":5464
 *     if __cuEventRecord == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventRecord" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent, CUstream) nogil> __cuEventRecord)(hEvent, hStream)
 *     return err
 */
  __pyx_tuple__192 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventRecord_not_found); if (unlikely(!__pyx_tuple__192)) __PYX_ERR(0, 5464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__192);
  __Pyx_GIVEREF(__pyx_tuple__192);

  /* "cuda/_cuda/ccuda.pyx":5473
 *     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__193 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventRecordWithFlags); if (unlikely(!__pyx_tuple__193)) __PYX_ERR(0, 5473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__193);
  __Pyx_GIVEREF(__pyx_tuple__193);

  /* "cuda/_cuda/ccuda.pyx":5482
 *     if __cuEventQuery == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventQuery" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventQuery)(hEvent)
 *     return err
 */
  __pyx_tuple__194 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventQuery_not_found); if (unlikely(!__pyx_tuple__194)) __PYX_ERR(0, 5482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__194);
  __Pyx_GIVEREF(__pyx_tuple__194);

  /* "cuda/_cuda/ccuda.pyx":5491
 *     if __cuEventSynchronize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventSynchronize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventSynchronize)(hEvent)
 *     return err
 */
  __pyx_tuple__195 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventSynchronize_not); if (unlikely(!__pyx_tuple__195)) __PYX_ERR(0, 5491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__195);
  __Pyx_GIVEREF(__pyx_tuple__195);

  /* "cuda/_cuda/ccuda.pyx":5500
 *     if __cuEventDestroy_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEventDestroy_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUevent) nogil> __cuEventDestroy_v2)(hEvent)
 *     return err
 */
  __pyx_tuple__196 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventDestroy_v2_not_f); if (unlikely(!__pyx_tuple__196)) __PYX_ERR(0, 5500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__196);
  __Pyx_GIVEREF(__pyx_tuple__196);

  /* "cuda/_cuda/ccuda.pyx":5509
 *     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__197 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventElapsedTime_not); if (unlikely(!__pyx_tuple__197)) __PYX_ERR(0, 5509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__197);
  __Pyx_GIVEREF(__pyx_tuple__197);

  /* "cuda/_cuda/ccuda.pyx":5518
 *     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__198 = PyTuple_Pack(1, __pyx_kp_u_Function_cuImportExternalMemory); if (unlikely(!__pyx_tuple__198)) __PYX_ERR(0, 5518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__198);
  __Pyx_GIVEREF(__pyx_tuple__198);

  /* "cuda/_cuda/ccuda.pyx":5527
 *     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__199 = PyTuple_Pack(1, __pyx_kp_u_Function_cuExternalMemoryGetMapp); if (unlikely(!__pyx_tuple__199)) __PYX_ERR(0, 5527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__199);
  __Pyx_GIVEREF(__pyx_tuple__199);

  /* "cuda/_cuda/ccuda.pyx":5536
 *     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__200 = PyTuple_Pack(1, __pyx_kp_u_Function_cuExternalMemoryGetMapp_2); if (unlikely(!__pyx_tuple__200)) __PYX_ERR(0, 5536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__200);
  __Pyx_GIVEREF(__pyx_tuple__200);

  /* "cuda/_cuda/ccuda.pyx":5545
 *     if __cuDestroyExternalMemory == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDestroyExternalMemory" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUexternalMemory) nogil> __cuDestroyExternalMemory)(extMem)
 *     return err
 */
  __pyx_tuple__201 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDestroyExternalMemory); if (unlikely(!__pyx_tuple__201)) __PYX_ERR(0, 5545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__201);
  __Pyx_GIVEREF(__pyx_tuple__201);

  /* "cuda/_cuda/ccuda.pyx":5554
 *     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__202 = PyTuple_Pack(1, __pyx_kp_u_Function_cuImportExternalSemapho); if (unlikely(!__pyx_tuple__202)) __PYX_ERR(0, 5554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__202);
  __Pyx_GIVEREF(__pyx_tuple__202);

  /* "cuda/_cuda/ccuda.pyx":5563
 *     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__203 = PyTuple_Pack(1, __pyx_kp_u_Function_cuSignalExternalSemapho); if (unlikely(!__pyx_tuple__203)) __PYX_ERR(0, 5563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__203);
  __Pyx_GIVEREF(__pyx_tuple__203);

  /* "cuda/_cuda/ccuda.pyx":5572
 *     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__204 = PyTuple_Pack(1, __pyx_kp_u_Function_cuWaitExternalSemaphore); if (unlikely(!__pyx_tuple__204)) __PYX_ERR(0, 5572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__204);
  __Pyx_GIVEREF(__pyx_tuple__204);

  /* "cuda/_cuda/ccuda.pyx":5581
 *     if __cuDestroyExternalSemaphore == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDestroyExternalSemaphore" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUexternalSemaphore) nogil> __cuDestroyExternalSemaphore)(extSem)
 *     return err
 */
  __pyx_tuple__205 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDestroyExternalSemaph); if (unlikely(!__pyx_tuple__205)) __PYX_ERR(0, 5581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__205);
  __Pyx_GIVEREF(__pyx_tuple__205);

  /* "cuda/_cuda/ccuda.pyx":5590
 *     if __cuStreamWaitValue32 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitValue32" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int) nogil> __cuStreamWaitValue32)(stream, addr, value, flags)
 *     return err
 */
  __pyx_tuple__206 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamWaitValue32_not); if (unlikely(!__pyx_tuple__206)) __PYX_ERR(0, 5590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__206);
  __Pyx_GIVEREF(__pyx_tuple__206);

  /* "cuda/_cuda/ccuda.pyx":5599
 *     if __cuStreamWaitValue64 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWaitValue64" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int) nogil> __cuStreamWaitValue64)(stream, addr, value, flags)
 *     return err
 */
  __pyx_tuple__207 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamWaitValue64_not); if (unlikely(!__pyx_tuple__207)) __PYX_ERR(0, 5599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__207);
  __Pyx_GIVEREF(__pyx_tuple__207);

  /* "cuda/_cuda/ccuda.pyx":5608
 *     if __cuStreamWriteValue32 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWriteValue32" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int) nogil> __cuStreamWriteValue32)(stream, addr, value, flags)
 *     return err
 */
  __pyx_tuple__208 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamWriteValue32_no); if (unlikely(!__pyx_tuple__208)) __PYX_ERR(0, 5608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__208);
  __Pyx_GIVEREF(__pyx_tuple__208);

  /* "cuda/_cuda/ccuda.pyx":5617
 *     if __cuStreamWriteValue64 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamWriteValue64" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int) nogil> __cuStreamWriteValue64)(stream, addr, value, flags)
 *     return err
 */
  __pyx_tuple__209 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamWriteValue64_no); if (unlikely(!__pyx_tuple__209)) __PYX_ERR(0, 5617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__209);
  __Pyx_GIVEREF(__pyx_tuple__209);

  /* "cuda/_cuda/ccuda.pyx":5626
 *     if __cuStreamBatchMemOp == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuStreamBatchMemOp" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUstream, unsigned int, CUstreamBatchMemOpParams*, unsigned int) nogil> __cuStreamBatchMemOp)(stream, count, paramArray, flags)
 *     return err
 */
  __pyx_tuple__210 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamBatchMemOp_not); if (unlikely(!__pyx_tuple__210)) __PYX_ERR(0, 5626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__210);
  __Pyx_GIVEREF(__pyx_tuple__210);

  /* "cuda/_cuda/ccuda.pyx":5635
 *     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__211 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamWaitValue32_v2); if (unlikely(!__pyx_tuple__211)) __PYX_ERR(0, 5635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__211);
  __Pyx_GIVEREF(__pyx_tuple__211);

  /* "cuda/_cuda/ccuda.pyx":5644
 *     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__212 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamWaitValue64_v2); if (unlikely(!__pyx_tuple__212)) __PYX_ERR(0, 5644, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__212);
  __Pyx_GIVEREF(__pyx_tuple__212);

  /* "cuda/_cuda/ccuda.pyx":5653
 *     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__213 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamWriteValue32_v2); if (unlikely(!__pyx_tuple__213)) __PYX_ERR(0, 5653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__213);
  __Pyx_GIVEREF(__pyx_tuple__213);

  /* "cuda/_cuda/ccuda.pyx":5662
 *     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__214 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamWriteValue64_v2); if (unlikely(!__pyx_tuple__214)) __PYX_ERR(0, 5662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__214);
  __Pyx_GIVEREF(__pyx_tuple__214);

  /* "cuda/_cuda/ccuda.pyx":5671
 *     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__215 = PyTuple_Pack(1, __pyx_kp_u_Function_cuStreamBatchMemOp_v2_n); if (unlikely(!__pyx_tuple__215)) __PYX_ERR(0, 5671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__215);
  __Pyx_GIVEREF(__pyx_tuple__215);

  /* "cuda/_cuda/ccuda.pyx":5680
 *     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__216 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFuncGetAttribute_not); if (unlikely(!__pyx_tuple__216)) __PYX_ERR(0, 5680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__216);
  __Pyx_GIVEREF(__pyx_tuple__216);

  /* "cuda/_cuda/ccuda.pyx":5689
 *     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__217 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFuncSetAttribute_not); if (unlikely(!__pyx_tuple__217)) __PYX_ERR(0, 5689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__217);
  __Pyx_GIVEREF(__pyx_tuple__217);

  /* "cuda/_cuda/ccuda.pyx":5698
 *     if __cuFuncSetCacheConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetCacheConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, CUfunc_cache) nogil> __cuFuncSetCacheConfig)(hfunc, config)
 *     return err
 */
  __pyx_tuple__218 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFuncSetCacheConfig_no); if (unlikely(!__pyx_tuple__218)) __PYX_ERR(0, 5698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__218);
  __Pyx_GIVEREF(__pyx_tuple__218);

  /* "cuda/_cuda/ccuda.pyx":5707
 *     if __cuFuncSetSharedMemConfig == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetSharedMemConfig" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, CUsharedconfig) nogil> __cuFuncSetSharedMemConfig)(hfunc, config)
 *     return err
 */
  __pyx_tuple__219 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFuncSetSharedMemConfi); if (unlikely(!__pyx_tuple__219)) __PYX_ERR(0, 5707, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__219);
  __Pyx_GIVEREF(__pyx_tuple__219);

  /* "cuda/_cuda/ccuda.pyx":5716
 *     if __cuFuncGetModule == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFuncGetModule" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmodule*, CUfunction) nogil> __cuFuncGetModule)(hmod, hfunc)
 *     return err
 */
  __pyx_tuple__220 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFuncGetModule_not_fou); if (unlikely(!__pyx_tuple__220)) __PYX_ERR(0, 5716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__220);
  __Pyx_GIVEREF(__pyx_tuple__220);

  /* "cuda/_cuda/ccuda.pyx":5725
 *     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__221 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunchKernel_not_foun); if (unlikely(!__pyx_tuple__221)) __PYX_ERR(0, 5725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__221);
  __Pyx_GIVEREF(__pyx_tuple__221);

  /* "cuda/_cuda/ccuda.pyx":5734
 *     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__222 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunchKernelEx_not_fo); if (unlikely(!__pyx_tuple__222)) __PYX_ERR(0, 5734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__222);
  __Pyx_GIVEREF(__pyx_tuple__222);

  /* "cuda/_cuda/ccuda.pyx":5743
 *     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__223 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunchCooperativeKern); if (unlikely(!__pyx_tuple__223)) __PYX_ERR(0, 5743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__223);
  __Pyx_GIVEREF(__pyx_tuple__223);

  /* "cuda/_cuda/ccuda.pyx":5752
 *     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__224 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunchCooperativeKern_2); if (unlikely(!__pyx_tuple__224)) __PYX_ERR(0, 5752, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__224);
  __Pyx_GIVEREF(__pyx_tuple__224);

  /* "cuda/_cuda/ccuda.pyx":5761
 *     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__225 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunchHostFunc_not_fo); if (unlikely(!__pyx_tuple__225)) __PYX_ERR(0, 5761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__225);
  __Pyx_GIVEREF(__pyx_tuple__225);

  /* "cuda/_cuda/ccuda.pyx":5770
 *     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__226 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFuncSetBlockShape_not); if (unlikely(!__pyx_tuple__226)) __PYX_ERR(0, 5770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__226);
  __Pyx_GIVEREF(__pyx_tuple__226);

  /* "cuda/_cuda/ccuda.pyx":5779
 *     if __cuFuncSetSharedSize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuFuncSetSharedSize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, unsigned int) nogil> __cuFuncSetSharedSize)(hfunc, numbytes)
 *     return err
 */
  __pyx_tuple__227 = PyTuple_Pack(1, __pyx_kp_u_Function_cuFuncSetSharedSize_not); if (unlikely(!__pyx_tuple__227)) __PYX_ERR(0, 5779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__227);
  __Pyx_GIVEREF(__pyx_tuple__227);

  /* "cuda/_cuda/ccuda.pyx":5788
 *     if __cuParamSetSize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuParamSetSize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction, unsigned int) nogil> __cuParamSetSize)(hfunc, numbytes)
 *     return err
 */
  __pyx_tuple__228 = PyTuple_Pack(1, __pyx_kp_u_Function_cuParamSetSize_not_foun); if (unlikely(!__pyx_tuple__228)) __PYX_ERR(0, 5788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__228);
  __Pyx_GIVEREF(__pyx_tuple__228);

  /* "cuda/_cuda/ccuda.pyx":5797
 *     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__229 = PyTuple_Pack(1, __pyx_kp_u_Function_cuParamSeti_not_found); if (unlikely(!__pyx_tuple__229)) __PYX_ERR(0, 5797, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__229);
  __Pyx_GIVEREF(__pyx_tuple__229);

  /* "cuda/_cuda/ccuda.pyx":5806
 *     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__230 = PyTuple_Pack(1, __pyx_kp_u_Function_cuParamSetf_not_found); if (unlikely(!__pyx_tuple__230)) __PYX_ERR(0, 5806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__230);
  __Pyx_GIVEREF(__pyx_tuple__230);

  /* "cuda/_cuda/ccuda.pyx":5815
 *     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__231 = PyTuple_Pack(1, __pyx_kp_u_Function_cuParamSetv_not_found); if (unlikely(!__pyx_tuple__231)) __PYX_ERR(0, 5815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__231);
  __Pyx_GIVEREF(__pyx_tuple__231);

  /* "cuda/_cuda/ccuda.pyx":5824
 *     if __cuLaunch == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuLaunch" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfunction) nogil> __cuLaunch)(f)
 *     return err
 */
  __pyx_tuple__232 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunch_not_found); if (unlikely(!__pyx_tuple__232)) __PYX_ERR(0, 5824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__232);
  __Pyx_GIVEREF(__pyx_tuple__232);

  /* "cuda/_cuda/ccuda.pyx":5833
 *     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__233 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunchGrid_not_found); if (unlikely(!__pyx_tuple__233)) __PYX_ERR(0, 5833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__233);
  __Pyx_GIVEREF(__pyx_tuple__233);

  /* "cuda/_cuda/ccuda.pyx":5842
 *     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__234 = PyTuple_Pack(1, __pyx_kp_u_Function_cuLaunchGridAsync_not_f); if (unlikely(!__pyx_tuple__234)) __PYX_ERR(0, 5842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__234);
  __Pyx_GIVEREF(__pyx_tuple__234);

  /* "cuda/_cuda/ccuda.pyx":5851
 *     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__235 = PyTuple_Pack(1, __pyx_kp_u_Function_cuParamSetTexRef_not_fo); if (unlikely(!__pyx_tuple__235)) __PYX_ERR(0, 5851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__235);
  __Pyx_GIVEREF(__pyx_tuple__235);

  /* "cuda/_cuda/ccuda.pyx":5860
 *     if __cuGraphCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph*, unsigned int) nogil> __cuGraphCreate)(phGraph, flags)
 *     return err
 */
  __pyx_tuple__236 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphCreate_not_found); if (unlikely(!__pyx_tuple__236)) __PYX_ERR(0, 5860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__236);
  __Pyx_GIVEREF(__pyx_tuple__236);

  /* "cuda/_cuda/ccuda.pyx":5869
 *     if __cuGraphAddKernelNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphAddKernelNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode*, CUgraph, const CUgraphNode*, size_t, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphAddKernelNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 *     return err
 */
  __pyx_tuple__237 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddKernelNode_no); if (unlikely(!__pyx_tuple__237)) __PYX_ERR(0, 5869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__237);
  __Pyx_GIVEREF(__pyx_tuple__237);

  /* "cuda/_cuda/ccuda.pyx":5878
 *     if __cuGraphKernelNodeGetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeGetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphKernelNodeGetParams)(hNode, nodeParams)
 *     return err
 */
  __pyx_tuple__238 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphKernelNodeGetPar); if (unlikely(!__pyx_tuple__238)) __PYX_ERR(0, 5878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__238);
  __Pyx_GIVEREF(__pyx_tuple__238);

  /* "cuda/_cuda/ccuda.pyx":5887
 *     if __cuGraphKernelNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphKernelNodeSetParams)(hNode, nodeParams)
 *     return err
 */
  __pyx_tuple__239 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphKernelNodeSetPar); if (unlikely(!__pyx_tuple__239)) __PYX_ERR(0, 5887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__239);
  __Pyx_GIVEREF(__pyx_tuple__239);

  /* "cuda/_cuda/ccuda.pyx":5896
 *     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__240 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddMemcpyNode_no); if (unlikely(!__pyx_tuple__240)) __PYX_ERR(0, 5896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__240);
  __Pyx_GIVEREF(__pyx_tuple__240);

  /* "cuda/_cuda/ccuda.pyx":5905
 *     if __cuGraphMemcpyNodeGetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemcpyNodeGetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUDA_MEMCPY3D*) nogil> __cuGraphMemcpyNodeGetParams)(hNode, nodeParams)
 *     return err
 */
  __pyx_tuple__241 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphMemcpyNodeGetPar); if (unlikely(!__pyx_tuple__241)) __PYX_ERR(0, 5905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__241);
  __Pyx_GIVEREF(__pyx_tuple__241);

  /* "cuda/_cuda/ccuda.pyx":5914
 *     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__242 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphMemcpyNodeSetPar); if (unlikely(!__pyx_tuple__242)) __PYX_ERR(0, 5914, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__242);
  __Pyx_GIVEREF(__pyx_tuple__242);

  /* "cuda/_cuda/ccuda.pyx":5923
 *     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__243 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddMemsetNode_no); if (unlikely(!__pyx_tuple__243)) __PYX_ERR(0, 5923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__243);
  __Pyx_GIVEREF(__pyx_tuple__243);

  /* "cuda/_cuda/ccuda.pyx":5932
 *     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__244 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphMemsetNodeGetPar); if (unlikely(!__pyx_tuple__244)) __PYX_ERR(0, 5932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__244);
  __Pyx_GIVEREF(__pyx_tuple__244);

  /* "cuda/_cuda/ccuda.pyx":5941
 *     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__245 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphMemsetNodeSetPar); if (unlikely(!__pyx_tuple__245)) __PYX_ERR(0, 5941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__245);
  __Pyx_GIVEREF(__pyx_tuple__245);

  /* "cuda/_cuda/ccuda.pyx":5950
 *     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__246 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddHostNode_not); if (unlikely(!__pyx_tuple__246)) __PYX_ERR(0, 5950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__246);
  __Pyx_GIVEREF(__pyx_tuple__246);

  /* "cuda/_cuda/ccuda.pyx":5959
 *     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__247 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphHostNodeGetParam); if (unlikely(!__pyx_tuple__247)) __PYX_ERR(0, 5959, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__247);
  __Pyx_GIVEREF(__pyx_tuple__247);

  /* "cuda/_cuda/ccuda.pyx":5968
 *     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__248 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphHostNodeSetParam); if (unlikely(!__pyx_tuple__248)) __PYX_ERR(0, 5968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__248);
  __Pyx_GIVEREF(__pyx_tuple__248);

  /* "cuda/_cuda/ccuda.pyx":5977
 *     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__249 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddChildGraphNod); if (unlikely(!__pyx_tuple__249)) __PYX_ERR(0, 5977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__249);
  __Pyx_GIVEREF(__pyx_tuple__249);

  /* "cuda/_cuda/ccuda.pyx":5986
 *     if __cuGraphChildGraphNodeGetGraph == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphChildGraphNodeGetGraph" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUgraph*) nogil> __cuGraphChildGraphNodeGetGraph)(hNode, phGraph)
 *     return err
 */
  __pyx_tuple__250 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphChildGraphNodeGe); if (unlikely(!__pyx_tuple__250)) __PYX_ERR(0, 5986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__250);
  __Pyx_GIVEREF(__pyx_tuple__250);

  /* "cuda/_cuda/ccuda.pyx":5995
 *     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__251 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddEmptyNode_not); if (unlikely(!__pyx_tuple__251)) __PYX_ERR(0, 5995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__251);
  __Pyx_GIVEREF(__pyx_tuple__251);

  /* "cuda/_cuda/ccuda.pyx":6004
 *     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__252 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddEventRecordNo); if (unlikely(!__pyx_tuple__252)) __PYX_ERR(0, 6004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__252);
  __Pyx_GIVEREF(__pyx_tuple__252);

  /* "cuda/_cuda/ccuda.pyx":6013
 *     if __cuGraphEventRecordNodeGetEvent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventRecordNodeGetEvent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUevent*) nogil> __cuGraphEventRecordNodeGetEvent)(hNode, event_out)
 *     return err
 */
  __pyx_tuple__253 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphEventRecordNodeG); if (unlikely(!__pyx_tuple__253)) __PYX_ERR(0, 6013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__253);
  __Pyx_GIVEREF(__pyx_tuple__253);

  /* "cuda/_cuda/ccuda.pyx":6022
 *     if __cuGraphEventRecordNodeSetEvent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventRecordNodeSetEvent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUevent) nogil> __cuGraphEventRecordNodeSetEvent)(hNode, event)
 *     return err
 */
  __pyx_tuple__254 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphEventRecordNodeS); if (unlikely(!__pyx_tuple__254)) __PYX_ERR(0, 6022, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__254);
  __Pyx_GIVEREF(__pyx_tuple__254);

  /* "cuda/_cuda/ccuda.pyx":6031
 *     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__255 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddEventWaitNode); if (unlikely(!__pyx_tuple__255)) __PYX_ERR(0, 6031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__255);
  __Pyx_GIVEREF(__pyx_tuple__255);

  /* "cuda/_cuda/ccuda.pyx":6040
 *     if __cuGraphEventWaitNodeGetEvent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventWaitNodeGetEvent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUevent*) nogil> __cuGraphEventWaitNodeGetEvent)(hNode, event_out)
 *     return err
 */
  __pyx_tuple__256 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphEventWaitNodeGet); if (unlikely(!__pyx_tuple__256)) __PYX_ERR(0, 6040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__256);
  __Pyx_GIVEREF(__pyx_tuple__256);

  /* "cuda/_cuda/ccuda.pyx":6049
 *     if __cuGraphEventWaitNodeSetEvent == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphEventWaitNodeSetEvent" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUevent) nogil> __cuGraphEventWaitNodeSetEvent)(hNode, event)
 *     return err
 */
  __pyx_tuple__257 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphEventWaitNodeSet); if (unlikely(!__pyx_tuple__257)) __PYX_ERR(0, 6049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__257);
  __Pyx_GIVEREF(__pyx_tuple__257);

  /* "cuda/_cuda/ccuda.pyx":6058
 *     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__258 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddExternalSemap); if (unlikely(!__pyx_tuple__258)) __PYX_ERR(0, 6058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__258);
  __Pyx_GIVEREF(__pyx_tuple__258);

  /* "cuda/_cuda/ccuda.pyx":6067
 *     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__259 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExternalSemaphor); if (unlikely(!__pyx_tuple__259)) __PYX_ERR(0, 6067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__259);
  __Pyx_GIVEREF(__pyx_tuple__259);

  /* "cuda/_cuda/ccuda.pyx":6076
 *     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__260 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExternalSemaphor_2); if (unlikely(!__pyx_tuple__260)) __PYX_ERR(0, 6076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__260);
  __Pyx_GIVEREF(__pyx_tuple__260);

  /* "cuda/_cuda/ccuda.pyx":6085
 *     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__261 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddExternalSemap_2); if (unlikely(!__pyx_tuple__261)) __PYX_ERR(0, 6085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__261);
  __Pyx_GIVEREF(__pyx_tuple__261);

  /* "cuda/_cuda/ccuda.pyx":6094
 *     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__262 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExternalSemaphor_3); if (unlikely(!__pyx_tuple__262)) __PYX_ERR(0, 6094, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__262);
  __Pyx_GIVEREF(__pyx_tuple__262);

  /* "cuda/_cuda/ccuda.pyx":6103
 *     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__263 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExternalSemaphor_4); if (unlikely(!__pyx_tuple__263)) __PYX_ERR(0, 6103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__263);
  __Pyx_GIVEREF(__pyx_tuple__263);

  /* "cuda/_cuda/ccuda.pyx":6112
 *     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__264 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddBatchMemOpNod); if (unlikely(!__pyx_tuple__264)) __PYX_ERR(0, 6112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__264);
  __Pyx_GIVEREF(__pyx_tuple__264);

  /* "cuda/_cuda/ccuda.pyx":6121
 *     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__265 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphBatchMemOpNodeGe); if (unlikely(!__pyx_tuple__265)) __PYX_ERR(0, 6121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__265);
  __Pyx_GIVEREF(__pyx_tuple__265);

  /* "cuda/_cuda/ccuda.pyx":6130
 *     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__266 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphBatchMemOpNodeSe); if (unlikely(!__pyx_tuple__266)) __PYX_ERR(0, 6130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__266);
  __Pyx_GIVEREF(__pyx_tuple__266);

  /* "cuda/_cuda/ccuda.pyx":6139
 *     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__267 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecBatchMemOpNo); if (unlikely(!__pyx_tuple__267)) __PYX_ERR(0, 6139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__267);
  __Pyx_GIVEREF(__pyx_tuple__267);

  /* "cuda/_cuda/ccuda.pyx":6148
 *     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__268 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddMemAllocNode); if (unlikely(!__pyx_tuple__268)) __PYX_ERR(0, 6148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__268);
  __Pyx_GIVEREF(__pyx_tuple__268);

  /* "cuda/_cuda/ccuda.pyx":6157
 *     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__269 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphMemAllocNodeGetP); if (unlikely(!__pyx_tuple__269)) __PYX_ERR(0, 6157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__269);
  __Pyx_GIVEREF(__pyx_tuple__269);

  /* "cuda/_cuda/ccuda.pyx":6166
 *     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__270 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddMemFreeNode_n); if (unlikely(!__pyx_tuple__270)) __PYX_ERR(0, 6166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__270);
  __Pyx_GIVEREF(__pyx_tuple__270);

  /* "cuda/_cuda/ccuda.pyx":6175
 *     if __cuGraphMemFreeNodeGetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphMemFreeNodeGetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUdeviceptr*) nogil> __cuGraphMemFreeNodeGetParams)(hNode, dptr_out)
 *     return err
 */
  __pyx_tuple__271 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphMemFreeNodeGetPa); if (unlikely(!__pyx_tuple__271)) __PYX_ERR(0, 6175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__271);
  __Pyx_GIVEREF(__pyx_tuple__271);

  /* "cuda/_cuda/ccuda.pyx":6184
 *     if __cuDeviceGraphMemTrim == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuDeviceGraphMemTrim" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUdevice) nogil> __cuDeviceGraphMemTrim)(device)
 *     return err
 */
  __pyx_tuple__272 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGraphMemTrim_no); if (unlikely(!__pyx_tuple__272)) __PYX_ERR(0, 6184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__272);
  __Pyx_GIVEREF(__pyx_tuple__272);

  /* "cuda/_cuda/ccuda.pyx":6193
 *     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__273 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetGraphMemAttr); if (unlikely(!__pyx_tuple__273)) __PYX_ERR(0, 6193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__273);
  __Pyx_GIVEREF(__pyx_tuple__273);

  /* "cuda/_cuda/ccuda.pyx":6202
 *     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__274 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceSetGraphMemAttr); if (unlikely(!__pyx_tuple__274)) __PYX_ERR(0, 6202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__274);
  __Pyx_GIVEREF(__pyx_tuple__274);

  /* "cuda/_cuda/ccuda.pyx":6211
 *     if __cuGraphClone == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphClone" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph*, CUgraph) nogil> __cuGraphClone)(phGraphClone, originalGraph)
 *     return err
 */
  __pyx_tuple__275 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphClone_not_found); if (unlikely(!__pyx_tuple__275)) __PYX_ERR(0, 6211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__275);
  __Pyx_GIVEREF(__pyx_tuple__275);

  /* "cuda/_cuda/ccuda.pyx":6220
 *     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__276 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphNodeFindInClone); if (unlikely(!__pyx_tuple__276)) __PYX_ERR(0, 6220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__276);
  __Pyx_GIVEREF(__pyx_tuple__276);

  /* "cuda/_cuda/ccuda.pyx":6229
 *     if __cuGraphNodeGetType == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphNodeGetType" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNodeType*) nogil> __cuGraphNodeGetType)(hNode, typename)
 *     return err
 */
  __pyx_tuple__277 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphNodeGetType_not); if (unlikely(!__pyx_tuple__277)) __PYX_ERR(0, 6229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__277);
  __Pyx_GIVEREF(__pyx_tuple__277);

  /* "cuda/_cuda/ccuda.pyx":6238
 *     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__278 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphGetNodes_not_fou); if (unlikely(!__pyx_tuple__278)) __PYX_ERR(0, 6238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__278);
  __Pyx_GIVEREF(__pyx_tuple__278);

  /* "cuda/_cuda/ccuda.pyx":6247
 *     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__279 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphGetRootNodes_not); if (unlikely(!__pyx_tuple__279)) __PYX_ERR(0, 6247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__279);
  __Pyx_GIVEREF(__pyx_tuple__279);

  /* "cuda/_cuda/ccuda.pyx":6256
 *     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__280 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphGetEdges_not_fou); if (unlikely(!__pyx_tuple__280)) __PYX_ERR(0, 6256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__280);
  __Pyx_GIVEREF(__pyx_tuple__280);

  /* "cuda/_cuda/ccuda.pyx":6265
 *     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__281 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphNodeGetDependenc); if (unlikely(!__pyx_tuple__281)) __PYX_ERR(0, 6265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__281);
  __Pyx_GIVEREF(__pyx_tuple__281);

  /* "cuda/_cuda/ccuda.pyx":6274
 *     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__282 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphNodeGetDependent); if (unlikely(!__pyx_tuple__282)) __PYX_ERR(0, 6274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__282);
  __Pyx_GIVEREF(__pyx_tuple__282);

  /* "cuda/_cuda/ccuda.pyx":6283
 *     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__283 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphAddDependencies); if (unlikely(!__pyx_tuple__283)) __PYX_ERR(0, 6283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__283);
  __Pyx_GIVEREF(__pyx_tuple__283);

  /* "cuda/_cuda/ccuda.pyx":6292
 *     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__284 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphRemoveDependenci); if (unlikely(!__pyx_tuple__284)) __PYX_ERR(0, 6292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__284);
  __Pyx_GIVEREF(__pyx_tuple__284);

  /* "cuda/_cuda/ccuda.pyx":6301
 *     if __cuGraphDestroyNode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDestroyNode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode) nogil> __cuGraphDestroyNode)(hNode)
 *     return err
 */
  __pyx_tuple__285 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphDestroyNode_not); if (unlikely(!__pyx_tuple__285)) __PYX_ERR(0, 6301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__285);
  __Pyx_GIVEREF(__pyx_tuple__285);

  /* "cuda/_cuda/ccuda.pyx":6310
 *     if __cuGraphInstantiate_v2 == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphInstantiate_v2" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec*, CUgraph, CUgraphNode*, char*, size_t) nogil> __cuGraphInstantiate_v2)(phGraphExec, hGraph, phErrorNode, logBuffer, bufferSize)
 *     return err
 */
  __pyx_tuple__286 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphInstantiate_v2_n); if (unlikely(!__pyx_tuple__286)) __PYX_ERR(0, 6310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__286);
  __Pyx_GIVEREF(__pyx_tuple__286);

  /* "cuda/_cuda/ccuda.pyx":6319
 *     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__287 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphInstantiateWithF); if (unlikely(!__pyx_tuple__287)) __PYX_ERR(0, 6319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__287);
  __Pyx_GIVEREF(__pyx_tuple__287);

  /* "cuda/_cuda/ccuda.pyx":6328
 *     if __cuGraphExecKernelNodeSetParams == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecKernelNodeSetParams" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraphNode, const CUDA_KERNEL_NODE_PARAMS*) nogil> __cuGraphExecKernelNodeSetParams)(hGraphExec, hNode, nodeParams)
 *     return err
 */
  __pyx_tuple__288 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecKernelNodeSe); if (unlikely(!__pyx_tuple__288)) __PYX_ERR(0, 6328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__288);
  __Pyx_GIVEREF(__pyx_tuple__288);

  /* "cuda/_cuda/ccuda.pyx":6337
 *     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__289 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecMemcpyNodeSe); if (unlikely(!__pyx_tuple__289)) __PYX_ERR(0, 6337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__289);
  __Pyx_GIVEREF(__pyx_tuple__289);

  /* "cuda/_cuda/ccuda.pyx":6346
 *     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__290 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecMemsetNodeSe); if (unlikely(!__pyx_tuple__290)) __PYX_ERR(0, 6346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__290);
  __Pyx_GIVEREF(__pyx_tuple__290);

  /* "cuda/_cuda/ccuda.pyx":6355
 *     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__291 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecHostNodeSetP); if (unlikely(!__pyx_tuple__291)) __PYX_ERR(0, 6355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__291);
  __Pyx_GIVEREF(__pyx_tuple__291);

  /* "cuda/_cuda/ccuda.pyx":6364
 *     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__292 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecChildGraphNo); if (unlikely(!__pyx_tuple__292)) __PYX_ERR(0, 6364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__292);
  __Pyx_GIVEREF(__pyx_tuple__292);

  /* "cuda/_cuda/ccuda.pyx":6373
 *     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__293 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecEventRecordN); if (unlikely(!__pyx_tuple__293)) __PYX_ERR(0, 6373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__293);
  __Pyx_GIVEREF(__pyx_tuple__293);

  /* "cuda/_cuda/ccuda.pyx":6382
 *     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__294 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecEventWaitNod); if (unlikely(!__pyx_tuple__294)) __PYX_ERR(0, 6382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__294);
  __Pyx_GIVEREF(__pyx_tuple__294);

  /* "cuda/_cuda/ccuda.pyx":6391
 *     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__295 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecExternalSema); if (unlikely(!__pyx_tuple__295)) __PYX_ERR(0, 6391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__295);
  __Pyx_GIVEREF(__pyx_tuple__295);

  /* "cuda/_cuda/ccuda.pyx":6400
 *     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__296 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecExternalSema_2); if (unlikely(!__pyx_tuple__296)) __PYX_ERR(0, 6400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__296);
  __Pyx_GIVEREF(__pyx_tuple__296);

  /* "cuda/_cuda/ccuda.pyx":6409
 *     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__297 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphNodeSetEnabled_n); if (unlikely(!__pyx_tuple__297)) __PYX_ERR(0, 6409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__297);
  __Pyx_GIVEREF(__pyx_tuple__297);

  /* "cuda/_cuda/ccuda.pyx":6418
 *     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__298 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphNodeGetEnabled_n); if (unlikely(!__pyx_tuple__298)) __PYX_ERR(0, 6418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__298);
  __Pyx_GIVEREF(__pyx_tuple__298);

  /* "cuda/_cuda/ccuda.pyx":6427
 *     if __cuGraphUpload == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphUpload" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUstream) nogil> __cuGraphUpload)(hGraphExec, hStream)
 *     return err
 */
  __pyx_tuple__299 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphUpload_not_found); if (unlikely(!__pyx_tuple__299)) __PYX_ERR(0, 6427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__299);
  __Pyx_GIVEREF(__pyx_tuple__299);

  /* "cuda/_cuda/ccuda.pyx":6436
 *     if __cuGraphLaunch == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphLaunch" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUstream) nogil> __cuGraphLaunch)(hGraphExec, hStream)
 *     return err
 */
  __pyx_tuple__300 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphLaunch_not_found); if (unlikely(!__pyx_tuple__300)) __PYX_ERR(0, 6436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__300);
  __Pyx_GIVEREF(__pyx_tuple__300);

  /* "cuda/_cuda/ccuda.pyx":6445
 *     if __cuGraphExecDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec) nogil> __cuGraphExecDestroy)(hGraphExec)
 *     return err
 */
  __pyx_tuple__301 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecDestroy_not); if (unlikely(!__pyx_tuple__301)) __PYX_ERR(0, 6445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__301);
  __Pyx_GIVEREF(__pyx_tuple__301);

  /* "cuda/_cuda/ccuda.pyx":6454
 *     if __cuGraphDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraph) nogil> __cuGraphDestroy)(hGraph)
 *     return err
 */
  __pyx_tuple__302 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphDestroy_not_foun); if (unlikely(!__pyx_tuple__302)) __PYX_ERR(0, 6454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__302);
  __Pyx_GIVEREF(__pyx_tuple__302);

  /* "cuda/_cuda/ccuda.pyx":6463
 *     if __cuGraphExecUpdate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphExecUpdate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphExec, CUgraph, CUgraphNode*, CUgraphExecUpdateResult*) nogil> __cuGraphExecUpdate)(hGraphExec, hGraph, hErrorNode_out, updateResult_out)
 *     return err
 */
  __pyx_tuple__303 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphExecUpdate_not_f); if (unlikely(!__pyx_tuple__303)) __PYX_ERR(0, 6463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__303);
  __Pyx_GIVEREF(__pyx_tuple__303);

  /* "cuda/_cuda/ccuda.pyx":6472
 *     if __cuGraphKernelNodeCopyAttributes == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphKernelNodeCopyAttributes" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphNode, CUgraphNode) nogil> __cuGraphKernelNodeCopyAttributes)(dst, src)
 *     return err
 */
  __pyx_tuple__304 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphKernelNodeCopyAt); if (unlikely(!__pyx_tuple__304)) __PYX_ERR(0, 6472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__304);
  __Pyx_GIVEREF(__pyx_tuple__304);

  /* "cuda/_cuda/ccuda.pyx":6481
 *     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__305 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphKernelNodeGetAtt); if (unlikely(!__pyx_tuple__305)) __PYX_ERR(0, 6481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__305);
  __Pyx_GIVEREF(__pyx_tuple__305);

  /* "cuda/_cuda/ccuda.pyx":6490
 *     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__306 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphKernelNodeSetAtt); if (unlikely(!__pyx_tuple__306)) __PYX_ERR(0, 6490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__306);
  __Pyx_GIVEREF(__pyx_tuple__306);

  /* "cuda/_cuda/ccuda.pyx":6499
 *     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__307 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphDebugDotPrint_no); if (unlikely(!__pyx_tuple__307)) __PYX_ERR(0, 6499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__307);
  __Pyx_GIVEREF(__pyx_tuple__307);

  /* "cuda/_cuda/ccuda.pyx":6508
 *     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__308 = PyTuple_Pack(1, __pyx_kp_u_Function_cuUserObjectCreate_not); if (unlikely(!__pyx_tuple__308)) __PYX_ERR(0, 6508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__308);
  __Pyx_GIVEREF(__pyx_tuple__308);

  /* "cuda/_cuda/ccuda.pyx":6517
 *     if __cuUserObjectRetain == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectRetain" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUuserObject, unsigned int) nogil> __cuUserObjectRetain)(object, count)
 *     return err
 */
  __pyx_tuple__309 = PyTuple_Pack(1, __pyx_kp_u_Function_cuUserObjectRetain_not); if (unlikely(!__pyx_tuple__309)) __PYX_ERR(0, 6517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__309);
  __Pyx_GIVEREF(__pyx_tuple__309);

  /* "cuda/_cuda/ccuda.pyx":6526
 *     if __cuUserObjectRelease == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuUserObjectRelease" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUuserObject, unsigned int) nogil> __cuUserObjectRelease)(object, count)
 *     return err
 */
  __pyx_tuple__310 = PyTuple_Pack(1, __pyx_kp_u_Function_cuUserObjectRelease_not); if (unlikely(!__pyx_tuple__310)) __PYX_ERR(0, 6526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__310);
  __Pyx_GIVEREF(__pyx_tuple__310);

  /* "cuda/_cuda/ccuda.pyx":6535
 *     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__311 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphRetainUserObject); if (unlikely(!__pyx_tuple__311)) __PYX_ERR(0, 6535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__311);
  __Pyx_GIVEREF(__pyx_tuple__311);

  /* "cuda/_cuda/ccuda.pyx":6544
 *     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__312 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphReleaseUserObjec); if (unlikely(!__pyx_tuple__312)) __PYX_ERR(0, 6544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__312);
  __Pyx_GIVEREF(__pyx_tuple__312);

  /* "cuda/_cuda/ccuda.pyx":6553
 *     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__313 = PyTuple_Pack(1, __pyx_kp_u_Function_cuOccupancyMaxActiveBlo); if (unlikely(!__pyx_tuple__313)) __PYX_ERR(0, 6553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__313);
  __Pyx_GIVEREF(__pyx_tuple__313);

  /* "cuda/_cuda/ccuda.pyx":6562
 *     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__314 = PyTuple_Pack(1, __pyx_kp_u_Function_cuOccupancyMaxActiveBlo_2); if (unlikely(!__pyx_tuple__314)) __PYX_ERR(0, 6562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__314);
  __Pyx_GIVEREF(__pyx_tuple__314);

  /* "cuda/_cuda/ccuda.pyx":6571
 *     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__315 = PyTuple_Pack(1, __pyx_kp_u_Function_cuOccupancyMaxPotential); if (unlikely(!__pyx_tuple__315)) __PYX_ERR(0, 6571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__315);
  __Pyx_GIVEREF(__pyx_tuple__315);

  /* "cuda/_cuda/ccuda.pyx":6580
 *     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__316 = PyTuple_Pack(1, __pyx_kp_u_Function_cuOccupancyMaxPotential_2); if (unlikely(!__pyx_tuple__316)) __PYX_ERR(0, 6580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__316);
  __Pyx_GIVEREF(__pyx_tuple__316);

  /* "cuda/_cuda/ccuda.pyx":6589
 *     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__317 = PyTuple_Pack(1, __pyx_kp_u_Function_cuOccupancyAvailableDyn); if (unlikely(!__pyx_tuple__317)) __PYX_ERR(0, 6589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__317);
  __Pyx_GIVEREF(__pyx_tuple__317);

  /* "cuda/_cuda/ccuda.pyx":6598
 *     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__318 = PyTuple_Pack(1, __pyx_kp_u_Function_cuOccupancyMaxPotential_3); if (unlikely(!__pyx_tuple__318)) __PYX_ERR(0, 6598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__318);
  __Pyx_GIVEREF(__pyx_tuple__318);

  /* "cuda/_cuda/ccuda.pyx":6607
 *     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__319 = PyTuple_Pack(1, __pyx_kp_u_Function_cuOccupancyMaxActiveClu); if (unlikely(!__pyx_tuple__319)) __PYX_ERR(0, 6607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__319);
  __Pyx_GIVEREF(__pyx_tuple__319);

  /* "cuda/_cuda/ccuda.pyx":6616
 *     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__320 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetArray_not_fo); if (unlikely(!__pyx_tuple__320)) __PYX_ERR(0, 6616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__320);
  __Pyx_GIVEREF(__pyx_tuple__320);

  /* "cuda/_cuda/ccuda.pyx":6625
 *     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__321 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetMipmappedArr); if (unlikely(!__pyx_tuple__321)) __PYX_ERR(0, 6625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__321);
  __Pyx_GIVEREF(__pyx_tuple__321);

  /* "cuda/_cuda/ccuda.pyx":6634
 *     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__322 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetAddress_v2_n); if (unlikely(!__pyx_tuple__322)) __PYX_ERR(0, 6634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__322);
  __Pyx_GIVEREF(__pyx_tuple__322);

  /* "cuda/_cuda/ccuda.pyx":6643
 *     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__323 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetAddress2D_v3); if (unlikely(!__pyx_tuple__323)) __PYX_ERR(0, 6643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__323);
  __Pyx_GIVEREF(__pyx_tuple__323);

  /* "cuda/_cuda/ccuda.pyx":6652
 *     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__324 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetFormat_not_f); if (unlikely(!__pyx_tuple__324)) __PYX_ERR(0, 6652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__324);
  __Pyx_GIVEREF(__pyx_tuple__324);

  /* "cuda/_cuda/ccuda.pyx":6661
 *     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__325 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetAddressMode); if (unlikely(!__pyx_tuple__325)) __PYX_ERR(0, 6661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__325);
  __Pyx_GIVEREF(__pyx_tuple__325);

  /* "cuda/_cuda/ccuda.pyx":6670
 *     if __cuTexRefSetFilterMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFilterMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, CUfilter_mode) nogil> __cuTexRefSetFilterMode)(hTexRef, fm)
 *     return err
 */
  __pyx_tuple__326 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetFilterMode_n); if (unlikely(!__pyx_tuple__326)) __PYX_ERR(0, 6670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__326);
  __Pyx_GIVEREF(__pyx_tuple__326);

  /* "cuda/_cuda/ccuda.pyx":6679
 *     if __cuTexRefSetMipmapFilterMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapFilterMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, CUfilter_mode) nogil> __cuTexRefSetMipmapFilterMode)(hTexRef, fm)
 *     return err
 */
  __pyx_tuple__327 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetMipmapFilter); if (unlikely(!__pyx_tuple__327)) __PYX_ERR(0, 6679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__327);
  __Pyx_GIVEREF(__pyx_tuple__327);

  /* "cuda/_cuda/ccuda.pyx":6688
 *     if __cuTexRefSetMipmapLevelBias == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMipmapLevelBias" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, float) nogil> __cuTexRefSetMipmapLevelBias)(hTexRef, bias)
 *     return err
 */
  __pyx_tuple__328 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetMipmapLevelB); if (unlikely(!__pyx_tuple__328)) __PYX_ERR(0, 6688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__328);
  __Pyx_GIVEREF(__pyx_tuple__328);

  /* "cuda/_cuda/ccuda.pyx":6697
 *     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__329 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetMipmapLevelC); if (unlikely(!__pyx_tuple__329)) __PYX_ERR(0, 6697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__329);
  __Pyx_GIVEREF(__pyx_tuple__329);

  /* "cuda/_cuda/ccuda.pyx":6706
 *     if __cuTexRefSetMaxAnisotropy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetMaxAnisotropy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, unsigned int) nogil> __cuTexRefSetMaxAnisotropy)(hTexRef, maxAniso)
 *     return err
 */
  __pyx_tuple__330 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetMaxAnisotrop); if (unlikely(!__pyx_tuple__330)) __PYX_ERR(0, 6706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__330);
  __Pyx_GIVEREF(__pyx_tuple__330);

  /* "cuda/_cuda/ccuda.pyx":6715
 *     if __cuTexRefSetBorderColor == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetBorderColor" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, float*) nogil> __cuTexRefSetBorderColor)(hTexRef, pBorderColor)
 *     return err
 */
  __pyx_tuple__331 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetBorderColor); if (unlikely(!__pyx_tuple__331)) __PYX_ERR(0, 6715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__331);
  __Pyx_GIVEREF(__pyx_tuple__331);

  /* "cuda/_cuda/ccuda.pyx":6724
 *     if __cuTexRefSetFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefSetFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref, unsigned int) nogil> __cuTexRefSetFlags)(hTexRef, Flags)
 *     return err
 */
  __pyx_tuple__332 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefSetFlags_not_fo); if (unlikely(!__pyx_tuple__332)) __PYX_ERR(0, 6724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__332);
  __Pyx_GIVEREF(__pyx_tuple__332);

  /* "cuda/_cuda/ccuda.pyx":6733
 *     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__333 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetAddress_v2_n); if (unlikely(!__pyx_tuple__333)) __PYX_ERR(0, 6733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__333);
  __Pyx_GIVEREF(__pyx_tuple__333);

  /* "cuda/_cuda/ccuda.pyx":6742
 *     if __cuTexRefGetArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray*, CUtexref) nogil> __cuTexRefGetArray)(phArray, hTexRef)
 *     return err
 */
  __pyx_tuple__334 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetArray_not_fo); if (unlikely(!__pyx_tuple__334)) __PYX_ERR(0, 6742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__334);
  __Pyx_GIVEREF(__pyx_tuple__334);

  /* "cuda/_cuda/ccuda.pyx":6751
 *     if __cuTexRefGetMipmappedArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmappedArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmipmappedArray*, CUtexref) nogil> __cuTexRefGetMipmappedArray)(phMipmappedArray, hTexRef)
 *     return err
 */
  __pyx_tuple__335 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetMipmappedArr); if (unlikely(!__pyx_tuple__335)) __PYX_ERR(0, 6751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__335);
  __Pyx_GIVEREF(__pyx_tuple__335);

  /* "cuda/_cuda/ccuda.pyx":6760
 *     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__336 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetAddressMode); if (unlikely(!__pyx_tuple__336)) __PYX_ERR(0, 6760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__336);
  __Pyx_GIVEREF(__pyx_tuple__336);

  /* "cuda/_cuda/ccuda.pyx":6769
 *     if __cuTexRefGetFilterMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFilterMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfilter_mode*, CUtexref) nogil> __cuTexRefGetFilterMode)(pfm, hTexRef)
 *     return err
 */
  __pyx_tuple__337 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetFilterMode_n); if (unlikely(!__pyx_tuple__337)) __PYX_ERR(0, 6769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__337);
  __Pyx_GIVEREF(__pyx_tuple__337);

  /* "cuda/_cuda/ccuda.pyx":6778
 *     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__338 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetFormat_not_f); if (unlikely(!__pyx_tuple__338)) __PYX_ERR(0, 6778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__338);
  __Pyx_GIVEREF(__pyx_tuple__338);

  /* "cuda/_cuda/ccuda.pyx":6787
 *     if __cuTexRefGetMipmapFilterMode == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapFilterMode" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUfilter_mode*, CUtexref) nogil> __cuTexRefGetMipmapFilterMode)(pfm, hTexRef)
 *     return err
 */
  __pyx_tuple__339 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetMipmapFilter); if (unlikely(!__pyx_tuple__339)) __PYX_ERR(0, 6787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__339);
  __Pyx_GIVEREF(__pyx_tuple__339);

  /* "cuda/_cuda/ccuda.pyx":6796
 *     if __cuTexRefGetMipmapLevelBias == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMipmapLevelBias" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(float*, CUtexref) nogil> __cuTexRefGetMipmapLevelBias)(pbias, hTexRef)
 *     return err
 */
  __pyx_tuple__340 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetMipmapLevelB); if (unlikely(!__pyx_tuple__340)) __PYX_ERR(0, 6796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__340);
  __Pyx_GIVEREF(__pyx_tuple__340);

  /* "cuda/_cuda/ccuda.pyx":6805
 *     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__341 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetMipmapLevelC); if (unlikely(!__pyx_tuple__341)) __PYX_ERR(0, 6805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__341);
  __Pyx_GIVEREF(__pyx_tuple__341);

  /* "cuda/_cuda/ccuda.pyx":6814
 *     if __cuTexRefGetMaxAnisotropy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetMaxAnisotropy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(int*, CUtexref) nogil> __cuTexRefGetMaxAnisotropy)(pmaxAniso, hTexRef)
 *     return err
 */
  __pyx_tuple__342 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetMaxAnisotrop); if (unlikely(!__pyx_tuple__342)) __PYX_ERR(0, 6814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__342);
  __Pyx_GIVEREF(__pyx_tuple__342);

  /* "cuda/_cuda/ccuda.pyx":6823
 *     if __cuTexRefGetBorderColor == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetBorderColor" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(float*, CUtexref) nogil> __cuTexRefGetBorderColor)(pBorderColor, hTexRef)
 *     return err
 */
  __pyx_tuple__343 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetBorderColor); if (unlikely(!__pyx_tuple__343)) __PYX_ERR(0, 6823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__343);
  __Pyx_GIVEREF(__pyx_tuple__343);

  /* "cuda/_cuda/ccuda.pyx":6832
 *     if __cuTexRefGetFlags == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefGetFlags" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(unsigned int*, CUtexref) nogil> __cuTexRefGetFlags)(pFlags, hTexRef)
 *     return err
 */
  __pyx_tuple__344 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefGetFlags_not_fo); if (unlikely(!__pyx_tuple__344)) __PYX_ERR(0, 6832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__344);
  __Pyx_GIVEREF(__pyx_tuple__344);

  /* "cuda/_cuda/ccuda.pyx":6841
 *     if __cuTexRefCreate == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefCreate" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref*) nogil> __cuTexRefCreate)(pTexRef)
 *     return err
 */
  __pyx_tuple__345 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefCreate_not_foun); if (unlikely(!__pyx_tuple__345)) __PYX_ERR(0, 6841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__345);
  __Pyx_GIVEREF(__pyx_tuple__345);

  /* "cuda/_cuda/ccuda.pyx":6850
 *     if __cuTexRefDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexRefDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexref) nogil> __cuTexRefDestroy)(hTexRef)
 *     return err
 */
  __pyx_tuple__346 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexRefDestroy_not_fou); if (unlikely(!__pyx_tuple__346)) __PYX_ERR(0, 6850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__346);
  __Pyx_GIVEREF(__pyx_tuple__346);

  /* "cuda/_cuda/ccuda.pyx":6859
 *     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__347 = PyTuple_Pack(1, __pyx_kp_u_Function_cuSurfRefSetArray_not_f); if (unlikely(!__pyx_tuple__347)) __PYX_ERR(0, 6859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__347);
  __Pyx_GIVEREF(__pyx_tuple__347);

  /* "cuda/_cuda/ccuda.pyx":6868
 *     if __cuSurfRefGetArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuSurfRefGetArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUarray*, CUsurfref) nogil> __cuSurfRefGetArray)(phArray, hSurfRef)
 *     return err
 */
  __pyx_tuple__348 = PyTuple_Pack(1, __pyx_kp_u_Function_cuSurfRefGetArray_not_f); if (unlikely(!__pyx_tuple__348)) __PYX_ERR(0, 6868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__348);
  __Pyx_GIVEREF(__pyx_tuple__348);

  /* "cuda/_cuda/ccuda.pyx":6877
 *     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__349 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexObjectCreate_not_f); if (unlikely(!__pyx_tuple__349)) __PYX_ERR(0, 6877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__349);
  __Pyx_GIVEREF(__pyx_tuple__349);

  /* "cuda/_cuda/ccuda.pyx":6886
 *     if __cuTexObjectDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuTexObjectDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUtexObject) nogil> __cuTexObjectDestroy)(texObject)
 *     return err
 */
  __pyx_tuple__350 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexObjectDestroy_not); if (unlikely(!__pyx_tuple__350)) __PYX_ERR(0, 6886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__350);
  __Pyx_GIVEREF(__pyx_tuple__350);

  /* "cuda/_cuda/ccuda.pyx":6895
 *     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__351 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexObjectGetResourceD); if (unlikely(!__pyx_tuple__351)) __PYX_ERR(0, 6895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__351);
  __Pyx_GIVEREF(__pyx_tuple__351);

  /* "cuda/_cuda/ccuda.pyx":6904
 *     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__352 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexObjectGetTextureDe); if (unlikely(!__pyx_tuple__352)) __PYX_ERR(0, 6904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__352);
  __Pyx_GIVEREF(__pyx_tuple__352);

  /* "cuda/_cuda/ccuda.pyx":6913
 *     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__353 = PyTuple_Pack(1, __pyx_kp_u_Function_cuTexObjectGetResourceV); if (unlikely(!__pyx_tuple__353)) __PYX_ERR(0, 6913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__353);
  __Pyx_GIVEREF(__pyx_tuple__353);

  /* "cuda/_cuda/ccuda.pyx":6922
 *     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__354 = PyTuple_Pack(1, __pyx_kp_u_Function_cuSurfObjectCreate_not); if (unlikely(!__pyx_tuple__354)) __PYX_ERR(0, 6922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__354);
  __Pyx_GIVEREF(__pyx_tuple__354);

  /* "cuda/_cuda/ccuda.pyx":6931
 *     if __cuSurfObjectDestroy == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuSurfObjectDestroy" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUsurfObject) nogil> __cuSurfObjectDestroy)(surfObject)
 *     return err
 */
  __pyx_tuple__355 = PyTuple_Pack(1, __pyx_kp_u_Function_cuSurfObjectDestroy_not); if (unlikely(!__pyx_tuple__355)) __PYX_ERR(0, 6931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__355);
  __Pyx_GIVEREF(__pyx_tuple__355);

  /* "cuda/_cuda/ccuda.pyx":6940
 *     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__356 = PyTuple_Pack(1, __pyx_kp_u_Function_cuSurfObjectGetResource); if (unlikely(!__pyx_tuple__356)) __PYX_ERR(0, 6940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__356);
  __Pyx_GIVEREF(__pyx_tuple__356);

  /* "cuda/_cuda/ccuda.pyx":6949
 *     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__357 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceCanAccessPeer_n); if (unlikely(!__pyx_tuple__357)) __PYX_ERR(0, 6949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__357);
  __Pyx_GIVEREF(__pyx_tuple__357);

  /* "cuda/_cuda/ccuda.pyx":6958
 *     if __cuCtxEnablePeerAccess == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxEnablePeerAccess" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext, unsigned int) nogil> __cuCtxEnablePeerAccess)(peerContext, Flags)
 *     return err
 */
  __pyx_tuple__358 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxEnablePeerAccess_n); if (unlikely(!__pyx_tuple__358)) __PYX_ERR(0, 6958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__358);
  __Pyx_GIVEREF(__pyx_tuple__358);

  /* "cuda/_cuda/ccuda.pyx":6967
 *     if __cuCtxDisablePeerAccess == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuCtxDisablePeerAccess" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUcontext) nogil> __cuCtxDisablePeerAccess)(peerContext)
 *     return err
 */
  __pyx_tuple__359 = PyTuple_Pack(1, __pyx_kp_u_Function_cuCtxDisablePeerAccess); if (unlikely(!__pyx_tuple__359)) __PYX_ERR(0, 6967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__359);
  __Pyx_GIVEREF(__pyx_tuple__359);

  /* "cuda/_cuda/ccuda.pyx":6976
 *     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__360 = PyTuple_Pack(1, __pyx_kp_u_Function_cuDeviceGetP2PAttribute); if (unlikely(!__pyx_tuple__360)) __PYX_ERR(0, 6976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__360);
  __Pyx_GIVEREF(__pyx_tuple__360);

  /* "cuda/_cuda/ccuda.pyx":6985
 *     if __cuGraphicsUnregisterResource == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsUnregisterResource" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUgraphicsResource) nogil> __cuGraphicsUnregisterResource)(resource)
 *     return err
 */
  __pyx_tuple__361 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsUnregisterRes); if (unlikely(!__pyx_tuple__361)) __PYX_ERR(0, 6985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__361);
  __Pyx_GIVEREF(__pyx_tuple__361);

  /* "cuda/_cuda/ccuda.pyx":6994
 *     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__362 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsSubResourceGe); if (unlikely(!__pyx_tuple__362)) __PYX_ERR(0, 6994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__362);
  __Pyx_GIVEREF(__pyx_tuple__362);

  /* "cuda/_cuda/ccuda.pyx":7003
 *     if __cuGraphicsResourceGetMappedMipmappedArray == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGraphicsResourceGetMappedMipmappedArray" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUmipmappedArray*, CUgraphicsResource) nogil> __cuGraphicsResourceGetMappedMipmappedArray)(pMipmappedArray, resource)
 *     return err
 */
  __pyx_tuple__363 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsResourceGetMa); if (unlikely(!__pyx_tuple__363)) __PYX_ERR(0, 7003, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__363);
  __Pyx_GIVEREF(__pyx_tuple__363);

  /* "cuda/_cuda/ccuda.pyx":7012
 *     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__364 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsResourceGetMa_2); if (unlikely(!__pyx_tuple__364)) __PYX_ERR(0, 7012, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__364);
  __Pyx_GIVEREF(__pyx_tuple__364);

  /* "cuda/_cuda/ccuda.pyx":7021
 *     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__365 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsResourceSetMa); if (unlikely(!__pyx_tuple__365)) __PYX_ERR(0, 7021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__365);
  __Pyx_GIVEREF(__pyx_tuple__365);

  /* "cuda/_cuda/ccuda.pyx":7030
 *     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__366 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsMapResources); if (unlikely(!__pyx_tuple__366)) __PYX_ERR(0, 7030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__366);
  __Pyx_GIVEREF(__pyx_tuple__366);

  /* "cuda/_cuda/ccuda.pyx":7039
 *     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__367 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsUnmapResource); if (unlikely(!__pyx_tuple__367)) __PYX_ERR(0, 7039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__367);
  __Pyx_GIVEREF(__pyx_tuple__367);

  /* "cuda/_cuda/ccuda.pyx":7048
 *     if __cuGetProcAddress == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuGetProcAddress" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const char*, void**, int, cuuint64_t) nogil> __cuGetProcAddress)(symbol, pfn, cudaVersion, flags)
 *     return err
 */
  __pyx_tuple__368 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGetProcAddress_not_fo); if (unlikely(!__pyx_tuple__368)) __PYX_ERR(0, 7048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__368);
  __Pyx_GIVEREF(__pyx_tuple__368);

  /* "cuda/_cuda/ccuda.pyx":7057
 *     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__369 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGetExportTable_not_fo); if (unlikely(!__pyx_tuple__369)) __PYX_ERR(0, 7057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__369);
  __Pyx_GIVEREF(__pyx_tuple__369);

  /* "cuda/_cuda/ccuda.pyx":7066
 *     if __cuProfilerInitialize == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuProfilerInitialize" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(const char*, const char*, CUoutput_mode) nogil> __cuProfilerInitialize)(configFile, outputFile, outputMode)
 *     return err
 */
  __pyx_tuple__370 = PyTuple_Pack(1, __pyx_kp_u_Function_cuProfilerInitialize_no); if (unlikely(!__pyx_tuple__370)) __PYX_ERR(0, 7066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__370);
  __Pyx_GIVEREF(__pyx_tuple__370);

  /* "cuda/_cuda/ccuda.pyx":7075
 *     if __cuProfilerStart == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuProfilerStart" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)() nogil> __cuProfilerStart)()
 *     return err
 */
  __pyx_tuple__371 = PyTuple_Pack(1, __pyx_kp_u_Function_cuProfilerStart_not_fou); if (unlikely(!__pyx_tuple__371)) __PYX_ERR(0, 7075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__371);
  __Pyx_GIVEREF(__pyx_tuple__371);

  /* "cuda/_cuda/ccuda.pyx":7084
 *     if __cuProfilerStop == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuProfilerStop" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)() nogil> __cuProfilerStop)()
 *     return err
 */
  __pyx_tuple__372 = PyTuple_Pack(1, __pyx_kp_u_Function_cuProfilerStop_not_foun); if (unlikely(!__pyx_tuple__372)) __PYX_ERR(0, 7084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__372);
  __Pyx_GIVEREF(__pyx_tuple__372);

  /* "cuda/_cuda/ccuda.pyx":7093
 *     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__373 = PyTuple_Pack(1, __pyx_kp_u_Function_cuVDPAUGetDevice_not_fo); if (unlikely(!__pyx_tuple__373)) __PYX_ERR(0, 7093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__373);
  __Pyx_GIVEREF(__pyx_tuple__373);

  /* "cuda/_cuda/ccuda.pyx":7102
 *     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__374 = PyTuple_Pack(1, __pyx_kp_u_Function_cuVDPAUCtxCreate_v2_not); if (unlikely(!__pyx_tuple__374)) __PYX_ERR(0, 7102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__374);
  __Pyx_GIVEREF(__pyx_tuple__374);

  /* "cuda/_cuda/ccuda.pyx":7111
 *     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__375 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsVDPAURegister); if (unlikely(!__pyx_tuple__375)) __PYX_ERR(0, 7111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__375);
  __Pyx_GIVEREF(__pyx_tuple__375);

  /* "cuda/_cuda/ccuda.pyx":7120
 *     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__376 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsVDPAURegister_2); if (unlikely(!__pyx_tuple__376)) __PYX_ERR(0, 7120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__376);
  __Pyx_GIVEREF(__pyx_tuple__376);

  /* "cuda/_cuda/ccuda.pyx":7129
 *     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__377 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsEGLRegisterIm); if (unlikely(!__pyx_tuple__377)) __PYX_ERR(0, 7129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__377);
  __Pyx_GIVEREF(__pyx_tuple__377);

  /* "cuda/_cuda/ccuda.pyx":7138
 *     if __cuEGLStreamConsumerConnect == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerConnect" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUeglStreamConnection*, EGLStreamKHR) nogil> __cuEGLStreamConsumerConnect)(conn, stream)
 *     return err
 */
  __pyx_tuple__378 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEGLStreamConsumerConn); if (unlikely(!__pyx_tuple__378)) __PYX_ERR(0, 7138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__378);
  __Pyx_GIVEREF(__pyx_tuple__378);

  /* "cuda/_cuda/ccuda.pyx":7147
 *     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__379 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEGLStreamConsumerConn_2); if (unlikely(!__pyx_tuple__379)) __PYX_ERR(0, 7147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__379);
  __Pyx_GIVEREF(__pyx_tuple__379);

  /* "cuda/_cuda/ccuda.pyx":7156
 *     if __cuEGLStreamConsumerDisconnect == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamConsumerDisconnect" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUeglStreamConnection*) nogil> __cuEGLStreamConsumerDisconnect)(conn)
 *     return err
 */
  __pyx_tuple__380 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEGLStreamConsumerDisc); if (unlikely(!__pyx_tuple__380)) __PYX_ERR(0, 7156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__380);
  __Pyx_GIVEREF(__pyx_tuple__380);

  /* "cuda/_cuda/ccuda.pyx":7165
 *     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__381 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEGLStreamConsumerAcqu); if (unlikely(!__pyx_tuple__381)) __PYX_ERR(0, 7165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__381);
  __Pyx_GIVEREF(__pyx_tuple__381);

  /* "cuda/_cuda/ccuda.pyx":7174
 *     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__382 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEGLStreamConsumerRele); if (unlikely(!__pyx_tuple__382)) __PYX_ERR(0, 7174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__382);
  __Pyx_GIVEREF(__pyx_tuple__382);

  /* "cuda/_cuda/ccuda.pyx":7183
 *     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__383 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEGLStreamProducerConn); if (unlikely(!__pyx_tuple__383)) __PYX_ERR(0, 7183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__383);
  __Pyx_GIVEREF(__pyx_tuple__383);

  /* "cuda/_cuda/ccuda.pyx":7192
 *     if __cuEGLStreamProducerDisconnect == NULL:
 *         with gil:
 *             raise RuntimeError('Function "cuEGLStreamProducerDisconnect" not found')             # <<<<<<<<<<<<<<
 *     err = (<CUresult (*)(CUeglStreamConnection*) nogil> __cuEGLStreamProducerDisconnect)(conn)
 *     return err
 */
  __pyx_tuple__384 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEGLStreamProducerDisc); if (unlikely(!__pyx_tuple__384)) __PYX_ERR(0, 7192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__384);
  __Pyx_GIVEREF(__pyx_tuple__384);

  /* "cuda/_cuda/ccuda.pyx":7201
 *     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__385 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEGLStreamProducerPres); if (unlikely(!__pyx_tuple__385)) __PYX_ERR(0, 7201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__385);
  __Pyx_GIVEREF(__pyx_tuple__385);

  /* "cuda/_cuda/ccuda.pyx":7210
 *     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__386 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEGLStreamProducerRetu); if (unlikely(!__pyx_tuple__386)) __PYX_ERR(0, 7210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__386);
  __Pyx_GIVEREF(__pyx_tuple__386);

  /* "cuda/_cuda/ccuda.pyx":7219
 *     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__387 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsResourceGetMa_3); if (unlikely(!__pyx_tuple__387)) __PYX_ERR(0, 7219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__387);
  __Pyx_GIVEREF(__pyx_tuple__387);

  /* "cuda/_cuda/ccuda.pyx":7228
 *     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__388 = PyTuple_Pack(1, __pyx_kp_u_Function_cuEventCreateFromEGLSyn); if (unlikely(!__pyx_tuple__388)) __PYX_ERR(0, 7228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__388);
  __Pyx_GIVEREF(__pyx_tuple__388);

  /* "cuda/_cuda/ccuda.pyx":7237
 *     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__389 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsGLRegisterBuf); if (unlikely(!__pyx_tuple__389)) __PYX_ERR(0, 7237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__389);
  __Pyx_GIVEREF(__pyx_tuple__389);

  /* "cuda/_cuda/ccuda.pyx":7246
 *     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__390 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGraphicsGLRegisterIma); if (unlikely(!__pyx_tuple__390)) __PYX_ERR(0, 7246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__390);
  __Pyx_GIVEREF(__pyx_tuple__390);

  /* "cuda/_cuda/ccuda.pyx":7255
 *     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__391 = PyTuple_Pack(1, __pyx_kp_u_Function_cuGLGetDevices_v2_not_f); if (unlikely(!__pyx_tuple__391)) __PYX_ERR(0, 7255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__391);
  __Pyx_GIVEREF(__pyx_tuple__391);
  __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("_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("_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("_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("_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("_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("_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("_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("_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("_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("_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("_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", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCaptureInfo, "CUresult (CUstream, CUstreamCaptureStatus *, cuuint64_t *)") < 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", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitValue32, "CUresult (CUstream, CUdeviceptr, cuuint32_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamWaitValue64", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitValue64, "CUresult (CUstream, CUdeviceptr, cuuint64_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamWriteValue32", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWriteValue32, "CUresult (CUstream, CUdeviceptr, cuuint32_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamWriteValue64", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWriteValue64, "CUresult (CUstream, CUdeviceptr, cuuint64_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuStreamBatchMemOp", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuStreamBatchMemOp, "CUresult (CUstream, unsigned int, CUstreamBatchMemOpParams *, unsigned int)") < 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", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddKernelNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_KERNEL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphKernelNodeGetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeGetParams, "CUresult (CUgraphNode, CUDA_KERNEL_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("_cuGraphKernelNodeSetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeSetParams, "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("_cuGraphInstantiate_v2", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphInstantiate_v2, "CUresult (CUgraphExec *, CUgraph, CUgraphNode *, char *, size_t)") < 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("_cuGraphExecKernelNodeSetParams", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecKernelNodeSetParams, "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", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecUpdate, "CUresult (CUgraphExec, CUgraph, CUgraphNode *, CUgraphExecUpdateResult *)") < 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("_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("_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", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress, "CUresult (char const *, void **, int, cuuint64_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("_cuProfilerInitialize", (void (*)(void))__pyx_f_4cuda_5_cuda_5ccuda__cuProfilerInitialize, "CUresult (char const *, char const *, CUoutput_mode)") < 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("_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)
  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)
  __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(__pyx_t_1, "cuGetProcAddress", (void (**)(void))&__pyx_f_4cuda_5ccuda_cuGetProcAddress, "CUresult (char const *, void **, int, cuuint64_t)") < 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 *__cuFlushGPUDirectRDMAWrites = 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 *__cuFlushGPUDirectRDMAWrites = NULL
 * cdef void *__cuDeviceGetProperties = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetDefaultMemPool = NULL;

  /* "cuda/_cuda/ccuda.pyx":32
 * cdef void *__cuDeviceGetMemPool = NULL
 * cdef void *__cuDeviceGetDefaultMemPool = 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":33
 * cdef void *__cuDeviceGetDefaultMemPool = 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":34
 * 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":35
 * 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":36
 * 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":37
 * 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":38
 * cdef void *__cuDevicePrimaryCtxRelease_v2 = NULL
 * cdef void *__cuDevicePrimaryCtxSetFlags_v2 = NULL
 * cdef void *__cuDevicePrimaryCtxGetState = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDevicePrimaryCtxReset_v2 = NULL
 * cdef void *__cuDeviceGetExecAffinitySupport = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxGetState = NULL;

  /* "cuda/_cuda/ccuda.pyx":39
 * cdef void *__cuDevicePrimaryCtxSetFlags_v2 = NULL
 * cdef void *__cuDevicePrimaryCtxGetState = NULL
 * cdef void *__cuDevicePrimaryCtxReset_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDeviceGetExecAffinitySupport = NULL
 * cdef void *__cuCtxCreate_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDevicePrimaryCtxReset_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":40
 * cdef void *__cuDevicePrimaryCtxGetState = NULL
 * cdef void *__cuDevicePrimaryCtxReset_v2 = NULL
 * cdef void *__cuDeviceGetExecAffinitySupport = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuCtxCreate_v2 = NULL
 * cdef void *__cuCtxCreate_v3 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDeviceGetExecAffinitySupport = NULL;

  /* "cuda/_cuda/ccuda.pyx":41
 * cdef void *__cuDevicePrimaryCtxReset_v2 = NULL
 * cdef void *__cuDeviceGetExecAffinitySupport = 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 *__cuDeviceGetExecAffinitySupport = 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 *__cuCtxSynchronize = 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 *__cuCtxSynchronize = NULL
 * cdef void *__cuCtxSetLimit = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuCtxGetFlags = NULL;

  /* "cuda/_cuda/ccuda.pyx":50
 * cdef void *__cuCtxGetDevice = NULL
 * cdef void *__cuCtxGetFlags = 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":51
 * cdef void *__cuCtxGetFlags = 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":52
 * 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":53
 * 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":54
 * 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":55
 * 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":56
 * 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":57
 * 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":58
 * 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":59
 * 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":60
 * 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":61
 * 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":62
 * 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":63
 * 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":64
 * 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":65
 * 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":66
 * 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":67
 * 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":68
 * 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":69
 * cdef void *__cuModuleUnload = NULL
 * cdef void *__cuModuleGetLoadingMode = NULL
 * cdef void *__cuModuleGetFunction = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuModuleGetGlobal_v2 = NULL
 * cdef void *__cuModuleGetTexRef = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetFunction = NULL;

  /* "cuda/_cuda/ccuda.pyx":70
 * cdef void *__cuModuleGetLoadingMode = NULL
 * cdef void *__cuModuleGetFunction = NULL
 * cdef void *__cuModuleGetGlobal_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuModuleGetTexRef = NULL
 * cdef void *__cuModuleGetSurfRef = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetGlobal_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":71
 * cdef void *__cuModuleGetFunction = NULL
 * cdef void *__cuModuleGetGlobal_v2 = NULL
 * cdef void *__cuModuleGetTexRef = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuModuleGetSurfRef = NULL
 * cdef void *__cuLinkCreate_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetTexRef = NULL;

  /* "cuda/_cuda/ccuda.pyx":72
 * cdef void *__cuModuleGetGlobal_v2 = NULL
 * cdef void *__cuModuleGetTexRef = NULL
 * cdef void *__cuModuleGetSurfRef = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuLinkCreate_v2 = NULL
 * cdef void *__cuLinkAddData_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuModuleGetSurfRef = NULL;

  /* "cuda/_cuda/ccuda.pyx":73
 * cdef void *__cuModuleGetTexRef = NULL
 * cdef void *__cuModuleGetSurfRef = 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 *__cuModuleGetSurfRef = 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 *__cuMemGetInfo_v2 = 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 *__cuMemGetInfo_v2 = NULL
 * cdef void *__cuMemAlloc_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuLinkDestroy = NULL;

  /* "cuda/_cuda/ccuda.pyx":78
 * cdef void *__cuLinkComplete = NULL
 * cdef void *__cuLinkDestroy = 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":79
 * cdef void *__cuLinkDestroy = 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":80
 * 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":81
 * 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":82
 * 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":83
 * 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":84
 * 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":85
 * 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":86
 * 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":87
 * 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":88
 * 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":89
 * 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":90
 * 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":91
 * 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":92
 * 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":93
 * 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":94
 * 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":95
 * 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":96
 * 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":97
 * 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":98
 * 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":99
 * 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":100
 * 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":101
 * 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":102
 * 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":103
 * 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":104
 * 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":105
 * 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":106
 * 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":107
 * 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":108
 * 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":109
 * 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":110
 * 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":111
 * 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":112
 * 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":113
 * 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":114
 * 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":115
 * 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":116
 * 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":117
 * 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":118
 * 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":119
 * 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":120
 * 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":121
 * 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":122
 * 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":123
 * 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":124
 * 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":125
 * 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":126
 * 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":127
 * 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":128
 * 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":129
 * 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":130
 * 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":131
 * 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":132
 * 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":133
 * 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":134
 * 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":135
 * 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":136
 * 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":137
 * 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":138
 * 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":139
 * 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":140
 * 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":141
 * 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":142
 * 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":143
 * 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":144
 * 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":145
 * 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":146
 * 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":147
 * 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":148
 * 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":149
 * 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":150
 * 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":151
 * 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":152
 * 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":153
 * 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":154
 * 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":155
 * 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":156
 * 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":157
 * 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":158
 * 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":159
 * 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":160
 * 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":161
 * 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":162
 * 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":163
 * 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":164
 * 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":165
 * 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":166
 * 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":167
 * 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":168
 * 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":169
 * 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":170
 * 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":171
 * 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":172
 * 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":173
 * 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":174
 * cdef void *__cuMemPoolExportToShareableHandle = NULL
 * cdef void *__cuMemPoolImportFromShareableHandle = NULL
 * cdef void *__cuMemPoolExportPointer = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemPoolImportPointer = NULL
 * cdef void *__cuPointerGetAttribute = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolExportPointer = NULL;

  /* "cuda/_cuda/ccuda.pyx":175
 * cdef void *__cuMemPoolImportFromShareableHandle = NULL
 * cdef void *__cuMemPoolExportPointer = NULL
 * cdef void *__cuMemPoolImportPointer = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuPointerGetAttribute = NULL
 * cdef void *__cuMemPrefetchAsync = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemPoolImportPointer = NULL;

  /* "cuda/_cuda/ccuda.pyx":176
 * cdef void *__cuMemPoolExportPointer = NULL
 * cdef void *__cuMemPoolImportPointer = NULL
 * cdef void *__cuPointerGetAttribute = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemPrefetchAsync = NULL
 * cdef void *__cuMemAdvise = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuPointerGetAttribute = NULL;

  /* "cuda/_cuda/ccuda.pyx":177
 * cdef void *__cuMemPoolImportPointer = NULL
 * cdef void *__cuPointerGetAttribute = NULL
 * cdef void *__cuMemPrefetchAsync = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemAdvise = NULL
 * cdef void *__cuMemRangeGetAttribute = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemPrefetchAsync = NULL;

  /* "cuda/_cuda/ccuda.pyx":178
 * cdef void *__cuPointerGetAttribute = NULL
 * cdef void *__cuMemPrefetchAsync = NULL
 * cdef void *__cuMemAdvise = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuMemRangeGetAttribute = NULL
 * cdef void *__cuMemRangeGetAttributes = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuMemAdvise = NULL;

  /* "cuda/_cuda/ccuda.pyx":179
 * cdef void *__cuMemPrefetchAsync = NULL
 * cdef void *__cuMemAdvise = 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":180
 * cdef void *__cuMemAdvise = 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":181
 * 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":182
 * 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":183
 * 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":184
 * 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":185
 * cdef void *__cuStreamCreate = NULL
 * cdef void *__cuStreamCreateWithPriority = NULL
 * cdef void *__cuStreamGetPriority = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamGetFlags = NULL
 * cdef void *__cuStreamGetCtx = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetPriority = NULL;

  /* "cuda/_cuda/ccuda.pyx":186
 * cdef void *__cuStreamCreateWithPriority = NULL
 * cdef void *__cuStreamGetPriority = NULL
 * cdef void *__cuStreamGetFlags = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamGetCtx = NULL
 * cdef void *__cuStreamWaitEvent = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetFlags = NULL;

  /* "cuda/_cuda/ccuda.pyx":187
 * cdef void *__cuStreamGetPriority = NULL
 * cdef void *__cuStreamGetFlags = 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":188
 * cdef void *__cuStreamGetFlags = 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":189
 * 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":190
 * 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":191
 * 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":192
 * cdef void *__cuStreamBeginCapture_v2 = NULL
 * cdef void *__cuThreadExchangeStreamCaptureMode = NULL
 * cdef void *__cuStreamEndCapture = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamIsCapturing = NULL
 * cdef void *__cuStreamGetCaptureInfo = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamEndCapture = NULL;

  /* "cuda/_cuda/ccuda.pyx":193
 * cdef void *__cuThreadExchangeStreamCaptureMode = NULL
 * cdef void *__cuStreamEndCapture = NULL
 * cdef void *__cuStreamIsCapturing = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamGetCaptureInfo = NULL
 * cdef void *__cuStreamGetCaptureInfo_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamIsCapturing = NULL;

  /* "cuda/_cuda/ccuda.pyx":194
 * cdef void *__cuStreamEndCapture = NULL
 * cdef void *__cuStreamIsCapturing = NULL
 * cdef void *__cuStreamGetCaptureInfo = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamGetCaptureInfo_v2 = NULL
 * cdef void *__cuStreamUpdateCaptureDependencies = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamGetCaptureInfo = NULL;

  /* "cuda/_cuda/ccuda.pyx":195
 * cdef void *__cuStreamIsCapturing = NULL
 * cdef void *__cuStreamGetCaptureInfo = 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":196
 * cdef void *__cuStreamGetCaptureInfo = 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":197
 * 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":198
 * 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":199
 * 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":200
 * 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":201
 * 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":202
 * 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":203
 * 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":204
 * 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":205
 * 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":206
 * 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":207
 * 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":208
 * 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":209
 * 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":210
 * 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":211
 * 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":212
 * 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":213
 * 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":214
 * 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":215
 * 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":216
 * 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":217
 * cdef void *__cuImportExternalSemaphore = NULL
 * cdef void *__cuSignalExternalSemaphoresAsync = NULL
 * cdef void *__cuWaitExternalSemaphoresAsync = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDestroyExternalSemaphore = NULL
 * cdef void *__cuStreamWaitValue32 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuWaitExternalSemaphoresAsync = NULL;

  /* "cuda/_cuda/ccuda.pyx":218
 * cdef void *__cuSignalExternalSemaphoresAsync = NULL
 * cdef void *__cuWaitExternalSemaphoresAsync = NULL
 * cdef void *__cuDestroyExternalSemaphore = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamWaitValue32 = NULL
 * cdef void *__cuStreamWaitValue64 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuDestroyExternalSemaphore = NULL;

  /* "cuda/_cuda/ccuda.pyx":219
 * cdef void *__cuWaitExternalSemaphoresAsync = NULL
 * cdef void *__cuDestroyExternalSemaphore = NULL
 * cdef void *__cuStreamWaitValue32 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamWaitValue64 = NULL
 * cdef void *__cuStreamWriteValue32 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue32 = NULL;

  /* "cuda/_cuda/ccuda.pyx":220
 * cdef void *__cuDestroyExternalSemaphore = NULL
 * cdef void *__cuStreamWaitValue32 = NULL
 * cdef void *__cuStreamWaitValue64 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamWriteValue32 = NULL
 * cdef void *__cuStreamWriteValue64 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWaitValue64 = NULL;

  /* "cuda/_cuda/ccuda.pyx":221
 * cdef void *__cuStreamWaitValue32 = NULL
 * cdef void *__cuStreamWaitValue64 = NULL
 * cdef void *__cuStreamWriteValue32 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamWriteValue64 = NULL
 * cdef void *__cuStreamBatchMemOp = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue32 = NULL;

  /* "cuda/_cuda/ccuda.pyx":222
 * cdef void *__cuStreamWaitValue64 = NULL
 * cdef void *__cuStreamWriteValue32 = NULL
 * cdef void *__cuStreamWriteValue64 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamBatchMemOp = NULL
 * cdef void *__cuStreamWaitValue32_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamWriteValue64 = NULL;

  /* "cuda/_cuda/ccuda.pyx":223
 * cdef void *__cuStreamWriteValue32 = NULL
 * cdef void *__cuStreamWriteValue64 = NULL
 * cdef void *__cuStreamBatchMemOp = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuStreamWaitValue32_v2 = NULL
 * cdef void *__cuStreamWaitValue64_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuStreamBatchMemOp = NULL;

  /* "cuda/_cuda/ccuda.pyx":224
 * cdef void *__cuStreamWriteValue64 = NULL
 * cdef void *__cuStreamBatchMemOp = 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":225
 * cdef void *__cuStreamBatchMemOp = 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":226
 * 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":227
 * 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":228
 * 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":229
 * 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":230
 * 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":231
 * 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":232
 * 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":233
 * 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":234
 * 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":235
 * 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":236
 * 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":237
 * 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":238
 * 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":239
 * 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":240
 * 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":241
 * 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":242
 * 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":243
 * 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":244
 * 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":245
 * 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":246
 * 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":247
 * 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":248
 * cdef void *__cuLaunchGrid = NULL
 * cdef void *__cuLaunchGridAsync = NULL
 * cdef void *__cuParamSetTexRef = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphCreate = NULL
 * cdef void *__cuGraphAddKernelNode = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuParamSetTexRef = NULL;

  /* "cuda/_cuda/ccuda.pyx":249
 * cdef void *__cuLaunchGridAsync = NULL
 * cdef void *__cuParamSetTexRef = NULL
 * cdef void *__cuGraphCreate = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphAddKernelNode = NULL
 * cdef void *__cuGraphKernelNodeGetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphCreate = NULL;

  /* "cuda/_cuda/ccuda.pyx":250
 * cdef void *__cuParamSetTexRef = NULL
 * cdef void *__cuGraphCreate = NULL
 * cdef void *__cuGraphAddKernelNode = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphKernelNodeGetParams = NULL
 * cdef void *__cuGraphKernelNodeSetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphAddKernelNode = NULL;

  /* "cuda/_cuda/ccuda.pyx":251
 * cdef void *__cuGraphCreate = NULL
 * cdef void *__cuGraphAddKernelNode = NULL
 * cdef void *__cuGraphKernelNodeGetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphKernelNodeSetParams = NULL
 * cdef void *__cuGraphAddMemcpyNode = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeGetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":252
 * cdef void *__cuGraphAddKernelNode = NULL
 * cdef void *__cuGraphKernelNodeGetParams = NULL
 * cdef void *__cuGraphKernelNodeSetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphAddMemcpyNode = NULL
 * cdef void *__cuGraphMemcpyNodeGetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphKernelNodeSetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":253
 * cdef void *__cuGraphKernelNodeGetParams = NULL
 * cdef void *__cuGraphKernelNodeSetParams = 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":254
 * cdef void *__cuGraphKernelNodeSetParams = 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":255
 * 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":256
 * 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":257
 * 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":258
 * 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":259
 * 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":260
 * 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":261
 * 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":262
 * 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":263
 * 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":264
 * 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":265
 * 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":266
 * 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":267
 * 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":268
 * 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":269
 * 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":270
 * 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":271
 * 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":272
 * 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":273
 * 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":274
 * 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":275
 * 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":276
 * 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":277
 * 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":278
 * 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":279
 * 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":280
 * 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":281
 * 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":282
 * 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":283
 * 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":284
 * 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":285
 * 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":286
 * 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":287
 * 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":288
 * 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":289
 * 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":290
 * 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":291
 * 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":292
 * 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":293
 * 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":294
 * 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":295
 * 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":296
 * 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":297
 * cdef void *__cuGraphNodeGetDependentNodes = NULL
 * cdef void *__cuGraphAddDependencies = NULL
 * cdef void *__cuGraphRemoveDependencies = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphDestroyNode = NULL
 * cdef void *__cuGraphInstantiate_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphRemoveDependencies = NULL;

  /* "cuda/_cuda/ccuda.pyx":298
 * cdef void *__cuGraphAddDependencies = NULL
 * cdef void *__cuGraphRemoveDependencies = NULL
 * cdef void *__cuGraphDestroyNode = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphInstantiate_v2 = NULL
 * cdef void *__cuGraphInstantiateWithFlags = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphDestroyNode = NULL;

  /* "cuda/_cuda/ccuda.pyx":299
 * cdef void *__cuGraphRemoveDependencies = NULL
 * cdef void *__cuGraphDestroyNode = NULL
 * cdef void *__cuGraphInstantiate_v2 = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphInstantiateWithFlags = NULL
 * cdef void *__cuGraphExecKernelNodeSetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphInstantiate_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":300
 * cdef void *__cuGraphDestroyNode = NULL
 * cdef void *__cuGraphInstantiate_v2 = NULL
 * cdef void *__cuGraphInstantiateWithFlags = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphExecKernelNodeSetParams = NULL
 * cdef void *__cuGraphExecMemcpyNodeSetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphInstantiateWithFlags = NULL;

  /* "cuda/_cuda/ccuda.pyx":301
 * cdef void *__cuGraphInstantiate_v2 = NULL
 * cdef void *__cuGraphInstantiateWithFlags = NULL
 * cdef void *__cuGraphExecKernelNodeSetParams = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphExecMemcpyNodeSetParams = NULL
 * cdef void *__cuGraphExecMemsetNodeSetParams = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecKernelNodeSetParams = NULL;

  /* "cuda/_cuda/ccuda.pyx":302
 * cdef void *__cuGraphInstantiateWithFlags = NULL
 * cdef void *__cuGraphExecKernelNodeSetParams = 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":303
 * cdef void *__cuGraphExecKernelNodeSetParams = 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":304
 * 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":305
 * 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":306
 * 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":307
 * 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":308
 * 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":309
 * 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":310
 * 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":311
 * 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":312
 * 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":313
 * 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":314
 * cdef void *__cuGraphUpload = NULL
 * cdef void *__cuGraphLaunch = NULL
 * cdef void *__cuGraphExecDestroy = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphDestroy = NULL
 * cdef void *__cuGraphExecUpdate = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecDestroy = NULL;

  /* "cuda/_cuda/ccuda.pyx":315
 * cdef void *__cuGraphLaunch = NULL
 * cdef void *__cuGraphExecDestroy = NULL
 * cdef void *__cuGraphDestroy = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphExecUpdate = NULL
 * cdef void *__cuGraphKernelNodeCopyAttributes = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphDestroy = NULL;

  /* "cuda/_cuda/ccuda.pyx":316
 * cdef void *__cuGraphExecDestroy = NULL
 * cdef void *__cuGraphDestroy = NULL
 * cdef void *__cuGraphExecUpdate = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphKernelNodeCopyAttributes = NULL
 * cdef void *__cuGraphKernelNodeGetAttribute = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphExecUpdate = NULL;

  /* "cuda/_cuda/ccuda.pyx":317
 * cdef void *__cuGraphDestroy = NULL
 * cdef void *__cuGraphExecUpdate = 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":318
 * cdef void *__cuGraphExecUpdate = 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":319
 * 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":320
 * 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":321
 * 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":322
 * 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":323
 * 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":324
 * cdef void *__cuUserObjectRetain = NULL
 * cdef void *__cuUserObjectRelease = NULL
 * cdef void *__cuGraphRetainUserObject = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphReleaseUserObject = NULL
 * cdef void *__cuOccupancyMaxActiveBlocksPerMultiprocessor = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphRetainUserObject = NULL;

  /* "cuda/_cuda/ccuda.pyx":325
 * cdef void *__cuUserObjectRelease = NULL
 * cdef void *__cuGraphRetainUserObject = NULL
 * cdef void *__cuGraphReleaseUserObject = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuOccupancyMaxActiveBlocksPerMultiprocessor = NULL
 * cdef void *__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphReleaseUserObject = NULL;

  /* "cuda/_cuda/ccuda.pyx":326
 * cdef void *__cuGraphRetainUserObject = NULL
 * cdef void *__cuGraphReleaseUserObject = 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":327
 * cdef void *__cuGraphReleaseUserObject = 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":328
 * 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":329
 * 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":330
 * 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":331
 * 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":332
 * 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":333
 * 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":334
 * 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":335
 * 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":336
 * 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":337
 * 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":338
 * 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":339
 * 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":340
 * 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":341
 * 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":342
 * 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":343
 * 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":344
 * 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":345
 * 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":346
 * 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":347
 * 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":348
 * 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":349
 * 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":350
 * 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":351
 * 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":352
 * 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":353
 * 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":354
 * 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":355
 * 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":356
 * 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":357
 * 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":358
 * 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":359
 * 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":360
 * 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":361
 * 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":362
 * 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":363
 * 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":364
 * 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":365
 * 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":366
 * 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":367
 * 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":368
 * cdef void *__cuTexObjectGetResourceViewDesc = NULL
 * cdef void *__cuSurfObjectCreate = NULL
 * cdef void *__cuSurfObjectDestroy = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuSurfObjectGetResourceDesc = NULL
 * cdef void *__cuDeviceCanAccessPeer = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectDestroy = NULL;

  /* "cuda/_cuda/ccuda.pyx":369
 * cdef void *__cuSurfObjectCreate = NULL
 * cdef void *__cuSurfObjectDestroy = NULL
 * cdef void *__cuSurfObjectGetResourceDesc = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuDeviceCanAccessPeer = NULL
 * cdef void *__cuCtxEnablePeerAccess = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuSurfObjectGetResourceDesc = NULL;

  /* "cuda/_cuda/ccuda.pyx":370
 * cdef void *__cuSurfObjectDestroy = NULL
 * cdef void *__cuSurfObjectGetResourceDesc = 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":371
 * cdef void *__cuSurfObjectGetResourceDesc = 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":372
 * 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":373
 * 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":374
 * 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":375
 * 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":376
 * 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":377
 * 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":378
 * 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":379
 * cdef void *__cuGraphicsResourceGetMappedPointer_v2 = NULL
 * cdef void *__cuGraphicsResourceSetMapFlags_v2 = NULL
 * cdef void *__cuGraphicsMapResources = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphicsUnmapResources = NULL
 * cdef void *__cuGetProcAddress = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsMapResources = NULL;

  /* "cuda/_cuda/ccuda.pyx":380
 * cdef void *__cuGraphicsResourceSetMapFlags_v2 = NULL
 * cdef void *__cuGraphicsMapResources = NULL
 * cdef void *__cuGraphicsUnmapResources = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGetProcAddress = NULL
 * cdef void *__cuGetExportTable = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsUnmapResources = NULL;

  /* "cuda/_cuda/ccuda.pyx":381
 * cdef void *__cuGraphicsMapResources = NULL
 * cdef void *__cuGraphicsUnmapResources = NULL
 * cdef void *__cuGetProcAddress = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGetExportTable = NULL
 * cdef void *__cuProfilerInitialize = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGetProcAddress = NULL;

  /* "cuda/_cuda/ccuda.pyx":382
 * cdef void *__cuGraphicsUnmapResources = NULL
 * cdef void *__cuGetProcAddress = NULL
 * cdef void *__cuGetExportTable = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuProfilerInitialize = NULL
 * cdef void *__cuProfilerStart = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGetExportTable = NULL;

  /* "cuda/_cuda/ccuda.pyx":383
 * cdef void *__cuGetProcAddress = NULL
 * cdef void *__cuGetExportTable = NULL
 * cdef void *__cuProfilerInitialize = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuProfilerStart = NULL
 * cdef void *__cuProfilerStop = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuProfilerInitialize = NULL;

  /* "cuda/_cuda/ccuda.pyx":384
 * cdef void *__cuGetExportTable = NULL
 * cdef void *__cuProfilerInitialize = NULL
 * cdef void *__cuProfilerStart = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuProfilerStop = NULL
 * cdef void *__cuVDPAUGetDevice = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuProfilerStart = NULL;

  /* "cuda/_cuda/ccuda.pyx":385
 * cdef void *__cuProfilerInitialize = NULL
 * cdef void *__cuProfilerStart = NULL
 * cdef void *__cuProfilerStop = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuVDPAUGetDevice = NULL
 * cdef void *__cuVDPAUCtxCreate_v2 = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuProfilerStop = NULL;

  /* "cuda/_cuda/ccuda.pyx":386
 * cdef void *__cuProfilerStart = NULL
 * cdef void *__cuProfilerStop = 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":387
 * cdef void *__cuProfilerStop = 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":388
 * cdef void *__cuVDPAUGetDevice = NULL
 * cdef void *__cuVDPAUCtxCreate_v2 = NULL
 * cdef void *__cuGraphicsVDPAURegisterVideoSurface = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphicsVDPAURegisterOutputSurface = NULL
 * cdef void *__cuGraphicsEGLRegisterImage = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsVDPAURegisterVideoSurface = NULL;

  /* "cuda/_cuda/ccuda.pyx":389
 * cdef void *__cuVDPAUCtxCreate_v2 = NULL
 * cdef void *__cuGraphicsVDPAURegisterVideoSurface = NULL
 * cdef void *__cuGraphicsVDPAURegisterOutputSurface = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGraphicsEGLRegisterImage = NULL
 * cdef void *__cuEGLStreamConsumerConnect = NULL
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsVDPAURegisterOutputSurface = NULL;

  /* "cuda/_cuda/ccuda.pyx":390
 * cdef void *__cuGraphicsVDPAURegisterVideoSurface = NULL
 * cdef void *__cuGraphicsVDPAURegisterOutputSurface = 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":391
 * cdef void *__cuGraphicsVDPAURegisterOutputSurface = 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":392
 * 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":393
 * 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":394
 * 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":395
 * 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":396
 * 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":397
 * 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":398
 * 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":399
 * 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":400
 * 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":401
 * 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":402
 * 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":403
 * cdef void *__cuEventCreateFromEGLSync = NULL
 * cdef void *__cuGraphicsGLRegisterBuffer = NULL
 * cdef void *__cuGraphicsGLRegisterImage = NULL             # <<<<<<<<<<<<<<
 * cdef void *__cuGLGetDevices_v2 = NULL
 * 
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGraphicsGLRegisterImage = NULL;

  /* "cuda/_cuda/ccuda.pyx":404
 * cdef void *__cuGraphicsGLRegisterBuffer = NULL
 * cdef void *__cuGraphicsGLRegisterImage = NULL
 * cdef void *__cuGLGetDevices_v2 = NULL             # <<<<<<<<<<<<<<
 * 
 * cdef int cuPythonInit() nogil except -1:
 */
  __pyx_v_4cuda_5_cuda_5ccuda___cuGLGetDevices_v2 = NULL;

  /* "cuda/_cuda/ccuda.pyx":1
 * # Copyright 2021-2022 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_COMPILING_IN_PYPY
        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);
#else
        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);
        }
#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_NCP_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
            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
            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
            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
#define __PYX_HAVE_RT_ImportFunction
static int __Pyx_ImportFunction(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 */
